You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cmda.apache.org by xi...@apache.org on 2015/09/05 02:20:05 UTC

[01/50] [abbrv] incubator-cmda git commit: Delete old route file

Repository: incubator-cmda
Updated Branches:
  refs/heads/master 564f26936 -> 31ee6e7e4


Delete old route file

Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/6a15e2c4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/6a15e2c4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/6a15e2c4

Branch: refs/heads/master
Commit: 6a15e2c4a0559f4c05ea21b0780ae5e3e078ad4d
Parents: 5cb9005
Author: mingqi830 <mq...@andrew.cmu.edu>
Authored: Wed Sep 2 14:56:31 2015 -0700
Committer: mingqi830 <mq...@andrew.cmu.edu>
Committed: Wed Sep 2 14:56:31 2015 -0700

----------------------------------------------------------------------
 conf/route_backup | 111 -------------------------------------------------
 1 file changed, 111 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/6a15e2c4/conf/route_backup
----------------------------------------------------------------------
diff --git a/conf/route_backup b/conf/route_backup
deleted file mode 100644
index c962201..0000000
--- a/conf/route_backup
+++ /dev/null
@@ -1,111 +0,0 @@
-# Routes
-# This file defines all application routes (Higher priority routes first)
-# ~~~~
-
-# Home page
-GET     /                           controllers.Application.index()
-
-# Authentication
-GET     /login                              controllers.Application.login()
-POST    /login                              controllers.Application.authenticate()
-GET     /logout                             controllers.Application.logout()
-
-# BugReporting
-GET     /bugs                       controllers.BugReportController.reports()
-GET     /newReport					controllers.BugReportController.newReport()
-GET	/bug/list					controllers.BugReportController.list()
-POST	/delete/report				controllers.BugReportController.deleteReport()
-POST	/solve/report				controllers.BugReportController.solveReport()
-
-# Map static resources from the /public folder to the /assets URL path
-GET     /assets/*file               controllers.Assets.at(path="/public", file)
-
-# sensor_types
-GET	/sensorTypes				controllers.SensorTypeController.sensorTypes()
-POST    /new/sensorTypes                controllers.SensorTypeController.newSensorType()
-POST    /delete/sensorTypes    	controllers.SensorTypeController.deleteSensorType()
-POST	/edit/sensorTypes		controllers.SensorTypeController.editSensorType()
-
-# device_types
-GET	/deviceTypes				controllers.DeviceTypeController.deviceTypes()
-POST    /new/deviceTypes               controllers.DeviceTypeController.newDeviceType()
-POST    /delete/deviceTypes     controllers.DeviceTypeController.deleteDeviceType()
-POST	/edit/deviceTypes		controllers.DeviceTypeController.editDeviceType()
-
-# devices
-GET	/devices				controllers.DeviceController.devices()
-POST    /new/devices                controllers.DeviceController.newDevice()
-POST    /delete/devices     controllers.DeviceController.deleteDevice()
-POST	/edit/devices		controllers.DeviceController.editDevice()
-
-# sensors
-GET	/sensors				controllers.SensorController.sensors()
-POST    /new/sensors                controllers.SensorController.newSensor()
-POST    /delete/sensors    controllers.SensorController.deleteSensor()
-POST	/edit/sensors		controllers.SensorController.editSensor()
-
-# sensor_categories
-GET	/sensorCategories				controllers.SensorCategoryController.sensorCategories()
-POST    /new/sensorCategories                controllers.SensorCategoryController.newSensorCategory()
-POST    /delete/sensorCategories     controllers.SensorCategoryController.deleteSensorCategory()
-POST	/download/sensorCategories	 controllers.SensorCategoryController.downloadSensorCategory()
-POST	/edit/sensorCategories		controllers.SensorCategoryController.editSensorCategory()
-
-# dashboard
-GET	/dashboard				controllers.DashboardController.dashboard()
-
-# About Us
-GET	/aboutus				controllers.AboutusController.aboutus()
-
-# sensor reading
-GET     /sensorReading			controllers.SensorReadingController.sensorReadings()
-POST	/getSensorReadings		controllers.SensorReadingController.getSensorReadingsWithinRange() 
-POST	/getSensorReadingsAtTimestamp	 controllers.SensorReadingController.getSensorReadingsAtTimestamp()
-POST	/getLatestSensorReadings	 controllers.SensorReadingController.getLatestSensorReadings()
-
-
-
-
-# recommendation
-GET		/estimator				controllers.EstimateController.estimate(email ?= null, vfile ?= null, dataset ?= null)
-POST	        /estimator/1			controllers.EstimateController.estimate1()
-GET		/estimator/1			controllers.EstimateController.estimate1()			
-GET		/estimator/2			controllers.EstimateController.estimate2()
-GET		/estimator/3			controllers.EstimateController.estimate3()
-GET		/estimator/tutorial		controllers.EstimateController.tutorial()
-GET		/estimator/login		controllers.EstimateController.login()
-POST            /estimator/login        controllers.EstimateController.authenticate()
-GET             /estimator/logout       controllers.EstimateController.logout()
-GET		/estimator/accountSummary		controllers.EstimateController.accountSummary(userName ?= null)
-
-#Registration
-GET 	        /estimator/register controllers.NasaRegistrationController.registrationForm()
-POST            /estimator/register/publish controllers.NasaRegistrationController.submit()
-GET             /estimator/updateUser controllers.NasaRegistrationController.updateForm()
-POST            /estimator/updateUser/update controllers.NasaRegistrationController.update()
-GET             /estimator/deleteUser controllers.NasaRegistrationController.deleteForm()
-POST            /estimator/deleteUser/delete controllers.NasaRegistrationController.delete()
-GET             /estimator/adminPage controllers.NasaRegistrationController.adminPage()
-
-# Climate Model
-GET		/climate				controllers.EstimateController.estimate(email ?= null, vfile ?= null, dataset ?= null)
-POST	        /climate/1			controllers.EstimateController.estimate1()
-GET		/climate/1			controllers.EstimateController.estimate1()			
-GET		/climate/2			controllers.EstimateController.estimate2()
-GET		/climate/3			controllers.EstimateController.estimate3()
-GET		/climate/tutorial		controllers.EstimateController.tutorial()
-GET		/climate/login		controllers.EstimateController.login()
-POST            /climate/login        controllers.EstimateController.authenticate()
-GET             /climate/logout       controllers.EstimateController.logout()
-GET		/climate/accountSummary		controllers.EstimateController.accountSummary(userName ?= null)
-
-
-
-#Climate Model Registration
-GET 	        /climate/register controllers.NasaRegistrationController.registrationForm()
-POST            /climate/register/publish controllers.NasaRegistrationController.submit()
-GET             /climate/updateUser controllers.NasaRegistrationController.updateForm()
-POST            /climate/updateUser/update controllers.NasaRegistrationController.update()
-GET             /climate/deleteUser controllers.NasaRegistrationController.deleteForm()
-POST            /climate/deleteUser/delete controllers.NasaRegistrationController.delete()
-GET             /climate/adminPage controllers.NasaRegistrationController.adminPage()


[09/50] [abbrv] incubator-cmda git commit: Remove all sensor things

Posted by xi...@apache.org.
Remove all sensor things

Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/2d375c56
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/2d375c56
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/2d375c56

Branch: refs/heads/master
Commit: 2d375c562f295501f158e4c1c4aaaddf6e3b26c5
Parents: 73b592c
Author: mingqi830 <mq...@andrew.cmu.edu>
Authored: Wed Sep 2 16:10:37 2015 -0700
Committer: mingqi830 <mq...@andrew.cmu.edu>
Committed: Wed Sep 2 16:10:37 2015 -0700

----------------------------------------------------------------------
 app/controllers/ClimateServiceController.java   |  69 ----
 app/controllers/EstimateController.java         | 147 ---------
 app/controllers/NasaRegistrationController.java | 268 ---------------
 app/models/NasaRegistration.java                | 325 -------------------
 app/views/climate/addUserForm.scala.html        |  31 --
 app/views/climate/allUsers.scala.html           |  82 -----
 app/views/climate/deleteUser.scala.html         |  23 --
 app/views/climate/estimate.scala.html           | 119 -------
 app/views/climate/estimate1.scala.html          | 115 -------
 app/views/climate/estimate2.scala.html          |  32 --
 app/views/climate/estimate3.scala.html          | 171 ----------
 app/views/climate/header.scala.html             |  19 --
 app/views/climate/login.scala.html              |  20 --
 app/views/climate/updateUserForm.scala.html     |  31 --
 .../climate/userRegistrationForm.scala.html     |  31 --
 app/views/estimator/accountSummary.scala.html   |  79 -----
 app/views/estimator/estimate.scala.html         | 118 -------
 app/views/estimator/estimate1.scala.html        | 115 -------
 app/views/estimator/estimate2.scala.html        |  32 --
 app/views/estimator/estimate3.scala.html        | 171 ----------
 app/views/estimator/header.scala.html           |  55 ----
 app/views/estimator/login.scala.html            |  22 --
 app/views/estimator/main.scala.html             |  60 ----
 app/views/estimator/tutorial.scala.html         |  24 --
 app/views/registration/@(users                  |   0
 app/views/registration/adminPage.scala.html     | 116 -------
 app/views/registration/delete.scala.html        |  23 --
 app/views/registration/header.scala.html        |  53 ---
 app/views/registration/main.scala.html          |  58 ----
 .../registration/registrationForm.scala.html    |  48 ---
 app/views/registration/submit.scala.html        |   5 -
 app/views/registration/updateForm.scala.html    |  48 ---
 conf/routes                                     |  24 --
 33 files changed, 2534 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/app/controllers/ClimateServiceController.java
----------------------------------------------------------------------
diff --git a/app/controllers/ClimateServiceController.java b/app/controllers/ClimateServiceController.java
index 9e0b88a..0cd2a54 100644
--- a/app/controllers/ClimateServiceController.java
+++ b/app/controllers/ClimateServiceController.java
@@ -3,8 +3,6 @@ package controllers;
 import static play.data.Form.form;
 import models.DataSet;
 import models.BugReport;
-import models.NasaRegistration;
-
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.node.ObjectNode;
 
@@ -50,9 +48,6 @@ public class ClimateServiceController extends Controller {
 	final static Form<ClimateService> climateServiceForm = Form
 			.form(ClimateService.class);
 
-	public static Result estimate(String email, String vfile, String dataset) {
-		return ok(estimate.render(email, vfile, dataset));
-	}
 	
 	public static Result home(String email, String vfile, String dataset) {
 		return ok(home.render(email, vfile, dataset));
@@ -1085,68 +1080,4 @@ public class ClimateServiceController extends Controller {
 		return ok(oneService.render("/assets/html/" + url));
 	}
 
-	// -- Authentication
-	public static class Login {
-
-
-		public String username;
-		public String password;
-
-		public String validate() {
-			if (username == null || password == null)
-				return "Invalid username or password";
-
-
-			return null;
-		}
-
-	}
-
-	/**
-	 * Login page.
-	 */
-
-	public static Result login() {
-		return ok(login.render(form(Login.class)));
-	}
-
-	/** Handle login form submission. */
-
-	/**
-	 * Handle login form submission.
-	 */
-	public static Result authenticate() {
-		Form<Login> loginForm = form(Login.class).bindFromRequest();
-		/*
-		 * if (loginForm.hasErrors()){ System.out.println("Test"); return
-		 * badRequest(login.render(loginForm)); } else {
-		 */
-		session("username", loginForm.get().username);
-		System.out.println("Email:" + loginForm.field("username").value());
-		if (loginForm.get().username.equals("admin")) {
-			System.out.println("Admin arena");
-			// session("username", loginForm.field("username").value());
-			return redirect(routes.NasaRegistrationController.adminPage());
-		} else {
-			// session("username", loginForm.field("username").value());
-			String userName = NasaRegistration.getUserInfo(
-					loginForm.field("username").value(),
-					loginForm.field("password").value());
-			System.out.println("Value:" + userName);
-			if (userName != null) {
-				System.out.println("passed get User info");
-				return redirect(routes.EstimateController
-						.accountSummary(userName));
-			} else
-				return redirect(routes.EstimateController.authenticate());
-			// Retrieve value from API and check against userName and password.
-
-		}
-	}
-
-	public static Result logout() {
-		session().clear();
-		flash("success", "You've been logged out");
-		return redirect(routes.EstimateController.estimate(null, null, null));
-	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/app/controllers/EstimateController.java
----------------------------------------------------------------------
diff --git a/app/controllers/EstimateController.java b/app/controllers/EstimateController.java
deleted file mode 100644
index a15b99b..0000000
--- a/app/controllers/EstimateController.java
+++ /dev/null
@@ -1,147 +0,0 @@
-package controllers;
-
-import static play.data.Form.form;
-
-import models.NasaRegistration;
-import java.io.*;
-
-import models.AWSClient;
-
-import controllers.Application.Login;
-import play.data.Form;
-import play.mvc.Controller;
-import play.mvc.Http.MultipartFormData;
-import play.mvc.Http.MultipartFormData.FilePart;
-import play.mvc.Result;
-import views.html.estimator.*;
-
-public class EstimateController extends Controller {
-
-	public static Result estimate(String email, String vfile, String dataset) {
-		return ok(estimate.render(email, vfile, dataset));
-	}
-
-	public static Result estimate1() {
-		// get the file from the user's upload
-		MultipartFormData body = request().body().asMultipartFormData();
-		FilePart picture = body.getFile("file");
-
-		String workingDir = System.getProperty("user.dir");
-		if (picture != null) {
-			String fileName = picture.getFilename();
-			String contentType = picture.getContentType();
-			File file = picture.getFile();
-
-			// create new file with the same name under tmpfiles/
-			File newfile = new File(workingDir + "/tmpfiles/" + fileName);
-			InputStream inStream;
-			try {
-				// copy files
-				inStream = new FileInputStream(file);
-				OutputStream outStream = new FileOutputStream(newfile);
-				byte[] buffer = new byte[1024];
-				int length;
-				// copy the file content in bytes
-				while ((length = inStream.read(buffer)) > 0) {
-					outStream.write(buffer, 0, length);
-				}
-				inStream.close();
-				outStream.close();
-				// upload the new file to s3
-				AWSClient.upload(newfile, fileName);
-			} catch (FileNotFoundException e) {
-				// TODO Auto-generated catch block
-				e.printStackTrace();
-			} catch (IOException e) {
-
-				// TODO Auto-generated catch block
-				e.printStackTrace();
-			}
-			return ok(estimate1.render());
-		} else {
-			flash("error", "Missing file");
-
-			return ok(estimate.render("", "", ""));
-		}
-
-	}
-
-	public static Result estimate2() {
-		return ok(estimate2.render());
-	}
-
-	public static Result estimate3() {
-		return ok(estimate3.render());
-	}
-
-	public static Result tutorial() {
-		return ok(tutorial.render());
-	}
-
-	public static Result accountSummary(String userName) {
-		return ok(accountSummary.render(userName));
-	}
-
-	// -- Authentication
-	public static class Login {
-
-
-		public String username;
-		public String password;
-
-		public String validate() {
-			if (username == null || password == null)
-				return "Invalid username or password";
-
-
-			return null;
-		}
-
-	}
-
-	/** Login page. */
-
-	public static Result login() {
-		return ok(login.render(form(Login.class)));
-	}
-
-	/** Handle login form submission. */
-
-	/** Handle login form submission. */
-	public static Result authenticate() {
-		Form<Login> loginForm = form(Login.class).bindFromRequest();
-		/*
-		 * if (loginForm.hasErrors()){ System.out.println("Test"); return
-		 * badRequest(login.render(loginForm)); } else {
-		 */
-		session("username", loginForm.get().username);
-		System.out.println("Email:" + loginForm.field("username").value());
-		if (loginForm.get().username.equals("admin")) {
-			System.out.println("Admin arena");
-			// session("username", loginForm.field("username").value());
-			return redirect(routes.NasaRegistrationController.adminPage());
-		} else {
-			// session("username", loginForm.field("username").value());
-			String userName = NasaRegistration.getUserInfo(
-					loginForm.field("username").value(),
-					loginForm.field("password").value());
-			System.out.println("Value:" + userName);
-			if (userName != null) {
-				System.out.println("passed get User info");
-				return redirect(routes.EstimateController
-						.accountSummary(userName));
-			} else
-				return redirect(routes.EstimateController.authenticate());
-			// Retrieve value from API and check against userName and password.
-
-		}
-
-		// }
-	}
-
-	public static Result logout() {
-		session().clear();
-		flash("success", "You've been logged out");
-		return redirect(routes.EstimateController.estimate(null, null, null));
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/app/controllers/NasaRegistrationController.java
----------------------------------------------------------------------
diff --git a/app/controllers/NasaRegistrationController.java b/app/controllers/NasaRegistrationController.java
deleted file mode 100644
index 7d480bf..0000000
--- a/app/controllers/NasaRegistrationController.java
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * Copyright (c) 2013 Carnegie Mellon University Silicon Valley. 
- * All rights reserved. 
- * 
- * This program and the accompanying materials are made available
- * under the terms of dual licensing(GPL V2 for Research/Education
- * purposes). GNU Public License v2.0 which accompanies this distribution
- * is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
- * 
- * Please contact http://www.cmu.edu/silicon-valley/ if you have any 
- * questions.
- * 
- * */
-
-package controllers;
-
-import models.NasaRegistration;
-import play.data.DynamicForm;
-import play.data.Form;
-import play.libs.Json;
-import play.mvc.Controller;
-import play.mvc.Result;
-import util.APICall;
-import util.APICall.ResponseType;
-import views.html.registration.*;
-import views.html.climate.*;
-import util.*;
-import java.util.*;
-
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.node.ObjectNode;
-import com.google.gson.JsonObject;
-
-public class NasaRegistrationController extends Controller {
-	//final static Form<Sensor> sensorForm = Form.form(Sensor.class);
-	final static Form<NasaRegistration> userForm = Form
-			.form(NasaRegistration.class);
-
-	public static Result registrationForm() {
-		return ok(userRegistrationForm.render(userForm));
-	}
-	
-	public static Result addUserForm(){
-		return ok(addUserForm.render(userForm));
-	}
-	
-	public static Result updateForm() {
-		return ok(updateUserForm.render(userForm));
-	}
-	
-	public static Result deleteForm(){
-		return ok(deleteUser.render(userForm));
-	}
-	
-	public static Result adminPage(){
-		return ok(adminPage.render(NasaRegistration.all()));
-	}
-
-	public static Result getAllUsers(){
-		return ok(allUsers.render(NasaRegistration.getAllUser(), userForm));
-	}
-	
-
-	// Registration
-	public static Result submit() {
-
-		Map<String, String[]> regFormEncoded = request().body().asFormUrlEncoded();
-		
-		//Calling method to get values from the form
-		JsonObject getJsonValues = new JsonObject();
-		getJsonValues  = util.EstimatorGetValues.getMode(regFormEncoded, "submit");
-
-		String urlStr = "http://einstein.sv.cmu.edu:9000/addContestUser";
-		// Sample data
-		try {
-			EstimatorAPICalls.HttpUserReg(urlStr, getJsonValues, "register");
-		}
-
-		
-		catch (Exception e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-			Application.flashMsg(APICall.createResponse(ResponseType.UNKNOWN));
-		}
-
-		return redirect(routes.EstimateController.login());
-	}
-	
-	public static Result addUser() {
-
-//		Form<NasaRegistration> filledForm = userForm.bindFromRequest();
-//		Map<String, String[]> regFormEncoded = request().body().asFormUrlEncoded();
-//		JsonObject getJsonValues = new JsonObject();
-//		
-//		getJsonValues  = util.EstimatorGetValues.getMode(regFormEncoded, "update");
-//		
-//		String urlStr = "http://einstein.sv.cmu.edu:9000/updateContestUser";
-//
-//		try {
-//			EstimatorAPICalls.HttpUserReg(urlStr, getJsonValues, "update");
-//		}
-//		 
-//		catch (Exception e) {
-//			// TODO Auto-generated catch block
-//			e.printStackTrace();
-//			Application.flashMsg(APICall.createResponse(ResponseType.UNKNOWN));
-//		}
-		Form<NasaRegistration> dc = userForm.bindFromRequest();
-		ObjectNode jsonData = Json.newObject();
-		try {
-
-			String userName = dc.field("userNameField").value();
-			if (userName != null && !userName.isEmpty()) {
-				jsonData.put("userName", userName);
-			}
-			
-			String password = dc.field("passwordField").value();
-			if (password != null && !password.isEmpty()) {
-				jsonData.put("password", password);
-			}
-			jsonData.put("firstName", dc.field("fNameField").value());    //TODO, since we don't have login/account id yet use a default val
-			jsonData.put("middleInitial", dc.field("mNameField").value());
-			jsonData.put("lastName", dc.field("lNameField").value());
-			jsonData.put("affiliation", dc.field("affliationField").value());
-			jsonData.put("email", dc.field("emailField").value());
-			jsonData.put("researchFields", dc.field("rAreaField").value());
-
-			// create the item by calling the API
-			JsonNode response = NasaRegistration.create(jsonData);
-
-			// flash the response message
-			Application.flashMsg(response);
-		} catch (IllegalStateException e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall
-					.createResponse(ResponseType.CONVERSIONERROR));
-		} catch (Exception e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall.createResponse(ResponseType.UNKNOWN));
-		}
-
-		return ok(allUsers.render(NasaRegistration.getAllUser(), userForm));
-	}
-	
-	public static Result update() {
-		DynamicForm dc = DynamicForm.form().bindFromRequest();
-		String id = dc.field("pk").value();
-		
-		//Form<NasaRegistration> dc = userForm.bindFromRequest();
-		ObjectNode jsonData = Json.newObject();
-		try {
-			
-//			String userName = dc.field("userNameField").value();
-//			System.out.println("id "+id);
-//			System.out.println("username "+userName);
-//			if (userName != null && !userName.isEmpty()) {
-//				jsonData.put("userName", userName);
-//			}
-//			
-//			String password = dc.field("passwordField").value();
-//			if (password != null && !password.isEmpty()) {
-//				jsonData.put("password", password);
-//			}
-//			jsonData.put("firstName", dc.field("fNameField").value());    //TODO, since we don't have login/account id yet use a default val
-//			jsonData.put("middleInitial", dc.field("mNameField").value());
-//			jsonData.put("lastName", dc.field("lNameField").value());
-//			jsonData.put("affiliation", dc.field("affliationField").value());
-//			jsonData.put("email", dc.field("emailField").value());
-//			jsonData.put("researchFields", dc.field("rAreaField").value());
-
-			NasaRegistration originalUser = NasaRegistration.findUserByName(id);
-			if (originalUser == null) {
-				Application.flashMsg(APICall.createResponse(ResponseType.UNKNOWN));
-				return notFound("not found original user " + id);
-			}
-
-			jsonData.put("userName", originalUser.getfNameField());
-			jsonData.put("password", originalUser.getPasswordField());
-			jsonData.put("firstName", originalUser.getfNameField());
-			jsonData.put("middleInitial", originalUser.getMiddleName());
-			jsonData.put("lastName", originalUser.getLastName());
-			jsonData.put("affiliation", originalUser.getAffliation());
-			jsonData.put("email", originalUser.getEmail());
-			jsonData.put("researchFields", originalUser.getResearchArea());
-			
-			String editField = dc.field("name").value();
-			if (editField != null && !editField.isEmpty()) {
-				jsonData.put(editField, dc.field("value").value());
-			}
-			System.out.println(editField);
-			// create the item by calling the API
-			JsonNode response = NasaRegistration.update(id, jsonData);
-
-			// flash the response message
-			Application.flashMsg(response);
-		} catch (IllegalStateException e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall
-					.createResponse(ResponseType.CONVERSIONERROR));
-		} catch (Exception e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall.createResponse(ResponseType.UNKNOWN));
-		}
-		return ok(allUsers.render(NasaRegistration.getAllUser(), userForm));
-	}
-	
-	public static Result delete() {
-
-//		Form<NasaRegistration> filledForm = userForm.bindFromRequest();
-//		Map<String, String[]> regFormEncoded = request().body().asFormUrlEncoded();
-//	
-//		JsonObject getJsonValues = new JsonObject();
-//		
-//		getJsonValues  = util.EstimatorGetValues.getMode(regFormEncoded, "delete");
-//
-//		String urlStr = "http://einstein.sv.cmu.edu:9000/deleteContestUser";
-//		
-//		try {
-//
-//			
-//			
-//			urlStr = urlStr + '/' + getJsonValues.get("userName").getAsString() + '/'
-//			       		+ getJsonValues.get("password").getAsString();
-//			
-//			EstimatorAPICalls.HttpUserReg(urlStr, getJsonValues, "delete");
-//						 		 
-//		}
-//		catch (Exception e) {
-//			// TODO Auto-generated catch block
-//			e.printStackTrace();
-//			Application.flashMsg(APICall.createResponse(ResponseType.UNKNOWN));
-//		}
-//
-//		return redirect(routes.NasaRegistrationController.registrationForm());
-		
-		Form<NasaRegistration> dc = userForm.bindFromRequest();
-		ObjectNode jsonData = Json.newObject();
-		try {
-
-			String userName = dc.field("userNameField").value();
-//			if (userName != null && !userName.isEmpty()) {
-//				jsonData.put("username", userName);
-//			}
-			
-			String password = dc.field("passwordField").value();
-//			if (password != null && !password.isEmpty()) {
-//				jsonData.put("password", password);
-//			}
-
-			// create the item by calling the API
-			JsonNode response = NasaRegistration.delete(jsonData, userName, password);
-			System.out.println(response);
-			// flash the response message
-			Application.flashMsg(response);
-		} catch (IllegalStateException e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall
-					.createResponse(ResponseType.CONVERSIONERROR));
-		} catch (Exception e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall.createResponse(ResponseType.UNKNOWN));
-		}
-		return ok(allUsers.render(NasaRegistration.getAllUser(), userForm));
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/app/models/NasaRegistration.java
----------------------------------------------------------------------
diff --git a/app/models/NasaRegistration.java b/app/models/NasaRegistration.java
deleted file mode 100644
index 60944be..0000000
--- a/app/models/NasaRegistration.java
+++ /dev/null
@@ -1,325 +0,0 @@
-/*
- * Copyright (c) 2013 Carnegie Mellon University Silicon Valley. 
- * All rights reserved. 
- * 
- * This program and the accompanying materials are made available
- * under the terms of dual licensing(GPL V2 for Research/Education
- * purposes). GNU Public License v2.0 which accompanies this distribution
- * is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
- * 
- * Please contact http://www.cmu.edu/silicon-valley/ if you have any 
- * questions.
- * 
- * */
-
-
-
-package models;
-
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-import java.util.ArrayList;
-import java.util.List;
-
-import models.metadata.ClimateService;
-import models.metadata.NasaRMdata;
-import util.APICall;
-
-import com.fasterxml.jackson.databind.JsonNode;
-
-public class NasaRegistration {
-	public String id;
-	public String userName;
-	public String password;
-	public String firstName;
-	public String lastName;
-	public String mName;
-	public String affliation;
-	public String email;
-	public String researchArea;
-	public String goal;
-	public String algo;
-	public String budgetConcerns;
-	public String awsFamiliarity;
-
-	private static final String GET_ALL_USER_DATA = "http://einstein.sv.cmu.edu:9000/getAllContestUsers/json";
-	private static final String GET_ALL_USER_DATA_NEW = "http://localhost:9020/users/getAllUsers/json";
-	
-	private static final String ADD_USER_CALL = "http://einstein.sv.cmu.edu:9020/users/add";
-	private static final String UPDATE_USER_CALL = "http://einstein.sv.cmu.edu:9020/users/update/";
-	private static final String DELETE_USER_CALL = "http://einstein.sv.cmu.edu:9020/users/delete/";
-	
-	public NasaRegistration() {
-
-	}
-
-	public NasaRegistration(String userNameField, String passwordField,
-			String fNameField, String lNameField, String emailField,
-			String rAreaField, String goalField, String algoField,
-			String bConcernsField, String awsFamiliarityField,
-			String mNameField, String affiliationField) {
-		super();
-		this.userName = userNameField;
-		this.password = passwordField;
-		this.firstName = fNameField;
-		this.email = emailField;
-		this.mName = mNameField;
-		this.affliation = affiliationField;
-		this.researchArea = rAreaField;
-		this.goal = goalField;
-		this.algo = algoField;
-		this.budgetConcerns = bConcernsField;
-		this.awsFamiliarity = awsFamiliarityField;
-
-	}
-	
-	public String getId() {
-		return id;
-	}
-
-	public void setId(String id) {
-		this.id = id;
-	}
-
-	public void setMiddleName(String mName){
-		this.mName = mName;
-	}
-	
-	public String getMiddleName(){
-		return mName;
-	}
-	
-	public String getLastName() {
-		return lastName;
-	}
-
-	public void setLastName(String lastName) {
-		this.lastName = lastName;
-	}
-
-	public String getAffliation() {
-		return affliation;
-	}
-
-	public void setAffliation(String affliation) {
-		this.affliation = affliation;
-	}
-
-	public String getEmail() {
-		return email;
-	}
-
-	public void setEmail(String email) {
-		this.email = email;
-	}
-
-	public String getResearchArea() {
-		return researchArea;
-	}
-
-	public void setResearchArea(String researchArea) {
-		this.researchArea = researchArea;
-	}
-
-	public String getGoal() {
-		return goal;
-	}
-
-	public void setGoal(String goal) {
-		this.goal = goal;
-	}
-
-	public String getAlgo() {
-		return algo;
-	}
-
-	public void setAlgo(String algo) {
-		this.algo = algo;
-	}
-
-	public String getBudgetConcerns() {
-		return budgetConcerns;
-	}
-
-	public void setBudgetConcerns(String budgetConcerns) {
-		this.budgetConcerns = budgetConcerns;
-	}
-
-	public String getAwsFamiliarity() {
-		return awsFamiliarity;
-	}
-
-	public void setAwsFamiliarity(String awsFamiliarity) {
-		this.awsFamiliarity = awsFamiliarity;
-	}
-
-	public String getUserNameField() {
-		return userName;
-	}
-
-	public void setUserNameField(String userNameField) {
-		this.userName = userNameField;
-	}
-
-	public String getPasswordField() {
-		return password;
-	}
-
-	public void setPasswordField(String passwordField) {
-		this.password = passwordField;
-	}
-
-	public String getfNameField() {
-		return firstName;
-	}
-
-	public void setfNameField(String fNameField) {
-		this.firstName = fNameField;
-	}
-
-	public static List<NasaRegistration> all() {
-		List<NasaRegistration> allUsers = new ArrayList<NasaRegistration>();
-		
-		// Call the API to get the json string
-		JsonNode usersNode = APICall.callAPI(GET_ALL_USER_DATA_NEW);
-		// if no value is returned or error or is not json array
-		if (usersNode == null || usersNode.has("error") || !usersNode.isArray()) {
-			return allUsers;
-		}
-
-		// parse the json string into object
-		for (int i = 0; i < usersNode.size(); i++) {
-			JsonNode json = usersNode.path(i);
-			NasaRegistration getUser = new NasaRegistration();
-
-			getUser.setUserNameField(json.findPath("userName").asText());
-			getUser.setPasswordField(json.findPath("password").asText());
-			getUser.setfNameField(json.findPath("firstName").asText());
-			getUser.setEmail("static email");
-			getUser.setGoal("static goal");
-
-			System.out.println("UserName:" + getUser.getfNameField());
-
-			allUsers.add(getUser);
-		}
-
-		return allUsers;
-
-	}
-	
-	public static List<NasaRegistration> getAllUser() {
-		List<NasaRegistration> allUsers = new ArrayList<NasaRegistration>();
-		
-		// Call the API to get the json string
-		JsonNode usersNode = APICall.callAPI(GET_ALL_USER_DATA_NEW);
-		// if no value is returned or error or is not json array
-		if (usersNode == null || usersNode.has("error") || !usersNode.isArray()) {
-			return allUsers;
-		}
-
-		// parse the json string into object
-		for (int i = 0; i < usersNode.size(); i++) {
-			JsonNode json = usersNode.path(i);
-			NasaRegistration getUser = new NasaRegistration();
-
-			getUser.setId(json.findPath("id").asText());
-			getUser.setUserNameField(json.findPath("userName").asText());
-			getUser.setPasswordField(json.findPath("password").asText());
-			getUser.setfNameField(json.findPath("firstName").asText());
-			getUser.setMiddleName(json.findPath("middleInitial").asText());
-			getUser.setLastName(json.findPath("lastName").asText());
-			getUser.setAffliation(json.findPath("affiliation").asText());
-			getUser.setEmail(json.findPath("email").asText());
-			getUser.setResearchArea(json.findPath("researchFields").asText());
-
-			//System.out.println("UserName:" + getUser.getfNameField());
-
-			allUsers.add(getUser);
-		}
-
-		return allUsers;
-
-	}
-
-	public static String getUserInfo(String userName, String password) {
-		// System.out.println("Reached in getUserInfo:" + userName);
-		// System.out.println("Reached in password:" + password);
-
-		List<NasaRegistration> allUsers = new ArrayList<NasaRegistration>();
-		String GET_IND_USER_DATA = "http://einstein.sv.cmu.edu:9000/getContestUser/";
-		GET_IND_USER_DATA = GET_IND_USER_DATA + userName + '/' + password + '/'
-				+ "json";
-		// Call the API to get the json string
-		JsonNode usersNode = APICall.callAPI(GET_IND_USER_DATA);
-
-		System.out.println("Output1:" + GET_IND_USER_DATA);
-		// System.out.println("Value inside getUserInfo:" +
-		// usersNode.path(0).findPath("userName").asText());
-		System.out.println("Check:" + usersNode.toString());
-		// if no value is returned or error or is not json array
-		if (usersNode == null || usersNode.has("error")) {
-			System.out.println("inside userNode check");
-			return null;
-		}
-		System.out.println("userName response:" + usersNode.get("userName"));
-		System.out.println("userName:" + userName);
-		System.out.println("password:" + usersNode.get("password"));
-
-		if (usersNode.get("userName").textValue().equals(userName)
-				&& usersNode.get("password").textValue().equals(password)) {
-			System.out.println("Comes inside the if block");
-			return usersNode.get("firstName").textValue();
-		} else {
-			System.out.println("Does not come inside the if clause");
-			return null;
-		}
-
-		// parse the json string into object
-		/*
-		 * for (int i = 0; i < usersNode.size(); i++) { JsonNode json =
-		 * usersNode.path(i); NasaRegistration getUser = new NasaRegistration();
-		 * 
-		 * getUser.setUserNameField(json.findPath("userName").asText());
-		 * getUser.setPasswordField(json.findPath("password").asText());
-		 * getUser.setfNameField(json.findPath("firstName").asText());
-		 * 
-		 * if(getUser.getUserNameField().equals(userName) &&
-		 * getUser.getPasswordField().equals(password)){
-		 * System.out.println("inside check of username and password"); return
-		 * true; } else return false;
-		 * 
-		 * System.out.println("UserName:" + getUser.getfNameField());
-		 * 
-		 * allUsers.add(getUser); }
-		 */
-
-	}
-	
-	public static NasaRegistration findUserByName(String userId){
-		List<NasaRegistration> allList = getAllUser();
-		for (NasaRegistration element : allList) {
-			String elementUri = element.getId();
-			if (elementUri.equals(userId))
-				return element;
-		}
-		return null;
-	}
-	
-	public static JsonNode create(JsonNode jsonData) {
-		return APICall.postAPI(ADD_USER_CALL, jsonData);
-	}
-
-	public static JsonNode update(String id, JsonNode jsonData) {
-		System.out.println(UPDATE_USER_CALL+id);
-		
-		return APICall.putAPI(UPDATE_USER_CALL+id, jsonData);
-	}
-	
-	public static JsonNode delete(JsonNode jsonData, String username, String password) throws UnsupportedEncodingException{
-		System.out.println(DELETE_USER_CALL+"userName/"+ URLEncoder.encode(username, "UTF-8") +"/password/"+ URLEncoder.encode(password, "UTF-8"));
-		return APICall.deleteAPI(DELETE_USER_CALL+"userName/"+ URLEncoder.encode(username, "UTF-8") +"/password/"+ URLEncoder.encode(password, "UTF-8"));
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/app/views/climate/addUserForm.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/addUserForm.scala.html b/app/views/climate/addUserForm.scala.html
deleted file mode 100644
index ac392e6..0000000
--- a/app/views/climate/addUserForm.scala.html
+++ /dev/null
@@ -1,31 +0,0 @@
-@(userForm: Form[NasaRegistration])
-@import helper._
-@import helper.twitterBootstrap._
-@main("Nasa Update Form"){
-
-
-
-    <div class="clearfix  " id="name_field">
-       
-                    
-    <legend>User Add Form</legend>
-    @helper.form(action = routes.NasaRegistrationController.addUser()){
-    <fieldset>
-    @helper.inputText(userForm("userNameField"),'_label -> "User Name*")
-    @helper.inputPassword(userForm("passwordField"), '_label -> "Password*")
-    @helper.inputText(userForm("fNameField"), '_label -> "First Name*")
-    @helper.inputText(userForm("mNameField"), '_label -> "Middle Name")
-    @helper.inputText(userForm("lNameField"), '_label -> "Last Name")
-
-    @textarea(
-                userForm("affliationField"), 
-                '_label -> "Affliation", 'cols -> 50, 'rows -> 5
-            )
-    @helper.inputText(userForm("emailField"), '_label -> "Email")
-    @helper.inputText(userForm("rAreaField"),  '_label -> "Research Area")
-    <input type="submit" class="btn btn-primary" value="Add">
-    <fieldset>
-    </div>
-}
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/app/views/climate/allUsers.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/allUsers.scala.html b/app/views/climate/allUsers.scala.html
deleted file mode 100644
index 64e33eb..0000000
--- a/app/views/climate/allUsers.scala.html
+++ /dev/null
@@ -1,82 +0,0 @@
-
-@(users: List[NasaRegistration], userForm: play.data.Form[NasaRegistration])
-
-@import helper._
-
-@scripts = {
-	<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
-	<script type="text/javascript">
-	$(document).ready(function(){
-		//alert($("#url").text());
-	});
-	</script>
-}
-
-@main("Climate Services", scripts) {
-	
-	@flash_message()   
-	 
-    <h1>@users.size() Users</h1>
-		<table class="table table-striped table-bordered table-condensed ex2">
-	<tr>
-		<td class="col-md-1">Id</td>
-		<td class="col-md-2">User Name</td>
-		<td class="col-md-2">Password</td>
-		<td class="col-md-2">First Name</td>
-		<td class="col-md-2">Middle Name</td>
-		<td class="col-md-2">Last Name</td>
-		<td class="col-md-2">Afflication</td>
-		<td class="col-md-4">Email</td>
-		<td class="col-md-2">Research Area</td>
-		@if(true){
-			<td class="col-md-3">Operation</td> 
-	     }
-	</tr>
-	@for(user <- users){
-	<tr>
-		<td>@user.getId()</td>
-		
-		<td><span class="@user.getId() editable" data-name='username'>@user.getUserNameField()</span></td>
-
-		<td><span class="@user.getId() editable" data-name='password'>@user.getPasswordField()</span></td>
-				
-		<td><span class="@user.getId() editable" data-name='firstName'>@user.getfNameField()</span></td>
-				
-		<td><span class="@user.getId() editable" data-name='middleInitial'>@user.getMiddleName()</span></td>
-				
-		<td><span class="@user.getId() editable" data-name='lastName'>@user.getLastName()</span></td>
-		
-		<td><span class="@user.getId() editable" data-name='affiliation'>@user.getAffliation()</span></td>
-				
-		<td><span class="@user.getId() editable" data-name='email'>@user.getEmail()</span></td>
-				
-		<td><span class="@user.getId() editable" data-name='researchFields'>@user.getResearchArea()</span></td>
-		
-		@if(true){ 
-			<td class="operation">
-				<input type="button" class="edit-btn btn btn-primary" value="Edit" 
-					data-pk='@user.getId()'
-					data-url='@routes.NasaRegistrationController.update()' 
-				>
-				@form(routes.NasaRegistrationController.delete()){ 
-					<!-- <input
-						name="idHolder" class="hidden" type="hidden"
-						value="@user.getId()">  -->
-					<input
-						name="userNameField" class="hidden" type="hidden"
-						value="@user.getUserNameField()"> 
-					<input
-						name="passwordField" class="hidden" type="hidden"
-						value="@user.getPasswordField()"> 
-					<input
-						type="submit" class="btn btn-danger delete-btn span2" value="Delete"
-						onclick="return confirm('Are you sure you want to delete this item?')">
-				}
-			</td> 
-		}
-				
-	</tr>
-	}
-    </table>
-    }
-

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/app/views/climate/deleteUser.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/deleteUser.scala.html b/app/views/climate/deleteUser.scala.html
deleted file mode 100644
index 2f1360a..0000000
--- a/app/views/climate/deleteUser.scala.html
+++ /dev/null
@@ -1,23 +0,0 @@
-@(userForm: Form[NasaRegistration])
-@import helper._
-@import helper.twitterBootstrap._
-@main("Nasa Update Form"){
-
-
-
-    <div class="clearfix  " id="name_field">
-       
-                    
-    <legend>User Deletion Form</legend>
-    @helper.form(action = routes.NasaRegistrationController.delete()){
-    <fieldset>
-    @helper.inputText(userForm("userNameField"),'_label -> "User Name*")
-    @helper.inputPassword(userForm("passwordField"), '_label -> "Password*")
-    
-    
-    <input type="submit" class="btn btn-primary" value="Delete">
-    <fieldset>
-    </div>
-}
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/app/views/climate/estimate.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/estimate.scala.html b/app/views/climate/estimate.scala.html
deleted file mode 100644
index f7282bc..0000000
--- a/app/views/climate/estimate.scala.html
+++ /dev/null
@@ -1,119 +0,0 @@
-@(email: String, vfile: String, dataset: String)
-
-
-@import helper._ 
-
-@main("Estimator") {
-
-
-<ol class="breadcrumb">
-	<li><a href="/climate/tutorial">Tutorials</a></li>
-	<li><a href="/climate/climateServices">Model Analytics Services</a></li>
-	<li><a href="/climate/datasets">Datasets</a></li>
-	<li><a href="/climate/workflows">Workflows</a></li>
-	<li><a href="/climate/recommendation">Recommendation</a></li>
-	<li><a href="/climate/user">User Management</a></li>
-</ol>
-
-<div class="jumbotron">
-<div class="row">
-
-	<div class="col-lg-6">
-		<img src="/assets/images/NASA_JPL_logo.png" height="150" width="430">
-	</div>
-	<div class="col-lg-6">
-	<h1>Climate Model Analysis</h1>
-	<p>JPL has provided a repository of web services for multi-aspect physics-based and phenomenon-oriented
-	   phenomenon-oriented climate model performance evaluation and diagnosis through the comprehensive and 
-	   synergistic use of multiple observational data, reanalysis data, and model outputs.</p>
-	<p>
-		<a class="btn btn-lg btn-default"
-						href="/climate/tutorial" role="button">Getting Started &raquo;</a>
-	</p>
-	<!-- @if(!session.get("username")){ -->
-		<p>
-		    We will help you learn the available web services, how to use them, and help you to design 
-		    your climate analytics workflows.
-		<p>
-		<a class="btn btn-primary"
-						href="climate/register" role="button">Register &raquo;</a>
-	</p>
-	<!-- } -->
-	</div>
-</div>
-</div>
-
-<form method="POST" action="/climate/1" enctype="multipart/form-data">
-
-
-	<fieldset>
-		<legend>Estimator</legend>
-
-		<div class="clearfix" id="name_field">
-			<label for="name">Scripting file</label>
-			<div class="row">
-				<div class="input col-lg-2">
-
-					<input type="file" id="name" name="file" value="@vfile" placeholder="/Downloads/Workflowfiles"> <span
-						class="help-inline"></span> <span class="help-block">Required</span>
-				</div>
-				<div class="upload col-lg-2">
-					
-				</div>
-			</div>
-		</div>
-		<div class="clearfix" id="title_field">
-			<label for="title">Dataset</label>
-			<div class="row">
-				<div class="input col-lg-2">
-	 
-					<input type="text" id="title" name="title" value="@dataset" placeholder="/Downloads/Datasets"> <span
-						class="help-inline"></span> <span class="help-block">Required</span>
-				</div>
-			
-				<div class="upload col-lg-2">
-					<input type="button" class="btn" id="upload-dataset" name="upload-dataset" value="upload">
-				</div>
-			</div>
-		</div>
-		<div class="clearfix  " id="email_field">
-			<label for="email">Email</label>
-			<div class="input">
-
-				<input type="text" id="email" name="email" value="@email"> <span
-					class="help-inline"></span> <span class="help-block">Required</span>
-			</div>
-		</div>
-
-		<div class="clearfix  " id="organization_field">
-			<label for="organization">Organization</label>
-			<div class="input">
-
-				<input type="text" id="organization" name="organization" value="">
-
-				<span class="help-inline"></span> <span class="help-block"></span>
-			</div>
-		</div>
-
-		<div class="clearfix  " id="description_field">
-			<label for="description">Description</label>
-			<div class="input">
-
-				<textarea id="description" name="description" cols="65" rows="7"></textarea>
-
-				<span class="help-inline"></span> <span class="help-block"></span>
-			</div>
-		</div>
-
-	</fieldset>
-
-
-	<div class="actions">
-		<input type="submit" class="btn btn-primary"
-			value="Get Recommendation"> <a href="/estimator" class="btn">Thanks,
-			I know what to use</a>
-	</div>
-
-
-</form>
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/app/views/climate/estimate1.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/estimate1.scala.html b/app/views/climate/estimate1.scala.html
deleted file mode 100644
index ac42cd5..0000000
--- a/app/views/climate/estimate1.scala.html
+++ /dev/null
@@ -1,115 +0,0 @@
-@import helper._
-
-@main("Estimator") {
-
-<ol class="breadcrumb">
-	<li><a href="/estimator/tutorial">Tutorial</a></li>
-	<li><a href="/estimator">Collect Data</a></li>
-	<li class="active">Input preference</li>
-	<li><a href="/estimator/2">Workflow Summary</a></li>
-	<li><a href="/estimator/3">Recommendation</a></li>
-</ol>
-
-<form method="GET" role="form" action="/estimator/2">
-
-
-	<fieldset>
-		<legend>Tell us your preference</legend>
-
-		<p>In general, you have two options, on-demand and batch mode.
-			Under each mode, you can select CPU, memory, storage, and OS.</p>
-
-
-		<div class="form-group">
-			<label class="control-label" for="budget">1) Budget</label>
-			<div>
-				<span>$ </span><input type="text" class="input-xlarge" id="budget" placeholder="50">
-			</div>
-		</div>
-		<div class="form-group">
-			<label class="control-label">2) Flexible start
-				& end time?</label>
-
-			<div>
-				<label class="checkbox-inline"> <input type="checkbox"
-					id="yes-flexible"> yes
-				</label> <label class="checkbox-inline"> <input type="checkbox"
-					id="no-flexible"> no
-				</label>
-			</div>
-		</div>
-		
-		<div class="form-group">
-			<label class="control-label">3) Estimated Usage</label>
-			
-			<div class="form-horizontal">
-			<div class="form-group">
-				<label class="col-sm-2 control-label" for="cpu"> CPU </label>
-				<select id="cpu">
-					<option>1</option>
-					<option>2</option>
-					<option>4</option>
-					<option>More than 4</option>
-					<option>No idea</option>
-				</select>
-			</div>
-			
-			<div class="form-group">
-				<label class="col-sm-2 control-label" for="memory"> Memory (GiB) </label>
-				<select id="cpu">
-					<option>1.7</option>
-					<option>3.75</option>
-					<option>7.5</option>
-					<option>15</option>
-					<option>More than 15</option>
-					<option>No idea</option>
-				</select>
-				
-			</div>
-			
-			<div class="form-group">
-				<label class="col-sm-2 control-label" for="storage"> Storage (GiB) </label>
-				<select id="storage">
-					<option>1*4 SSD</option>
-					<option>1*32 SSD</option>
-					<option>1*160</option>
-					<option>1*410</option>
-					<option>No idea</option>
-				</select>
-			</div>
-			</div>
-		</div>
-			
-		<div class="form-group">
-			<label class="control-label">4) Operating System</label>
-			
-			<div>
-				<label class="checkbox-inline"> <input type="checkbox"
-					id="nix-os"> Linux/ Unix
-				</label> <label class="checkbox-inline"> <input type="checkbox"
-					id="windows-os"> Windows
-				</label>
-			</div>
-		</div>
-
-		<div class="form-group">
-			<label class="control-label" for="region">5) Region</label>
-			
-			<div>
-				<select id="region">
-					<option value="US West (North California)">US West (North
-						California)</option>
-					<option value="US West (Oregon)">US West (Oregon)</option>
-					<option value="US East (N. Virginia)">US East (N.
-						Virginia)</option>
-				</select>
-			</div>
-		</div>
-	</fieldset>
-
-	<div class="actions">
-		<input type="submit" class="btn primary" value="Submit"> <a
-			href="/estimator" class="btn">Cancel</a>
-	</div>
-</form>
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/app/views/climate/estimate2.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/estimate2.scala.html b/app/views/climate/estimate2.scala.html
deleted file mode 100644
index 2ebb333..0000000
--- a/app/views/climate/estimate2.scala.html
+++ /dev/null
@@ -1,32 +0,0 @@
-
-@import helper._
-
-@main("Estimator") {
-
-<ol class="breadcrumb">
-	<li><a href="/estimator/tutorial">Tutorial</a></li>
-	<li><a href="/estimator">Collect Data</a></li>
-	<li><a href="/estimator/1">Input preference</a></li>
-	<li class="active">Workflow Summary</li>
-	<li><a href="/estimator/3">Recommendation</a></li>
-</ol>
-
-<form method="GET" role="form" action="/estimator/3">
-
-<fieldset>
-	<div class="container">
-	<p>Here is the workflow summary</p>
-	<img alt="workflow summary" src='@routes.Assets.at("images/workflow_1.png")'  height="500" width="700">
-	<img alt="workflow summary" src='@routes.Assets.at("images/workflow_2.png")' height="500" width="700">
-	</div>
-	
-</fieldset>	
-	<br></br>
-	<div class="actions">
-		<input type="submit" class="btn btn-primary" value="See Recommendation" action="/estimator/3" style="position: relative; left: 15px">
-	</div>
-    
-</form>           
-		
-	
-	}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/app/views/climate/estimate3.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/estimate3.scala.html b/app/views/climate/estimate3.scala.html
deleted file mode 100644
index 10a68b0..0000000
--- a/app/views/climate/estimate3.scala.html
+++ /dev/null
@@ -1,171 +0,0 @@
-@import helper._
-
-@main("Estimator") {
-
-<ol class="breadcrumb">
-	<li><a href="/estimator/tutorial">Tutorial</a></li>
-	<li><a href="/estimator">Collect Data</a></li>
-	<li><a href="/estimator/1">Input Preference</a></li>
-	<li><a href="/estimator/2">Workflow Summary</a></li>
-	<li class="active">Recommendation</li>
-</ol>
-
-
-
-<body>
-	
-	
-	<div class="container">
-	<p>Virtual Machine Recommendation</p>
-<table cellspacing='0' class="table table-striped table-bordered table-condensed" align="center">
-                    <!-- cellspacing='0' is important, must stay -->
-
-                    <!-- Table Header -->
-                    <thead>
-                        <tr>
-                            <th></th>
-                            <th>vCPU</th>
-                            <th>ECU</th>
-                            <th>Memory(GiB)</th>
-                            <th>Storage</th>
-                            <th>Price</th>
-                            <th>Estimated Total Cost</th>
-                            <th></th>
-                        </tr>
-                    </thead>
-
-                    <tbody>
-                        
-                        <tr class="pure-table-odd">
-                            <td>
-                                m3.large
-                            </td>
-                            <td>
-                                2
-                            </td>
-                            <td>
-                                6.5
-                            </td>
-                            <td>
-                                7.5
-                            </td>
-                            <td>
-                               1*32 SSD
-                            </td>
-                            <td>
-                            $.225 per hour
-                            </td>
-                            <td>
-                            $88,000
-                            </td>
-                            <td>
-                            <button type="button" class="btn" onclick="" method="get">Use it</button>
-                            </td>
-                            
-                        </tr>
-
-
-                    </tbody>
-
-                </table>
-	
-	</div>
-	
-	<div class="container">
-	
-	<p><br><br>Other options</p>
-<table cellspacing='0' class="table table-striped table-bordered table-condensed" align="center" id="pubvalues">
-                    <!-- cellspacing='0' is important, must stay -->
-
-                    <!-- Table Header -->
-                    <thead>
-                        <tr>
-                            <th></th>
-                            <th>vCPU</th>
-                            <th>ECU</th>
-                            <th>Memory(GiB)</th>
-                            <th>Storage</th>
-                            <th>Price</th>
-                            <th>Estimated Total Cost</th>
-                            <th></th>
-                        </tr>
-                    </thead>
-
-                    <tbody>
-                        
-                        <tr class="pure-table-odd">
-                            <td>
-                                m3.medium
-                            </td>
-                            <td>
-                                1
-                            </td>
-                            <td>
-                                3
-                            </td>
-                            <td>
-                                3.75
-                            </td>
-                            <td>
-                               1*4 SSD
-                            </td>
-                            <td>
-                            $.113 per hour
-                            </td>
-                            <td>
-                            $68,000
-                            </td>
-                            <td>
-                            <button type="button" class="btn" onclick="" method="get">Use it</button>
-                            </td>
-                            
-                        </tr>
-
-
-                    </tbody>
-                    
-                    <tbody>
-                        
-                        <tr class="pure-table-odd">
-                            <td>
-                                m3.xlarge
-                            </td>
-                            <td>
-                                4
-                            </td>
-                            <td>
-                                13
-                            </td>
-                            <td>
-                                15
-                            </td>
-                            <td>
-                               4*40 SSD
-                            </td>
-                            <td>
-                            $.450 per hour
-                            </td>
-                            <td>
-                            $128,000
-                            </td>
-                            <td>
-                            <button type="button" class="btn" onclick="" method="get">Use it</button>
-                            </td>
-                            
-                        </tr>
-
-
-                    </tbody>
-
-                </table>
-                 <div class="actions" style="width: 571px; ">
-			<input type="submit" class="btn btn-primary"
-				value="I still want to check price manually">
-		</div>
-	
-	</div>
-			
-	
-	
-</body>
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/app/views/climate/header.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/header.scala.html b/app/views/climate/header.scala.html
index c168ecd..3a48830 100644
--- a/app/views/climate/header.scala.html
+++ b/app/views/climate/header.scala.html
@@ -54,25 +54,6 @@
 						</ul>
 					</li>
 					
-					<!-- 	
-					@if(!session.get("username")){
-					
-						<form class="navbar-form navbar-right" action="@routes.ClimateServiceController.authenticate()">
-							<button type="submit" class="btn btn-success">Log in</button>
-						</form>
-					}else{
-						<li><a href="/estimator/tutorial">Estimator</a></li>
-						<form class="navbar-form navbar-right" action="@routes.ClimateServiceController.logout()">
-							<button type="submit" class="btn btn-success">Log out</button>
-						</form>
-					}	
-										
-					@if(false){
-						<form class="navbar-form navbar-right" action="@routes.NasaRegistrationController.adminPage()">
-							<button type="submit" class="btn btn-success">Admin Console</button>
-						</form>
-					}						
-					 -->
 				</ul>
 			</div>
 			<!--/.nav-collapse -->

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/app/views/climate/login.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/login.scala.html b/app/views/climate/login.scala.html
deleted file mode 100644
index 689055f..0000000
--- a/app/views/climate/login.scala.html
+++ /dev/null
@@ -1,20 +0,0 @@
-@(form: Form[ClimateServiceController.Login])
-
-@main("Climate Service") {    
-    
-    @helper.form(routes.ClimateServiceController.authenticate) {
-        
-        <h1>Sign in</h1>
-
-        <p>
-            <input type="text" name="username" placeholder="Username">
-        </p>
-        <p>
-            <input type="password" name="password" placeholder="Password">
-        </p>
-        <p>
-            <button type="submit" class="btn btn-primary">Login</button>    
-        </p>
-        }
-        
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/app/views/climate/updateUserForm.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/updateUserForm.scala.html b/app/views/climate/updateUserForm.scala.html
deleted file mode 100644
index 1e0f85d..0000000
--- a/app/views/climate/updateUserForm.scala.html
+++ /dev/null
@@ -1,31 +0,0 @@
-@(userForm: Form[NasaRegistration])
-@import helper._
-@import helper.twitterBootstrap._
-@main("Nasa Update Form"){
-
-
-
-    <div class="clearfix  " id="name_field">
-       
-                    
-    <legend>User Update Form</legend>
-    @helper.form(action = routes.NasaRegistrationController.update()){
-    <fieldset>
-    @helper.inputText(userForm("userNameField"),'_label -> "User Name*")
-    @helper.inputPassword(userForm("passwordField"), '_label -> "Password*")
-    @helper.inputText(userForm("fNameField"), '_label -> "First Name*")
-    @helper.inputText(userForm("mNameField"), '_label -> "Middle Name")
-    @helper.inputText(userForm("lNameField"), '_label -> "Last Name")
-
-    @textarea(
-                userForm("affliationField"), 
-                '_label -> "Affliation", 'cols -> 50, 'rows -> 5
-            )
-    @helper.inputText(userForm("emailField"), '_label -> "Email")
-    @helper.inputText(userForm("rAreaField"),  '_label -> "Research Area")
-    <input type="submit" class="btn btn-primary" value="Update">
-    <fieldset>
-    </div>
-}
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/app/views/climate/userRegistrationForm.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/userRegistrationForm.scala.html b/app/views/climate/userRegistrationForm.scala.html
deleted file mode 100644
index a8e1112..0000000
--- a/app/views/climate/userRegistrationForm.scala.html
+++ /dev/null
@@ -1,31 +0,0 @@
-@(userForm: Form[NasaRegistration])
-@import helper._
-@import helper.twitterBootstrap._
-@main("Nasa User Registration Form"){
-
-
-
-    <div class="clearfix  " id="name_field">
-       
-                    
-    <legend>Registration Form</legend>
-    @helper.form(action = routes.NasaRegistrationController.submit()){
-    <fieldset>
-    @helper.inputText(userForm("userNameField"),'_label -> "User Name*")
-    @helper.inputPassword(userForm("passwordField"), '_label -> "Password*")
-    @helper.inputText(userForm("fNameField"), '_label -> "First Name*")
-    @helper.inputText(userForm("mNameField"), '_label -> "Middle Name")
-    @helper.inputText(userForm("lNameField"), '_label -> "Last Name")
-
-    @textarea(
-                userForm("affliationField"), 
-                '_label -> "Affliation", 'cols -> 50, 'rows -> 5
-            )
-    @helper.inputText(userForm("emailField"), '_label -> "Email")
-    @helper.inputText(userForm("rAreaField"),  '_label -> "Research Area")
-    <input type="submit" class="btn btn-primary" value="Register">
-    <fieldset>
-    </div>
-}
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/app/views/estimator/accountSummary.scala.html
----------------------------------------------------------------------
diff --git a/app/views/estimator/accountSummary.scala.html b/app/views/estimator/accountSummary.scala.html
deleted file mode 100644
index aa646e9..0000000
--- a/app/views/estimator/accountSummary.scala.html
+++ /dev/null
@@ -1,79 +0,0 @@
-@(userName: String)
-<br>@import helper._
-
-@main("Estimator") {
-
-
-<div class="jumbotron">
-	<div class="row">
-
-		<div class="col-lg-6">
-			<h2>User: @userName</h2>
-			<h1>Account Summary</h1>
-			<table cellspacing='0'
-				class="table table-striped table-bordered table-condensed"
-				align="center">
-				<!-- cellspacing='0' is important, must stay -->
-
-				<!-- Table Header -->
-				<thead>
-					<tr>
-						<th>Start Date</th>
-						<th>Start Time</th>
-						<th>AMI Instance</th>
-						<th>Duration</th>
-						<th>Cost</th>
-					</tr>
-				</thead>
-
-				<tbody>
-
-					<tr class="pure-table-odd">
-						<td>04/08/2014</td>
-						<td>9:34</td>
-						<td>m3.large</td>
-						<td>36 hours 5 minute</td>
-						<td>$36</td>
-					</tr>
-					<tr class="pure-table-odd">
-						<td>04/12/2014</td>
-						<td>16:26</td>
-						<td>m3.medium</td>
-						<td>24 hours 17 minute</td>
-						<td>$24</td>
-					</tr>
-					<tr class="pure-table-odd">
-						<td>04/15/2014</td>
-						<td>13:24</td>
-						<td>m3.large</td>
-						<td>10 hours 23 minute</td>
-						<td>$11</td>
-					</tr>
-					<tr class="pure-table-odd">
-						<td></td>
-						<td></td>
-						<td></td>
-						<td></td>
-						<td>Total: $89</td>
-					</tr>
-					<tr class="pure-table-odd">
-						<td></td>
-						<td></td>
-						<td></td>
-						<td></td>
-						<td>Budget left: $111</td>
-					</tr>
-				</tbody>
-			</table>
-		<button>New Task</button>
-		</div>
-		
-	<div class="col-lg-6" style = "padding-top: 2cm; padding-left: 2cm">
-		<img src="/assets/images/NASA_logo.png">
-	</div>
-	</div>
-
-</div>
-
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/app/views/estimator/estimate.scala.html
----------------------------------------------------------------------
diff --git a/app/views/estimator/estimate.scala.html b/app/views/estimator/estimate.scala.html
deleted file mode 100644
index dc2f58a..0000000
--- a/app/views/estimator/estimate.scala.html
+++ /dev/null
@@ -1,118 +0,0 @@
-@(email: String, vfile: String, dataset: String)
-
-
-@import helper._ 
-
-@main("Estimator") {
-
-
-<ol class="breadcrumb">
-	<li><a href="/estimator/tutorial">Tutorial</a></li>
-	<li class="active">Collect Data</li>
-	<li><a href="/estimator/1">Input preference</a></li>
-	<li><a href="/estimator/2">Workflow Summary</a></li>
-	<li><a href="/estimator/3">Recommendation</a></li>
-</ol>
-
-<div class="jumbotron">
-<div class="row">
-
-	<div class="col-lg-6">
-		<img src="/assets/images/NASA_logo.png">
-	</div>
-	<div class="col-lg-6">
-	<h1>We are ready to help you</h1>
-	<p>We have collected your workflow and datasets. Based on those
-		files, we can help you decide which virtual machine option is best for
-		you to use at Amazon EC2.</p>
-	<p>
-		<a class="btn btn-lg btn-default"
-						href="/estimator/tutorial" role="button">Getting Started &raquo;</a>
-	</p>
-	@if(!session.get("username")){
-		<p>Nasa Provides 200 AWS accounts with $150 credit each. First come first serve for contest participants.
-		Remaining slots: 150.
-		If you would like to get a credited account please register here.</p>
-		<p>
-		<a class="btn btn-primary"
-						href="estimator/register" role="button">Register &raquo;</a>
-	</p>
-	}
-	</div>
-</div>
-</div>
-
-<form method="POST" action="/estimator/1" enctype="multipart/form-data">
-
-
-	<fieldset>
-		<legend>Estimator</legend>
-
-		<div class="clearfix" id="name_field">
-			<label for="name">Scripting file</label>
-			<div class="row">
-				<div class="input col-lg-2">
-
-					<input type="file" id="name" name="file" value="@vfile" placeholder="/Downloads/Workflowfiles"> <span
-						class="help-inline"></span> <span class="help-block">Required</span>
-				</div>
-				<div class="upload col-lg-2">
-					
-				</div>
-			</div>
-		</div>
-		<div class="clearfix" id="title_field">
-			<label for="title">Dataset</label>
-			<div class="row">
-				<div class="input col-lg-2">
-	 
-					<input type="text" id="title" name="title" value="@dataset" placeholder="/Downloads/Datasets"> <span
-						class="help-inline"></span> <span class="help-block">Required</span>
-				</div>
-			
-				<div class="upload col-lg-2">
-					<input type="button" class="btn" id="upload-dataset" name="upload-dataset" value="upload">
-				</div>
-			</div>
-		</div>
-		<div class="clearfix  " id="email_field">
-			<label for="email">Email</label>
-			<div class="input">
-
-				<input type="text" id="email" name="email" value="@email"> <span
-					class="help-inline"></span> <span class="help-block">Required</span>
-			</div>
-		</div>
-
-		<div class="clearfix  " id="organization_field">
-			<label for="organization">Organization</label>
-			<div class="input">
-
-				<input type="text" id="organization" name="organization" value="">
-
-				<span class="help-inline"></span> <span class="help-block"></span>
-			</div>
-		</div>
-
-		<div class="clearfix  " id="description_field">
-			<label for="description">Description</label>
-			<div class="input">
-
-				<textarea id="description" name="description" cols="65" rows="7"></textarea>
-
-				<span class="help-inline"></span> <span class="help-block"></span>
-			</div>
-		</div>
-
-	</fieldset>
-
-
-	<div class="actions">
-		<input type="submit" class="btn btn-primary"
-			value="Get Recommendation"> <a href="/estimator" class="btn">Thanks,
-			I know what to use</a>
-	</div>
-
-
-</form>
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/app/views/estimator/estimate1.scala.html
----------------------------------------------------------------------
diff --git a/app/views/estimator/estimate1.scala.html b/app/views/estimator/estimate1.scala.html
deleted file mode 100644
index ac42cd5..0000000
--- a/app/views/estimator/estimate1.scala.html
+++ /dev/null
@@ -1,115 +0,0 @@
-@import helper._
-
-@main("Estimator") {
-
-<ol class="breadcrumb">
-	<li><a href="/estimator/tutorial">Tutorial</a></li>
-	<li><a href="/estimator">Collect Data</a></li>
-	<li class="active">Input preference</li>
-	<li><a href="/estimator/2">Workflow Summary</a></li>
-	<li><a href="/estimator/3">Recommendation</a></li>
-</ol>
-
-<form method="GET" role="form" action="/estimator/2">
-
-
-	<fieldset>
-		<legend>Tell us your preference</legend>
-
-		<p>In general, you have two options, on-demand and batch mode.
-			Under each mode, you can select CPU, memory, storage, and OS.</p>
-
-
-		<div class="form-group">
-			<label class="control-label" for="budget">1) Budget</label>
-			<div>
-				<span>$ </span><input type="text" class="input-xlarge" id="budget" placeholder="50">
-			</div>
-		</div>
-		<div class="form-group">
-			<label class="control-label">2) Flexible start
-				& end time?</label>
-
-			<div>
-				<label class="checkbox-inline"> <input type="checkbox"
-					id="yes-flexible"> yes
-				</label> <label class="checkbox-inline"> <input type="checkbox"
-					id="no-flexible"> no
-				</label>
-			</div>
-		</div>
-		
-		<div class="form-group">
-			<label class="control-label">3) Estimated Usage</label>
-			
-			<div class="form-horizontal">
-			<div class="form-group">
-				<label class="col-sm-2 control-label" for="cpu"> CPU </label>
-				<select id="cpu">
-					<option>1</option>
-					<option>2</option>
-					<option>4</option>
-					<option>More than 4</option>
-					<option>No idea</option>
-				</select>
-			</div>
-			
-			<div class="form-group">
-				<label class="col-sm-2 control-label" for="memory"> Memory (GiB) </label>
-				<select id="cpu">
-					<option>1.7</option>
-					<option>3.75</option>
-					<option>7.5</option>
-					<option>15</option>
-					<option>More than 15</option>
-					<option>No idea</option>
-				</select>
-				
-			</div>
-			
-			<div class="form-group">
-				<label class="col-sm-2 control-label" for="storage"> Storage (GiB) </label>
-				<select id="storage">
-					<option>1*4 SSD</option>
-					<option>1*32 SSD</option>
-					<option>1*160</option>
-					<option>1*410</option>
-					<option>No idea</option>
-				</select>
-			</div>
-			</div>
-		</div>
-			
-		<div class="form-group">
-			<label class="control-label">4) Operating System</label>
-			
-			<div>
-				<label class="checkbox-inline"> <input type="checkbox"
-					id="nix-os"> Linux/ Unix
-				</label> <label class="checkbox-inline"> <input type="checkbox"
-					id="windows-os"> Windows
-				</label>
-			</div>
-		</div>
-
-		<div class="form-group">
-			<label class="control-label" for="region">5) Region</label>
-			
-			<div>
-				<select id="region">
-					<option value="US West (North California)">US West (North
-						California)</option>
-					<option value="US West (Oregon)">US West (Oregon)</option>
-					<option value="US East (N. Virginia)">US East (N.
-						Virginia)</option>
-				</select>
-			</div>
-		</div>
-	</fieldset>
-
-	<div class="actions">
-		<input type="submit" class="btn primary" value="Submit"> <a
-			href="/estimator" class="btn">Cancel</a>
-	</div>
-</form>
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/app/views/estimator/estimate2.scala.html
----------------------------------------------------------------------
diff --git a/app/views/estimator/estimate2.scala.html b/app/views/estimator/estimate2.scala.html
deleted file mode 100644
index 2ebb333..0000000
--- a/app/views/estimator/estimate2.scala.html
+++ /dev/null
@@ -1,32 +0,0 @@
-
-@import helper._
-
-@main("Estimator") {
-
-<ol class="breadcrumb">
-	<li><a href="/estimator/tutorial">Tutorial</a></li>
-	<li><a href="/estimator">Collect Data</a></li>
-	<li><a href="/estimator/1">Input preference</a></li>
-	<li class="active">Workflow Summary</li>
-	<li><a href="/estimator/3">Recommendation</a></li>
-</ol>
-
-<form method="GET" role="form" action="/estimator/3">
-
-<fieldset>
-	<div class="container">
-	<p>Here is the workflow summary</p>
-	<img alt="workflow summary" src='@routes.Assets.at("images/workflow_1.png")'  height="500" width="700">
-	<img alt="workflow summary" src='@routes.Assets.at("images/workflow_2.png")' height="500" width="700">
-	</div>
-	
-</fieldset>	
-	<br></br>
-	<div class="actions">
-		<input type="submit" class="btn btn-primary" value="See Recommendation" action="/estimator/3" style="position: relative; left: 15px">
-	</div>
-    
-</form>           
-		
-	
-	}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/app/views/estimator/estimate3.scala.html
----------------------------------------------------------------------
diff --git a/app/views/estimator/estimate3.scala.html b/app/views/estimator/estimate3.scala.html
deleted file mode 100644
index 10a68b0..0000000
--- a/app/views/estimator/estimate3.scala.html
+++ /dev/null
@@ -1,171 +0,0 @@
-@import helper._
-
-@main("Estimator") {
-
-<ol class="breadcrumb">
-	<li><a href="/estimator/tutorial">Tutorial</a></li>
-	<li><a href="/estimator">Collect Data</a></li>
-	<li><a href="/estimator/1">Input Preference</a></li>
-	<li><a href="/estimator/2">Workflow Summary</a></li>
-	<li class="active">Recommendation</li>
-</ol>
-
-
-
-<body>
-	
-	
-	<div class="container">
-	<p>Virtual Machine Recommendation</p>
-<table cellspacing='0' class="table table-striped table-bordered table-condensed" align="center">
-                    <!-- cellspacing='0' is important, must stay -->
-
-                    <!-- Table Header -->
-                    <thead>
-                        <tr>
-                            <th></th>
-                            <th>vCPU</th>
-                            <th>ECU</th>
-                            <th>Memory(GiB)</th>
-                            <th>Storage</th>
-                            <th>Price</th>
-                            <th>Estimated Total Cost</th>
-                            <th></th>
-                        </tr>
-                    </thead>
-
-                    <tbody>
-                        
-                        <tr class="pure-table-odd">
-                            <td>
-                                m3.large
-                            </td>
-                            <td>
-                                2
-                            </td>
-                            <td>
-                                6.5
-                            </td>
-                            <td>
-                                7.5
-                            </td>
-                            <td>
-                               1*32 SSD
-                            </td>
-                            <td>
-                            $.225 per hour
-                            </td>
-                            <td>
-                            $88,000
-                            </td>
-                            <td>
-                            <button type="button" class="btn" onclick="" method="get">Use it</button>
-                            </td>
-                            
-                        </tr>
-
-
-                    </tbody>
-
-                </table>
-	
-	</div>
-	
-	<div class="container">
-	
-	<p><br><br>Other options</p>
-<table cellspacing='0' class="table table-striped table-bordered table-condensed" align="center" id="pubvalues">
-                    <!-- cellspacing='0' is important, must stay -->
-
-                    <!-- Table Header -->
-                    <thead>
-                        <tr>
-                            <th></th>
-                            <th>vCPU</th>
-                            <th>ECU</th>
-                            <th>Memory(GiB)</th>
-                            <th>Storage</th>
-                            <th>Price</th>
-                            <th>Estimated Total Cost</th>
-                            <th></th>
-                        </tr>
-                    </thead>
-
-                    <tbody>
-                        
-                        <tr class="pure-table-odd">
-                            <td>
-                                m3.medium
-                            </td>
-                            <td>
-                                1
-                            </td>
-                            <td>
-                                3
-                            </td>
-                            <td>
-                                3.75
-                            </td>
-                            <td>
-                               1*4 SSD
-                            </td>
-                            <td>
-                            $.113 per hour
-                            </td>
-                            <td>
-                            $68,000
-                            </td>
-                            <td>
-                            <button type="button" class="btn" onclick="" method="get">Use it</button>
-                            </td>
-                            
-                        </tr>
-
-
-                    </tbody>
-                    
-                    <tbody>
-                        
-                        <tr class="pure-table-odd">
-                            <td>
-                                m3.xlarge
-                            </td>
-                            <td>
-                                4
-                            </td>
-                            <td>
-                                13
-                            </td>
-                            <td>
-                                15
-                            </td>
-                            <td>
-                               4*40 SSD
-                            </td>
-                            <td>
-                            $.450 per hour
-                            </td>
-                            <td>
-                            $128,000
-                            </td>
-                            <td>
-                            <button type="button" class="btn" onclick="" method="get">Use it</button>
-                            </td>
-                            
-                        </tr>
-
-
-                    </tbody>
-
-                </table>
-                 <div class="actions" style="width: 571px; ">
-			<input type="submit" class="btn btn-primary"
-				value="I still want to check price manually">
-		</div>
-	
-	</div>
-			
-	
-	
-</body>
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/app/views/estimator/header.scala.html
----------------------------------------------------------------------
diff --git a/app/views/estimator/header.scala.html b/app/views/estimator/header.scala.html
deleted file mode 100644
index 5a02fe2..0000000
--- a/app/views/estimator/header.scala.html
+++ /dev/null
@@ -1,55 +0,0 @@
-
-@()
-	<div class="navbar navbar-default navbar-fixed-top" role="navigation">
-		<div class="container">
-			<div class="navbar-header">
-				<button type="button" class="navbar-toggle" data-toggle="collapse"
-					data-target=".navbar-collapse">
-					<span class="sr-only">Toggle navigation</span> <span
-						class="icon-bar"></span> <span class="icon-bar"></span> <span
-						class="icon-bar"></span>
-				</button>
-				<a class="navbar-brand" style="padding-bottom: 0;" href="/"><img
-					src='@routes.Assets.at("images/logo.png")' style="height: 28px; width: 40px;"></a>
-			</div>
-			<div class="navbar-collapse collapse" style="height:">
-				<ul class="nav navbar-nav navbar-right">
-
-					
-					<li class="dropdown"><a href="#"
-						class="dropdown-toggle" data-toggle="dropdown">Account Management<b
-							class="caret"></b></a>
-						<ul class="dropdown-menu">
-							<li><a href="@routes.NasaRegistrationController.updateForm()">Update User Details</a></li>
-							<li><a href="@routes.NasaRegistrationController.deleteForm()">Delete User</a></li>
-							<li><a href="@routes.EstimateController.accountSummary(session.get("username"))">Account Summary</a></li>
-						</ul>
-						</li>
-
-										<li><a>About Us</a></li>
-
-					
-						
-					@if(!session.get("username")){
-					
-						<form class="navbar-form navbar-right" action="@routes.EstimateController.login()">
-							<button type="submit" class="btn btn-success">Log in</button>
-						</form>
-					}else{
-						<li><a href="/estimator/tutorial">Estimator</a></li>
-						<form class="navbar-form navbar-right" action="@routes.EstimateController.logout()">
-							<button type="submit" class="btn btn-success">Log out</button>
-						</form>
-					}	
-					
-					@if(session.get("username") && session.get("username").equals("admin")){
-						<form class="navbar-form navbar-right" action="@routes.NasaRegistrationController.adminPage()">
-							<button type="submit" class="btn btn-success">Admin Console</button>
-						</form>
-					}						
-					
-				</ul>
-			</div>
-			<!--/.nav-collapse -->
-		</div>
-	</div>

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/app/views/estimator/login.scala.html
----------------------------------------------------------------------
diff --git a/app/views/estimator/login.scala.html b/app/views/estimator/login.scala.html
deleted file mode 100644
index 272fe9d..0000000
--- a/app/views/estimator/login.scala.html
+++ /dev/null
@@ -1,22 +0,0 @@
-@(form: Form[EstimateController.Login])
-
-@main("Estimator") {    
-    
-    @helper.form(routes.EstimateController.authenticate) {
-        
-        <h1>Sign in</h1>
-
-        
-        <p>
-            <input type="text" name="username" placeholder="Username">
-        </p>
-        <p>
-            <input type="password" name="password" placeholder="Password">
-        </p>
-        <p>
-            <button type="submit" class="btn btn-primary">Login</button>    
-        </p>
-        
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/app/views/estimator/main.scala.html
----------------------------------------------------------------------
diff --git a/app/views/estimator/main.scala.html b/app/views/estimator/main.scala.html
deleted file mode 100644
index 05ef784..0000000
--- a/app/views/estimator/main.scala.html
+++ /dev/null
@@ -1,60 +0,0 @@
-@(title: String, moreScripts: Html = Html(""))(content: Html) 
-
-<!DOCTYPE html>
-
-<html>
-<head>
-
-<title>@title</title>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
-
-<link rel="stylesheet"
-	href='@routes.Assets.at("stylesheets/bootstrap.css")'>
-<link rel="stylesheet"
-	href='@routes.Assets.at("stylesheets/navbar-fixed-top.css")'>
-<link rel="stylesheet"
-	href='@routes.Assets.at("stylesheets/custom.css")'>
-<link rel="stylesheet" media="screen"
-	href='@routes.Assets.at("stylesheets/main.css")'>
-<link rel="shortcut icon" type="image/png"
-	href='@routes.Assets.at("images/favicon.png")'>
-
-
-
-<link href='@routes.Assets.at("stylesheets/bootstrap-editable.css")'
-	rel="stylesheet" />
-
-<script src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'
-	type="text/javascript"></script>
-<script src='@routes.Assets.at("javascripts/bootstrap.min.js")'
-	type="text/javascript"></script>
-
-<script src='@routes.Assets.at("javascripts/bootstrap-editable.min.js")'></script>
-@moreScripts
-</head>
-
-<body>
-	@header()
-	
-
-
-	<div class="container">
-
-		@content
-
-		<!-- Footer -->
-		<div class="footer">
-			<div class="row">
-				<div class="col-lg-4 col-lg-offset-8">
-					<p class="text-muted" style="text-align: right; font-size: 14px;">&copy;
-						Carnegie Mellon University. Silicon Valley. 2014</p>
-				</div>
-			</div>
-		</div>
-
-	</div>
-
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/app/views/estimator/tutorial.scala.html
----------------------------------------------------------------------
diff --git a/app/views/estimator/tutorial.scala.html b/app/views/estimator/tutorial.scala.html
deleted file mode 100644
index a9d72ef..0000000
--- a/app/views/estimator/tutorial.scala.html
+++ /dev/null
@@ -1,24 +0,0 @@
-@main("Tutorial") {
-
-<ol class="breadcrumb">
-	<li class="active">Tutorial</li>
-	<li><a href="/estimator">Collect Data</a></li>
-	<li><a href="/estimator/1">Input Preference</a></li>
-	<li><a href="/estimator/2">Workflow Summary</a></li>
-	<li><a href="/estimator/3">Recommendation</a></li>
-</ol>
-
-<iframe width="600" height="400" src="http://www.youtube.com/embed/6A_KMshTN2g?rel=0" frameborder="0" allowfullscreen></iframe>
-
-<p>
-This video shows how to connect the vistrails workflow to the Einstein Website(http://einstein.sv.cmu.edu/estimator).
-
-<ul>
-<li>Run vistrails. (python VISTRAILS_PATH/vistrails/vistrails.py)</li>
-<li>Import a workflow.</li>
-<li>Click the menu Packages, and then Amazon Plugin. Inside that choose the 'Go to estimator'</li>
-<li>Input the notification email and click Estimate. Then you can be directed to the estimator web page.</li>
-</ul>
-</p>
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/app/views/registration/@(users
----------------------------------------------------------------------
diff --git a/app/views/registration/@(users b/app/views/registration/@(users
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/app/views/registration/adminPage.scala.html
----------------------------------------------------------------------
diff --git a/app/views/registration/adminPage.scala.html b/app/views/registration/adminPage.scala.html
deleted file mode 100644
index 79cf1ae..0000000
--- a/app/views/registration/adminPage.scala.html
+++ /dev/null
@@ -1,116 +0,0 @@
-@(users: List[models.NasaRegistration])
-@import helper._
-@import helper.twitterBootstrap._
-
-@main("Admin Page") {
-
-
-
-
-
-<body>
-	
-	
-	<div class="container">
-	<div class="container">
-	<legend>Current Usage Summary</legend>
-	<h1>@users.size() Active Users</h1>
-	<div><p><img alt="workflow summary" src='@routes.Assets.at("images/UsageSummart.png")'  height="250" width="250" align="left">
-	<h4> - 86 Slots available</h4><br></br>
-	<h4> - $14560 budget available</h4><br></br>
-	<h4>- 57% of 200 slots have been used</h4><br></br></p>
-	</div>
-	
-	<legend>Current Usage Details</legend>
-<table cellspacing='0' class="table table-striped table-bordered table-condensed" align="center">
-                    <!-- cellspacing='0' is important, must stay -->
-
-                    <!-- Table Header -->
-                    <thead>
-                        <tr>
-                            <th>User Name</th>
-                            <th>First Name</th>
-                            <th>Last Name</th>
-                            <th>Organization</th>
-                            <th>Occupation</th>
-                            <th>Highest Education</th>
-                            <th>Email</th>
-                            <th>Register Date</th>
-                            <th>Goal</th>
-                            <th>Usage</th>
-                            <th>Action</th>
-                            
-                        </tr>
-                    </thead>
-
-                    <tbody>
-                        <br></br>
-                        
-                        @for(user <- users) {
-						<tr>
-						<td>@user.getUserNameField</td>
-						<td>@user.getfNameField()</td>
-						<td>Last Name</td>
-						<td>Organization</td>
-						<td>Occupation</td>
-						<td>Occupation</td>
-						<td>@user.getEmail()</td>
-						<td>Registration Date</td>
-						<td>@user.getGoal()</td>
-						<td>Usage</td>
-						<td>
-                            <button type="button" class="btn" onclick="" method="POST" action = "">Cease</button>
-                            </td>
-						</tr>
-						}
-                        
-                        <tr>
-                            <td>
-                                02
-                            </td>
-                            <td>
-                                Jane
-                            </td>
-                            <td>
-                                Green
-                            </td>
-                            <td>
-                                CMU
-                            </td>
-                            <td>
-                              Faculty
-                            </td>
-                            <td>
-                            Master
-                            </td>
-                            <td>
-                            jane.gmail.com
-                            </td>
-                            <td>
-                            04/09/2014
-                            </td>
-                            <td>
-                            landscape data research
-                            </td>
-                            <td>
-                            100% of $200
-                            </td>
-                            <td>
-                            <button type="button" class="btn" onclick="" method="get">Fund</button>
-                            </td>
-                            
-                        </tr>
-
-
-                    </tbody>
-
-                </table>
-	
-	</div>
-	
-	
-			
-	
-	
-</body>
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/app/views/registration/delete.scala.html
----------------------------------------------------------------------
diff --git a/app/views/registration/delete.scala.html b/app/views/registration/delete.scala.html
deleted file mode 100644
index 2f1360a..0000000
--- a/app/views/registration/delete.scala.html
+++ /dev/null
@@ -1,23 +0,0 @@
-@(userForm: Form[NasaRegistration])
-@import helper._
-@import helper.twitterBootstrap._
-@main("Nasa Update Form"){
-
-
-
-    <div class="clearfix  " id="name_field">
-       
-                    
-    <legend>User Deletion Form</legend>
-    @helper.form(action = routes.NasaRegistrationController.delete()){
-    <fieldset>
-    @helper.inputText(userForm("userNameField"),'_label -> "User Name*")
-    @helper.inputPassword(userForm("passwordField"), '_label -> "Password*")
-    
-    
-    <input type="submit" class="btn btn-primary" value="Delete">
-    <fieldset>
-    </div>
-}
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/app/views/registration/header.scala.html
----------------------------------------------------------------------
diff --git a/app/views/registration/header.scala.html b/app/views/registration/header.scala.html
deleted file mode 100644
index c7979e1..0000000
--- a/app/views/registration/header.scala.html
+++ /dev/null
@@ -1,53 +0,0 @@
-
-@()
-	<div class="navbar navbar-default navbar-fixed-top" role="navigation">
-		<div class="container">
-			<div class="navbar-header">
-				<button type="button" class="navbar-toggle" data-toggle="collapse"
-					data-target=".navbar-collapse">
-					<span class="sr-only">Toggle navigation</span> <span
-						class="icon-bar"></span> <span class="icon-bar"></span> <span
-						class="icon-bar"></span>
-				</button>
-				<a class="navbar-brand" style="padding-bottom: 0;" href="/"><img
-					src='@routes.Assets.at("images/logo.png")' style="height: 28px;"></a>
-			</div>
-			<div class="navbar-collapse collapse" style="height:">
-				<ul class="nav navbar-nav navbar-right">
-
-					
-					<li class="dropdown"><a href="#"
-						class="dropdown-toggle" data-toggle="dropdown">Account Management<b
-							class="caret"></b></a>
-						<ul class="dropdown-menu">
-							<li><a href="@routes.NasaRegistrationController.updateForm()">Update User Details</a></li>
-							<li><a href="@routes.NasaRegistrationController.deleteForm()">Delete User</a></li>
-							<li><a href="@routes.EstimateController.accountSummary(session.get("username"))">Account Summary</a></li>
-						</ul>
-						</li>
-
-										<li><a>About Us</a></li>
-
-					@if(!session.get("username")){
-					
-						<form class="navbar-form navbar-right" action="@routes.EstimateController.login()">
-							<button type="submit" class="btn btn-success">Log in</button>
-						</form>
-					}else{
-						<li><a href="/estimator/tutorial">Estimator</a></li>
-						<form class="navbar-form navbar-right" action="@routes.EstimateController.logout()">
-							<button type="submit" class="btn btn-success">Log out</button>
-						</form>
-					}
-					
-					@if(session.get("username") && session.get("username").equals("admin")){
-						<form class="navbar-form navbar-right" action="@routes.NasaRegistrationController.adminPage()">
-							<button type="submit" class="btn btn-success">Admin Console</button>
-						</form>
-					}	
-					
-				</ul>
-			</div>
-			<!--/.nav-collapse -->
-		</div>
-	</div>

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/app/views/registration/main.scala.html
----------------------------------------------------------------------
diff --git a/app/views/registration/main.scala.html b/app/views/registration/main.scala.html
deleted file mode 100644
index 0a4dd2a..0000000
--- a/app/views/registration/main.scala.html
+++ /dev/null
@@ -1,58 +0,0 @@
-@(title: String, moreScripts: Html = Html(""))(content: Html) 
-
-<!DOCTYPE html>
-
-<html>
-<head>
-
-<title>@title</title>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
-
-<link rel="stylesheet"
-	href='@routes.Assets.at("stylesheets/bootstrap.css")'>
-<link rel="stylesheet"
-	href='@routes.Assets.at("stylesheets/navbar-fixed-top.css")'>
-<link rel="stylesheet"
-	href='@routes.Assets.at("stylesheets/custom.css")'>
-<link rel="stylesheet" media="screen"
-	href='@routes.Assets.at("stylesheets/main.css")'>
-<link rel="shortcut icon" type="image/png"
-	href='@routes.Assets.at("images/favicon.png")'>
-
-
-
-<link href='@routes.Assets.at("stylesheets/bootstrap-editable.css")'
-	rel="stylesheet" />
-
-<script src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'
-	type="text/javascript"></script>
-<script src='@routes.Assets.at("javascripts/bootstrap.min.js")'
-	type="text/javascript"></script>
-
-<script src='@routes.Assets.at("javascripts/bootstrap-editable.min.js")'></script>
-@moreScripts
-</head>
-
-<body>
-	@header()
-
-
-	<div class="container">
-
-		@content
-
-		<div class="footer">
-			<div class="row">
-				<div class="col-lg-4 col-lg-offset-8">
-					<p class="text-muted" style="text-align: right; font-size: 14px;">&copy;
-						Carnegie Mellon University. Silicon Valley. 2014</p>
-				</div>
-			</div>
-		</div>
-
-	</div>
-
-</body>
-</html>



[30/50] [abbrv] incubator-cmda git commit: Add LICENSE and NOTICE

Posted by xi...@apache.org.
Add LICENSE and NOTICE

Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/5fc73a2b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/5fc73a2b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/5fc73a2b

Branch: refs/heads/master
Commit: 5fc73a2b0006db87bd4ee8dd83d04ef338714dd5
Parents: cd1b303
Author: mingqi830 <mq...@andrew.cmu.edu>
Authored: Fri Sep 4 15:23:24 2015 -0700
Committer: mingqi830 <mq...@andrew.cmu.edu>
Committed: Fri Sep 4 15:23:24 2015 -0700

----------------------------------------------------------------------
 LICENSE | 202 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 NOTICE  |   6 ++
 2 files changed, 208 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/5fc73a2b/LICENSE
----------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/5fc73a2b/NOTICE
----------------------------------------------------------------------
diff --git a/NOTICE b/NOTICE
new file mode 100644
index 0000000..c0c89f8
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,6 @@
+Apache Climate Model Diagnostic Analyzer 
+Copyright 2015 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+


[39/50] [abbrv] incubator-cmda git commit: add comment to all html

Posted by xi...@apache.org.
add comment to all html


Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/07a31d14
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/07a31d14
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/07a31d14

Branch: refs/heads/master
Commit: 07a31d141a87ba0ea65d7696cf0257472813b5fa
Parents: 73a41cb
Author: cat1021 <lo...@gmail.com>
Authored: Fri Sep 4 16:27:14 2015 -0700
Committer: cat1021 <lo...@gmail.com>
Committed: Fri Sep 4 16:27:14 2015 -0700

----------------------------------------------------------------------
 app/views/climate/aboutus.scala.html               | 17 +++++++++++++++++
 app/views/climate/addClimateServices.scala.html    | 17 +++++++++++++++++
 app/views/climate/bugReporting.scala.html          | 16 ++++++++++++++++
 app/views/climate/bugs.scala.html                  | 16 ++++++++++++++++
 app/views/climate/climateServices.scala.html       | 16 ++++++++++++++++
 app/views/climate/conditionalSampling.scala.html   | 17 +++++++++++++++++
 .../climate/conditionalSampling2Var.scala.html     | 17 +++++++++++++++++
 app/views/climate/correlationMap.scala.html        | 17 +++++++++++++++++
 app/views/climate/dataRecommend.scala.html         | 17 +++++++++++++++++
 app/views/climate/dataSetList.scala.html           | 17 +++++++++++++++++
 app/views/climate/datasetTime.scala.html           | 17 +++++++++++++++++
 ...fferencePlotTwoTimeAveragedVariables.scala.html | 17 +++++++++++++++++
 app/views/climate/header.scala.html                | 16 ++++++++++++++++
 app/views/climate/home.scala.html                  | 17 +++++++++++++++++
 app/views/climate/main.scala.html                  | 17 +++++++++++++++++
 app/views/climate/mostPopularServices.scala.html   | 17 +++++++++++++++++
 .../climate/mostRecentlyAddedServices.scala.html   | 17 +++++++++++++++++
 .../climate/mostRecentlyUsedServices.scala.html    | 17 +++++++++++++++++
 app/views/climate/oneService.scala.html            | 17 +++++++++++++++++
 app/views/climate/recommend.scala.html             | 17 +++++++++++++++++
 app/views/climate/regridAndDownload.scala.html     | 17 +++++++++++++++++
 .../scatterAndHistogramTwoVariable.scala.html      | 17 +++++++++++++++++
 app/views/climate/searchDataSet.scala.html         | 17 +++++++++++++++++
 .../climate/searchGenerateWorkflow.scala.html      | 17 +++++++++++++++++
 app/views/climate/searchLogResult.scala.html       | 17 +++++++++++++++++
 .../climate/searchLogResultWorkflow.scala.html     | 17 +++++++++++++++++
 app/views/climate/searchServiceLog.scala.html      | 17 +++++++++++++++++
 app/views/climate/serviceLog.scala.html            | 17 +++++++++++++++++
 .../threeDVariableAerageVerticalProfile.scala.html | 17 +++++++++++++++++
 .../climate/threeDVariableTwoDSlice.scala.html     | 17 +++++++++++++++++
 .../climate/threeDVariableZonalMean.scala.html     | 17 +++++++++++++++++
 app/views/climate/tutorial.scala.html              | 17 +++++++++++++++++
 app/views/climate/twoDVariableMap.scala.html       | 17 +++++++++++++++++
 .../climate/twoDVariableTimeSeries.scala.html      | 17 +++++++++++++++++
 app/views/climate/twoDVariableZonelMean.scala.html | 17 +++++++++++++++++
 35 files changed, 591 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/aboutus.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/aboutus.scala.html b/app/views/climate/aboutus.scala.html
index b45679a..e5221ab 100644
--- a/app/views/climate/aboutus.scala.html
+++ b/app/views/climate/aboutus.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @(message: String)
 
 @main("About Us") {

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/addClimateServices.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/addClimateServices.scala.html b/app/views/climate/addClimateServices.scala.html
index 0bf0c45..9c7be00 100644
--- a/app/views/climate/addClimateServices.scala.html
+++ b/app/views/climate/addClimateServices.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @(climateServiceForm: play.data.Form[metadata.ClimateService])
 @import helper._
 

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/bugReporting.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/bugReporting.scala.html b/app/views/climate/bugReporting.scala.html
index 312c172..363460c 100644
--- a/app/views/climate/bugReporting.scala.html
+++ b/app/views/climate/bugReporting.scala.html
@@ -1,3 +1,19 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
 
 @(bugReportForm: play.data.Form[BugReport])
 

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/bugs.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/bugs.scala.html b/app/views/climate/bugs.scala.html
index 3c6d574..fd04769 100644
--- a/app/views/climate/bugs.scala.html
+++ b/app/views/climate/bugs.scala.html
@@ -1,3 +1,19 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
 
 @(bugReports: LinkedList[BugReport])
 

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/climateServices.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/climateServices.scala.html b/app/views/climate/climateServices.scala.html
index 9c47938..8af110c 100644
--- a/app/views/climate/climateServices.scala.html
+++ b/app/views/climate/climateServices.scala.html
@@ -1,3 +1,19 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
 
 @(climateServices: List[metadata.ClimateService], climateServiceForm: play.data.Form[metadata.ClimateService])
 

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/conditionalSampling.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/conditionalSampling.scala.html b/app/views/climate/conditionalSampling.scala.html
index 816316e..fe2ab7d 100644
--- a/app/views/climate/conditionalSampling.scala.html
+++ b/app/views/climate/conditionalSampling.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @(parameters: metadata.ConditionalSampling) @import helper._
 <link rel="stylesheet"
 	href='@routes.Assets.at("stylesheets/livefitler.css")'>

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/conditionalSampling2Var.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/conditionalSampling2Var.scala.html b/app/views/climate/conditionalSampling2Var.scala.html
index eec101f..1a7607b 100644
--- a/app/views/climate/conditionalSampling2Var.scala.html
+++ b/app/views/climate/conditionalSampling2Var.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @(parameters: metadata.ConditionalSampling2Var) @import helper._
 <link rel="stylesheet"
 	href='@routes.Assets.at("stylesheets/livefitler.css")'>

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/correlationMap.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/correlationMap.scala.html b/app/views/climate/correlationMap.scala.html
index 9e491b0..5b862da 100644
--- a/app/views/climate/correlationMap.scala.html
+++ b/app/views/climate/correlationMap.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @(parameters: metadata.CorrelationMap) @import helper._
 <link rel="stylesheet"
 	href='@routes.Assets.at("stylesheets/livefitler.css")'>

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/dataRecommend.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/dataRecommend.scala.html b/app/views/climate/dataRecommend.scala.html
index 4f4db50..83ddcd0 100644
--- a/app/views/climate/dataRecommend.scala.html
+++ b/app/views/climate/dataRecommend.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @(jsonData: String)
 @import helper._
 

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/dataSetList.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/dataSetList.scala.html b/app/views/climate/dataSetList.scala.html
index a3a1f2e..821183c 100644
--- a/app/views/climate/dataSetList.scala.html
+++ b/app/views/climate/dataSetList.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @(dataSets: List[DataSet], dataSetForm: play.data.Form[DataSet])
 
 @import helper._

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/datasetTime.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/datasetTime.scala.html b/app/views/climate/datasetTime.scala.html
index f714e75..cfa8375 100644
--- a/app/views/climate/datasetTime.scala.html
+++ b/app/views/climate/datasetTime.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @(message: String) 
 
 @scripts = {

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/differencePlotTwoTimeAveragedVariables.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/differencePlotTwoTimeAveragedVariables.scala.html b/app/views/climate/differencePlotTwoTimeAveragedVariables.scala.html
index fcfcdaf..5b26eb7 100644
--- a/app/views/climate/differencePlotTwoTimeAveragedVariables.scala.html
+++ b/app/views/climate/differencePlotTwoTimeAveragedVariables.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @(parameters: metadata.DiffPlotTwoTimeAveragedVar) @import helper._
 <link rel="stylesheet"
 	href='@routes.Assets.at("stylesheets/livefitler.css")'>

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/header.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/header.scala.html b/app/views/climate/header.scala.html
index 5b48ca5..d51a38d 100644
--- a/app/views/climate/header.scala.html
+++ b/app/views/climate/header.scala.html
@@ -1,3 +1,19 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
 
 @()
 	<div class="navbar navbar-default navbar-fixed-top" role="navigation">

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/home.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/home.scala.html b/app/views/climate/home.scala.html
index b7059af..1803838 100644
--- a/app/views/climate/home.scala.html
+++ b/app/views/climate/home.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @(email: String, vfile: String, dataset: String)
 
 @import helper._ 

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/main.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/main.scala.html b/app/views/climate/main.scala.html
index 0c5f5f5..121fc31 100644
--- a/app/views/climate/main.scala.html
+++ b/app/views/climate/main.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @(title: String, moreScripts: Html = Html(""))(content: Html) 
 
 <!DOCTYPE html>

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/mostPopularServices.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/mostPopularServices.scala.html b/app/views/climate/mostPopularServices.scala.html
index 92441dd..675c307 100644
--- a/app/views/climate/mostPopularServices.scala.html
+++ b/app/views/climate/mostPopularServices.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @(climateServices: List[metadata.ClimateService], climateServiceForm: play.data.Form[metadata.ClimateService])
 
 @import helper._

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/mostRecentlyAddedServices.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/mostRecentlyAddedServices.scala.html b/app/views/climate/mostRecentlyAddedServices.scala.html
index 6e2bd75..98d738a 100644
--- a/app/views/climate/mostRecentlyAddedServices.scala.html
+++ b/app/views/climate/mostRecentlyAddedServices.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @(climateServices: List[metadata.ClimateService], climateServiceForm: play.data.Form[metadata.ClimateService])
 
 @import helper._

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/mostRecentlyUsedServices.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/mostRecentlyUsedServices.scala.html b/app/views/climate/mostRecentlyUsedServices.scala.html
index ed4df90..0b65381 100644
--- a/app/views/climate/mostRecentlyUsedServices.scala.html
+++ b/app/views/climate/mostRecentlyUsedServices.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @(climateServices: List[metadata.ClimateService], climateServiceForm: play.data.Form[metadata.ClimateService])
 
 @import helper._

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/oneService.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/oneService.scala.html b/app/views/climate/oneService.scala.html
index 077c691..ecb9373 100644
--- a/app/views/climate/oneService.scala.html
+++ b/app/views/climate/oneService.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @(url: String) 
 
 @import helper._ 

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/recommend.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/recommend.scala.html b/app/views/climate/recommend.scala.html
index 55df4fa..d9ec392 100644
--- a/app/views/climate/recommend.scala.html
+++ b/app/views/climate/recommend.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @(jsonData: String)
 @import helper._
 

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/regridAndDownload.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/regridAndDownload.scala.html b/app/views/climate/regridAndDownload.scala.html
index eedbf15..0da46d4 100644
--- a/app/views/climate/regridAndDownload.scala.html
+++ b/app/views/climate/regridAndDownload.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @(parameters: metadata.RegridAndDownload) @import helper._
 <link rel="stylesheet"
 	href='@routes.Assets.at("stylesheets/livefitler.css")'>

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/scatterAndHistogramTwoVariable.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/scatterAndHistogramTwoVariable.scala.html b/app/views/climate/scatterAndHistogramTwoVariable.scala.html
index c10dcf0..edb1fc1 100644
--- a/app/views/climate/scatterAndHistogramTwoVariable.scala.html
+++ b/app/views/climate/scatterAndHistogramTwoVariable.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @(parameters: metadata.ScatterHistogramTwoVar) @import helper._
 <link rel="stylesheet"
 	href='@routes.Assets.at("stylesheets/livefitler.css")'>

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/searchDataSet.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/searchDataSet.scala.html b/app/views/climate/searchDataSet.scala.html
index 31b9265..8fb042d 100644
--- a/app/views/climate/searchDataSet.scala.html
+++ b/app/views/climate/searchDataSet.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @(dataSetForm: play.data.Form[DataSet])
 
 @import helper._

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/searchGenerateWorkflow.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/searchGenerateWorkflow.scala.html b/app/views/climate/searchGenerateWorkflow.scala.html
index 75f9862..a11b1ff 100644
--- a/app/views/climate/searchGenerateWorkflow.scala.html
+++ b/app/views/climate/searchGenerateWorkflow.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @(serviceLogForm: play.data.Form[metadata.ServiceLog])
 
 @import helper._

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/searchLogResult.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/searchLogResult.scala.html b/app/views/climate/searchLogResult.scala.html
index 3bdfed1..3e2a1a6 100644
--- a/app/views/climate/searchLogResult.scala.html
+++ b/app/views/climate/searchLogResult.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @(serviceLogs: List[metadata.ServiceLog])
 
 @import helper._

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/searchLogResultWorkflow.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/searchLogResultWorkflow.scala.html b/app/views/climate/searchLogResultWorkflow.scala.html
index fb443ce..18ace8e 100644
--- a/app/views/climate/searchLogResultWorkflow.scala.html
+++ b/app/views/climate/searchLogResultWorkflow.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @(serviceLogs: List[metadata.ServiceLog], userId: String, start: String, end: String, jsonData: String)
 
 @import helper._

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/searchServiceLog.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/searchServiceLog.scala.html b/app/views/climate/searchServiceLog.scala.html
index 62e02af..0e30c47 100644
--- a/app/views/climate/searchServiceLog.scala.html
+++ b/app/views/climate/searchServiceLog.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @(serviceLogForm: play.data.Form[metadata.ServiceLog])
 
 @import helper._

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/serviceLog.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/serviceLog.scala.html b/app/views/climate/serviceLog.scala.html
index b9845c8..0b02416 100644
--- a/app/views/climate/serviceLog.scala.html
+++ b/app/views/climate/serviceLog.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @(serviceLogs: List[metadata.ServiceLog], serviceLogForm: play.data.Form[metadata.ServiceLog])
 
 @import helper._

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/threeDVariableAerageVerticalProfile.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/threeDVariableAerageVerticalProfile.scala.html b/app/views/climate/threeDVariableAerageVerticalProfile.scala.html
index 2787829..74d3e5a 100644
--- a/app/views/climate/threeDVariableAerageVerticalProfile.scala.html
+++ b/app/views/climate/threeDVariableAerageVerticalProfile.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @(parameters: metadata.ThreeDVarAvgVertical4Profile) @import helper._
 <link rel="stylesheet"
 	href='@routes.Assets.at("stylesheets/livefitler.css")'>

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/threeDVariableTwoDSlice.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/threeDVariableTwoDSlice.scala.html b/app/views/climate/threeDVariableTwoDSlice.scala.html
index 9fbcbc1..d950b73 100644
--- a/app/views/climate/threeDVariableTwoDSlice.scala.html
+++ b/app/views/climate/threeDVariableTwoDSlice.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @(parameters: metadata.ThreeDVar2DSlice) @import helper._
 <link rel="stylesheet"
 	href='@routes.Assets.at("stylesheets/livefitler.css")'>

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/threeDVariableZonalMean.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/threeDVariableZonalMean.scala.html b/app/views/climate/threeDVariableZonalMean.scala.html
index c336e97..4ed6e83 100644
--- a/app/views/climate/threeDVariableZonalMean.scala.html
+++ b/app/views/climate/threeDVariableZonalMean.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @(parameters: metadata.ThreeDVarZonalMean) @import helper._
 <link rel="stylesheet"
 	href='@routes.Assets.at("stylesheets/livefitler.css")'>

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/tutorial.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/tutorial.scala.html b/app/views/climate/tutorial.scala.html
index ea692be..f515cac 100644
--- a/app/views/climate/tutorial.scala.html
+++ b/app/views/climate/tutorial.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @main("Tutorial") {
 
 <ol class="breadcrumb">

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/twoDVariableMap.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/twoDVariableMap.scala.html b/app/views/climate/twoDVariableMap.scala.html
index 9c6a5df..4721488 100644
--- a/app/views/climate/twoDVariableMap.scala.html
+++ b/app/views/climate/twoDVariableMap.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @(parameters: metadata.TwoDVarMap) @import helper._
 <link rel="stylesheet"
 	href='@routes.Assets.at("stylesheets/livefitler.css")'>

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/twoDVariableTimeSeries.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/twoDVariableTimeSeries.scala.html b/app/views/climate/twoDVariableTimeSeries.scala.html
index 2e2ee6d..bf44feb 100644
--- a/app/views/climate/twoDVariableTimeSeries.scala.html
+++ b/app/views/climate/twoDVariableTimeSeries.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @(parameters: metadata.TwoDVarTimeSeries) @import helper._
 <link rel="stylesheet"
 	href='@routes.Assets.at("stylesheets/livefitler.css")'>

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07a31d14/app/views/climate/twoDVariableZonelMean.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/twoDVariableZonelMean.scala.html b/app/views/climate/twoDVariableZonelMean.scala.html
index b689ea9..9c346d6 100644
--- a/app/views/climate/twoDVariableZonelMean.scala.html
+++ b/app/views/climate/twoDVariableZonelMean.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @(parameters: metadata.TwoDVarZonalMean) @import helper._
 <link rel="stylesheet"
 	href='@routes.Assets.at("stylesheets/livefitler.css")'>


[34/50] [abbrv] incubator-cmda git commit: modify aboutUs

Posted by xi...@apache.org.
modify aboutUs


Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/19897dad
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/19897dad
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/19897dad

Branch: refs/heads/master
Commit: 19897dadafffc421fbc57e10fa2b141eff5743a8
Parents: bf0dfe2
Author: cat1021 <lo...@gmail.com>
Authored: Fri Sep 4 15:55:33 2015 -0700
Committer: cat1021 <lo...@gmail.com>
Committed: Fri Sep 4 15:55:33 2015 -0700

----------------------------------------------------------------------
 app/views/climate/header.scala.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/19897dad/app/views/climate/header.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/header.scala.html b/app/views/climate/header.scala.html
index 3a48830..5b48ca5 100644
--- a/app/views/climate/header.scala.html
+++ b/app/views/climate/header.scala.html
@@ -49,7 +49,7 @@
 							class="caret"></b></a>
 						<ul class="dropdown-menu">
 						<li><a href="@routes.ClimateServiceController.home()">Home</a></li>
-						<li><a href="@routes.AboutusController.aboutus()">About Us</a></li>
+						<li><a href="@routes.AboutusController.aboutUs()">About Us</a></li>
 						<li><a href="@routes.AboutusController.aboutProject()">About project</a></li>
 						</ul>
 					</li>


[24/50] [abbrv] incubator-cmda git commit: modify pages

Posted by xi...@apache.org.
modify pages


Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/d61616a8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/d61616a8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/d61616a8

Branch: refs/heads/master
Commit: d61616a8340c0087f4f493f411fac1cd328c5dbf
Parents: f22b3e3
Author: cat1021 <lo...@gmail.com>
Authored: Thu Sep 3 17:04:07 2015 -0700
Committer: cat1021 <lo...@gmail.com>
Committed: Thu Sep 3 17:04:07 2015 -0700

----------------------------------------------------------------------
 .../climate/DifferencePlotTwoTimeAveragedVariables.scala.html  | 6 +++---
 app/views/climate/conditionalSampling.scala.html               | 6 +++---
 app/views/climate/conditionalSampling2Var.scala.html           | 6 +++---
 app/views/climate/correlationMap.scala.html                    | 6 +++---
 app/views/climate/regridAndDownload.scala.html                 | 6 +++---
 app/views/climate/scatterAndHistogramTwoVariable.scala.html    | 6 +++---
 .../climate/threeDVariableAerageVerticalProfile.scala.html     | 6 +++---
 7 files changed, 21 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/d61616a8/app/views/climate/DifferencePlotTwoTimeAveragedVariables.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/DifferencePlotTwoTimeAveragedVariables.scala.html b/app/views/climate/DifferencePlotTwoTimeAveragedVariables.scala.html
index 0a64039..07a327d 100644
--- a/app/views/climate/DifferencePlotTwoTimeAveragedVariables.scala.html
+++ b/app/views/climate/DifferencePlotTwoTimeAveragedVariables.scala.html
@@ -6,7 +6,7 @@
 <script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
 <script type="text/javascript"
 	src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
-<script type="text/javascript" src="https:
+<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js"></script>
 	<script type="
 	text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
 <script type="text/javascript"
@@ -934,7 +934,7 @@
         $("#Response").html("Calculating ...");
         $("#data_url").html("Calculating ...");
         $("#Image").html("");
-        var url = "http:
+        var url = "http://" + window.location.hostname + ":9002/svc/diffPlot2V?";
         var d1 = $("#data1").val();
         var model1 = d1.replace("/", "_");
         model1 = model1.toLowerCase();
@@ -982,7 +982,7 @@
         arglist = arglist.concat("&purpose=");
         arglist = arglist.concat(purpose);
         url = url + encodeURI(arglist);
-        var urlTimeBounds = "http:
+        var urlTimeBounds = "http://" + window.location.hostname + ":9002/svc/two_time_bounds?";
         var arglistTB = "";
         arglistTB = arglistTB.concat("serviceType=");
         arglistTB = arglistTB.concat("2");

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/d61616a8/app/views/climate/conditionalSampling.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/conditionalSampling.scala.html b/app/views/climate/conditionalSampling.scala.html
index 5ed7ce7..816316e 100644
--- a/app/views/climate/conditionalSampling.scala.html
+++ b/app/views/climate/conditionalSampling.scala.html
@@ -6,7 +6,7 @@
 <script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
 <script type="text/javascript"
 	src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
-<script type="text/javascript" src="https:
+<script type="text/javascript" src= "https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js"></script>
 	<script type="
 	text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
 <script type="text/javascript"
@@ -1113,7 +1113,7 @@
         $("#Response").html("Calculating ...");
         $("#data_url").html("Calculating ...");
         $("#Image").html("");
-        var url = "http:
+        var url = "http://" + window.location.hostname + ":9002/svc/conditionalSampling?";
         var d1 = $("#data1").val();
         var model1 = d1.replace("/", "_");
         model1 = model1.toLowerCase();
@@ -1278,7 +1278,7 @@
         arglist = arglist.concat("&purpose=");
         arglist = arglist.concat(purpose);
         url = url + encodeURI(arglist);
-        var urlTimeBounds = "http:
+        var urlTimeBounds = "http://" + window.location.hostname + ":9002/svc/two_time_bounds?";
         var arglistTB = "";
         arglistTB = arglistTB.concat("serviceType=");
         arglistTB = arglistTB.concat("1");

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/d61616a8/app/views/climate/conditionalSampling2Var.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/conditionalSampling2Var.scala.html b/app/views/climate/conditionalSampling2Var.scala.html
index 9addb1d..eec101f 100644
--- a/app/views/climate/conditionalSampling2Var.scala.html
+++ b/app/views/climate/conditionalSampling2Var.scala.html
@@ -6,7 +6,7 @@
 <script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
 <script type="text/javascript"
 	src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
-<script type="text/javascript" src="https:
+<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js"></script>
 	<script type="
 	text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
 <script type="text/javascript"
@@ -609,7 +609,7 @@
         $("#Response").html("Calculating ...");
         $("#data_url").html("Calculating ...");
         $("#Image").html("");
-        var url = "http:
+        var url = "http://" + window.location.hostname + ":9002/svc/conditionalSampling2Var?";
         var d1 = $("#data1").val();
         var model1 = d1.replace("/", "_");
         model1 = model1.toLowerCase();
@@ -771,7 +771,7 @@
         arglist = arglist.concat("&displayOpt=");
         arglist = arglist.concat(dispOptString);
         url = url + encodeURI(arglist);
-        var urlTimeBounds = "http:
+        var urlTimeBounds = "http://" + window.location.hostname + ":9002/svc/two_time_bounds?";
         var arglistTB = "";
         arglistTB = arglistTB.concat("serviceType=");
         arglistTB = arglistTB.concat("1");

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/d61616a8/app/views/climate/correlationMap.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/correlationMap.scala.html b/app/views/climate/correlationMap.scala.html
index ec00da9..9e491b0 100644
--- a/app/views/climate/correlationMap.scala.html
+++ b/app/views/climate/correlationMap.scala.html
@@ -7,7 +7,7 @@
 <script type="text/javascript"
 	src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
 <script type="text/javascript"
-	src='https:
+	src='https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js'></script>
 	<script type="text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
 <script type="text/javascript"
 	src='@routes.Assets.at("javascripts/xmisc.js")'></script>
@@ -330,7 +330,7 @@
         $("#Response").html("Calculating ...");
         $("#data_url").html("Calculating ...");
         $("#Image").html("");
-        var url = "http:
+        var url = "http://" + window.location.hostname + ":9002/svc/correlationMap?";
         var d1 = $("#data1").val();
         var model1 = d1.replace("/", "_");
         model1 = model1.toLowerCase();
@@ -383,7 +383,7 @@
         arglist = arglist.concat("&purpose=");
         arglist = arglist.concat(purpose);
         url = url + encodeURI(arglist);
-        var urlTimeBounds = "http:
+        var urlTimeBounds = "http://" + window.location.hostname + ":9002/svc/two_time_bounds?";
         var arglistTB = "";
         arglistTB = arglistTB.concat("serviceType=");
         arglistTB = arglistTB.concat("2");

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/d61616a8/app/views/climate/regridAndDownload.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/regridAndDownload.scala.html b/app/views/climate/regridAndDownload.scala.html
index 32ab4d8..eedbf15 100644
--- a/app/views/climate/regridAndDownload.scala.html
+++ b/app/views/climate/regridAndDownload.scala.html
@@ -6,7 +6,7 @@
 <script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
 <script type="text/javascript"
 	src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
-<script type="text/javascript" src="https:
+<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js"></script>
 <script type="
 	text/javascript"
 	src='@routes.Assets.at("javascripts/json2.js")'></script>
@@ -205,7 +205,7 @@ function disable_download_button()
         disable_download_button();
         $("#Response").html("Calculating ...");
         $("#data_url").html("Calculating ...");
-        var url = "http:
+        var url = "http://" + window.location.hostname + ":9002/svc/regridAndDownload?";
         var d1 = $("#data1").val();
         var model1 = d1.replace("/", "_");
         model1 = model1.toLowerCase();
@@ -248,7 +248,7 @@ function disable_download_button()
         arglist = arglist.concat("&purpose=");
         arglist = arglist.concat(purpose);
         url = url + encodeURI(arglist);
-        var urlTimeBounds = "http:
+        var urlTimeBounds = "http://" + window.location.hostname + ":9002/svc/time_bounds?"; 
         var arglistTB = "";
         arglistTB = arglistTB.concat("serviceType=");
         arglistTB = arglistTB.concat("1");

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/d61616a8/app/views/climate/scatterAndHistogramTwoVariable.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/scatterAndHistogramTwoVariable.scala.html b/app/views/climate/scatterAndHistogramTwoVariable.scala.html
index 5baf9b5..c10dcf0 100644
--- a/app/views/climate/scatterAndHistogramTwoVariable.scala.html
+++ b/app/views/climate/scatterAndHistogramTwoVariable.scala.html
@@ -6,7 +6,7 @@
 <script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
 <script type="text/javascript"
 	src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
-<script type="text/javascript" src="https:
+<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js"></script>
 	<script type="
 	text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
 <script type="text/javascript" src="@routes.Assets.at("javascripts/xmisc.js")"></script>
@@ -944,7 +944,7 @@
         $("#Response").html("Calculating ...");
         $("#data_url").html("Calculating ...");
         $("#Image").html("");
-        var url = "http:
+        var url = "http://" + window.location.hostname + ":9002/svc/scatterPlot2V?";
         var d1 = $("#data1").val();
         var model1 = d1.replace("/", "_");
         model1 = model1.toLowerCase();
@@ -995,7 +995,7 @@
         arglist = arglist.concat("&purpose=");
         arglist = arglist.concat(purpose);
         url = url + encodeURI(arglist);
-        var urlTimeBounds = "http:
+        var urlTimeBounds = "http://" + window.location.hostname + ":9002/svc/two_time_bounds?";
         var arglistTB = "";
         arglistTB = arglistTB.concat("serviceType=");
         arglistTB = arglistTB.concat("2");

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/d61616a8/app/views/climate/threeDVariableAerageVerticalProfile.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/threeDVariableAerageVerticalProfile.scala.html b/app/views/climate/threeDVariableAerageVerticalProfile.scala.html
index 47780e1..2787829 100644
--- a/app/views/climate/threeDVariableAerageVerticalProfile.scala.html
+++ b/app/views/climate/threeDVariableAerageVerticalProfile.scala.html
@@ -6,7 +6,7 @@
 <script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
 <script type="text/javascript"
 	src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
-<script type="text/javascript" src="https:
+<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js"></script>
 	<script type="
 	text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
 <script type="text/javascript" src="@routes.Assets.at("javascripts/xmisc.js")"></script>
@@ -368,7 +368,7 @@
         $("#Response").html("Calculating ...");
         $("#data_url").html("Calculating ...");
         $("#Image").html("");
-        var url = "http:
+        var url = "http://" + window.location.hostname + ":9002/svc/threeDimVerticalProfile?";
         var d1 = $("#data").val();
         var model1 = d1.replace("/", "_");
         var arglist = "";
@@ -458,7 +458,7 @@
         arglist = arglist.concat("&purpose=");
         arglist = arglist.concat(purpose);
         url = url + encodeURI(arglist);
-        var urlTimeBounds = "http:
+        var urlTimeBounds = "http://" + window.location.hostname + ":9002/svc/time_bounds?";
         var arglistTB = "";
         arglistTB = arglistTB.concat("serviceType=");
         arglistTB = arglistTB.concat("1");


[14/50] [abbrv] incubator-cmda git commit: delete comments

Posted by xi...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/f22b3e32/app/views/climate/twoDVariableMap.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/twoDVariableMap.scala.html b/app/views/climate/twoDVariableMap.scala.html
index 83bcd96..eeaab63 100644
--- a/app/views/climate/twoDVariableMap.scala.html
+++ b/app/views/climate/twoDVariableMap.scala.html
@@ -1,37 +1,26 @@
-@(parameters: metadata.TwoDVarMap)
-
-@import helper._
-
+@(parameters: metadata.TwoDVarMap) @import helper._
 <link rel="stylesheet"
 	href='@routes.Assets.at("stylesheets/livefitler.css")'>
-
 @scripts = {
-	<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
-	<script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
-	<script type="text/javascript" src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
-	<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js"></script>
-	<script type="text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
-	<script type="text/javascript" src='@routes.Assets.at("javascripts/xmisc.js")'></script>
-	<script type="text/javascript">
+<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
+<script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
+<script type="text/javascript"
+	src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
+<script type="text/javascript" src="https:
+	<script type="
+	text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
+<script type="text/javascript"
+	src='@routes.Assets.at("javascripts/xmisc.js")'></script>
+<script type="text/javascript">
 	var Response = null;
     var variable = "";
-
-    // called on load or reload
     window.onload = function() {
-      //select_all_months();
-      
-      // no data to download yet
-      //disable_download_button();
-      
       var z=document.getElementById("download_data");
       z.disabled=false;
-      
       changeDataSource();
       select_data();
       changeVariableName();
       select_var();
-      
-      
       $('#t0').val($('#startYearMonth').text());
       $('#t1').val($('#endYearMonth').text());
       var selectMonths = $('#selectMonths').text();
@@ -56,13 +45,9 @@
       $('#Image').html('<img src="'+imageUrl+'" width=680 />');
       $('#data_url').html($('#dataURL').text());
       $('#Response').html($('serviceResponseText').text());
-      
-      
     }
-    
     function changeDataSource(){
     	var dataSource = $('#dataSource').text();
-     	//dataSource = "NASA_QuikSCAT";
      	var x = document.getElementById("data");
      	if(dataSource == "NASA_MODIS" ){
      		x.options[0].selected=true;
@@ -133,9 +118,7 @@
      	else if(dataSource == "ECMWF_interim" ){
      		x.options[22].selected=true;
      	}
-        //$('#data option:contains('+dataSource+')').prop({selected: true});
     }
-    
     function changeVariableName(){
     	var var_string = $('#variableName').text();
      	var x=document.getElementById("var");
@@ -190,7 +173,6 @@
         else if (var_string == "rsut")
         	x.options[24].selected=true;
     }
-    
     function select_monthsByPara(){
     	var monthsByPara = $('#monthsPara').text();
     	if(monthsByPara.search("jan")>-1){
@@ -230,23 +212,16 @@
     		document.getElementById('Dec').checked = true;
     	}
     }
-
-    // disable download data button
     function disable_download_button()
     {
       var x=document.getElementById("download_data");
-      //x.disabled=true;
       x.disabled = false;
     }
-
-    // enable download data button
     function enable_download_button()
     {
       var x=document.getElementById("download_data");
       x.disabled=false;
     }
-
-    // select all months in the checkboxes
     function select_all_months()
     {
         document.getElementById('Jan').checked = true;
@@ -262,8 +237,6 @@
         document.getElementById('Nov').checked = true;
         document.getElementById('Dec').checked = true;
     }
-
-    // see if no month is selected
     function no_month_check()
     {
         if (document.getElementById('Jan').checked == false &&
@@ -278,14 +251,11 @@
            document.getElementById('Oct').checked == false &&
            document.getElementById('Nov').checked == false &&
            document.getElementById('Dec').checked == false) {
-           // alert("No month check!");
            return true;
           }
         else
            return false;
     }
-
-    // unselect all months in the checkboxes
     function reset_months()
     {
         document.getElementById('Jan').checked = false;
@@ -301,12 +271,9 @@
         document.getElementById('Nov').checked = false;
         document.getElementById('Dec').checked = false;
     }
-
-    // enable all vars in dropdown menu
     function reset_vars()
     {
       var x=document.getElementById("var");
-
       x.options[0].disabled=false;
       x.options[1].disabled=false;
       x.options[2].disabled=false;
@@ -333,15 +300,10 @@
       x.options[23].disabled=false;
       x.options[24].disabled=false;
     }
-
-    // form variable string based on "var" dropdown selection
     function select_var()
     {
       var var_string = $("#var").val();
-
-      // disable the download button because of this change
       disable_download_button();
-
       if (var_string == "Total Cloud Fraction")
         variable = "clt";
       else if (var_string == "Surface Temperature")
@@ -392,25 +354,13 @@
         variable = "rsutcs";
       else if (var_string == "TOA Outgoing Shortwave Radiation")
         variable = "rsut";
-
-      // alert("variable: " + variable)
     }
-
-    // set up "var" dropdown based status of "data" dropdown
     function select_data()
     {
       var data_string = $("#data").val();
       var x=document.getElementById("var");
-
-      // disable the download button because of this change
       disable_download_button();
-
-      // enable all options in "var" dropdown first
       reset_vars();
-
-      // alert(data_string);
-
-      // disable corresponding "var" options
       if (data_string == "NASA/AMSRE") {
         x.options[0].disabled=true;
         x.options[1].disabled=true;
@@ -436,7 +386,6 @@
         x.options[22].disabled=true;
         x.options[23].disabled=true;
         x.options[24].disabled=true;
-
         x.options[3].selected=true;
       }
       else if (data_string == "NASA/MODIS") {
@@ -463,9 +412,7 @@
         x.options[22].disabled=true;
         x.options[23].disabled=true;
         x.options[24].disabled=true;
-
         x.options[1].selected=true;
-        //x.options[8].selected=true;
       }
       else if (data_string == "NASA/TRMM") {
         x.options[0].selected=true;
@@ -522,7 +469,6 @@
         x.options[24].disabled=true;
       }
       else if (data_string == "NASA/QuikSCAT") {
-
         x.options[0].disabled=true;
         x.options[1].disabled=true;
         x.options[2].disabled=true;
@@ -545,10 +491,7 @@
         x.options[22].disabled=true;
         x.options[23].disabled=true;
         x.options[24].disabled=true;
-
         x.options[4].selected=true;
-        //x.options[5].selected=true;
-        //x.options[6].selected=true;
       }
       else if (data_string == "NASA/AVISO") {
         x.options[0].disabled=true;
@@ -575,11 +518,9 @@
         x.options[22].disabled=true;
         x.options[23].disabled=true;
         x.options[24].disabled=true;
-
         x.options[7].selected=true;
       }
       else if (data_string == "NASA/GRACE") {
-
         x.options[0].disabled=true;
         x.options[1].disabled=true;
         x.options[2].disabled=true;
@@ -603,12 +544,9 @@
         x.options[22].disabled=true;
         x.options[23].disabled=true;
         x.options[24].disabled=true;
-
         x.options[9].selected=true;
-        //x.options[10].selected=true;
       }
       else if (data_string == "NOAA/NODC") {
-
         x.options[0].disabled=true;
         x.options[1].disabled=true;
         x.options[2].disabled=true;
@@ -632,12 +570,9 @@
         x.options[22].disabled=true;
         x.options[23].disabled=true;
         x.options[24].disabled=true;
-
         x.options[11].selected=true;
-        //x.options[12].selected=true;
       }
       else if (data_string == "NASA/CERES") {
-
         x.options[0].disabled=true;
         x.options[1].disabled=true;
         x.options[2].disabled=true;
@@ -651,11 +586,9 @@
         x.options[10].disabled=true;
         x.options[11].disabled=true;
         x.options[12].disabled=true;
-
         x.options[13].selected=true;
       }
       else if (data_string == "ECMWF/interim") {
-
         x.options[0].disabled=true;
         x.options[1].disabled=true;
         x.options[2].disabled=true;
@@ -680,11 +613,9 @@
         x.options[22].disabled=true;
         x.options[23].disabled=true;
         x.options[24].disabled=true;
-
         x.options[3].selected=true;
       }
       else if (data_string == "CCCMA/CANAM4" || data_string == "CSIRO/MK3.6") {
-
         x.options[3].disabled=true;
         x.options[7].disabled=true;
         x.options[8].disabled=true;
@@ -692,235 +623,149 @@
         x.options[10].disabled=true;
         x.options[11].disabled=true;
         x.options[12].disabled=true;
-
         x.options[0].selected=true;
       }
-      // for all other models
       else {
         x.options[9].disabled=true;
         x.options[10].disabled=true;
         x.options[11].disabled=true;
         x.options[12].disabled=true;
-
         x.options[0].selected=true;
       }
-
-      // form variable string
       select_var();
     }
-
-    // select checkboxes based on "months" dropdown
     function select_months()
     {
       var s1=document.getElementById("months");
-      // alert(s1.selectedIndex);
-      // alert(s1.options[s1.selectedIndex].value);
-
-      // disable the download button because of this change
       disable_download_button();
-
-      // "select none"
       if (s1.selectedIndex == 1) {
         reset_months();
       }
-      // "select all"
       if (s1.selectedIndex == 0) {
         select_all_months();
       }
-      // "summer"
       if (s1.selectedIndex == 2) {
         reset_months();
         document.getElementById('Jun').checked = true;
         document.getElementById('Jul').checked = true;
         document.getElementById('Aug').checked = true;
       }
-      // "autumn"
       if (s1.selectedIndex == 3) {
         reset_months();
         document.getElementById('Sep').checked = true;
         document.getElementById('Oct').checked = true;
         document.getElementById('Nov').checked = true;
       }
-      // "winter"
       if (s1.selectedIndex == 4) {
         reset_months();
         document.getElementById('Dec').checked = true;
         document.getElementById('Jan').checked = true;
         document.getElementById('Feb').checked = true;
       }
-      // "spring"
       if (s1.selectedIndex == 5) {
         reset_months();
         document.getElementById('Mar').checked = true;
         document.getElementById('Apr').checked = true;
         document.getElementById('May').checked = true;
       }
-        
     }
-
-
-
     $(document).ready(function(){
-
-      /* $("a").click(function(event){
-        alert("As you can see, the link no longer took you to jquery.com");
-        event.preventDefault();
-      }); */
-
       $("#download_data").click(function(event) {
         var durl = $("#data_url").val();
-        // alert(durl);
         window.location.assign(durl);
       });
-
       $("#twodvarmap").click(function(event) {
 	Response = null;
-
-        // no data to download yet
         disable_download_button();
-
-        // flag error if no month box is checked
         if (no_month_check()) {
-           // $("#Response").html("<span style='color:red'>Error: please check at least one month.</span>");
            $("#Response").html("Error: please check at least one month.");
            $("#Image").html("");
            return;
         }
-
         $("#Response").html("Calculating ...");
         $("#data_url").html("Calculating ...");
         $("#Image").html("");
-
-        // sample url: http://cmacws.jpl.nasa.gov:8090/svc/twoDimMap?model=ukmo_hadgem2-a&var=ts&start_time=199001&end_time=199512&lon1=0&lon2=100&lat1=-29&lat2=29&months=1,2,4,5,6,10,12
-
-        // form url string
-        // var url = "http://cmacws.jpl.nasa.gov:8090/svc/twoDimMap?";
-        var url = "http://" + window.location.hostname + ":9002/svc/twoDimMap?";
-        //var url = "http://" + "einstein.sv.cmu.edu" + ":9002/svc/twoDimMap?";
-        //alert(url);
-
+        var url = "http:
         var d1 = $("#data").val();
         var model1 = d1.replace("/", "_");
-        // alert(model1);
-        // alert(d1);
-
         var arglist = "";
         arglist = arglist.concat("model=");
         arglist = arglist.concat(model1);
-
         var v1 = $("#var").val();
         arglist = arglist.concat("&var=");
         arglist = arglist.concat(variable);
-
         var t0 = $("#t0").val();
         var t1 = $("#t1").val();
-
         t0 = t0.replace("-", "");
         t1 = t1.replace("-", "");
-
         arglist = arglist.concat("&start_time=");
         arglist = arglist.concat(t0);
-
         arglist = arglist.concat("&end_time=");
         arglist = arglist.concat(t1);
-
         var lon0 = $("#lon0").val();
         var lon1 = $("#lon1").val();
         var lat0 = $("#lat0").val();
         var lat1 = $("#lat1").val();
-
         arglist = arglist.concat("&lon1=");
         arglist = arglist.concat(lon0);
-
         arglist = arglist.concat("&lon2=");
         arglist = arglist.concat(lon1);
-
         arglist = arglist.concat("&lat1=");
         arglist = arglist.concat(lat0);
-
         arglist = arglist.concat("&lat2=");
         arglist = arglist.concat(lat1);
-
         var s1 = document.getElementById('months');
-
-        // get months checked by client
         var month_str = "";
-
         var mm = document.getElementById('Jan');
         if (mm.checked == true)
           month_str = month_str.concat(",1");
-
         var mm = document.getElementById('Feb');
         if (mm.checked == true)
           month_str = month_str.concat(",2");
-
         var mm = document.getElementById('Mar');
         if (mm.checked == true)
           month_str = month_str.concat(",3");
-
         var mm = document.getElementById('Apr');
         if (mm.checked == true)
           month_str = month_str.concat(",4");
-
         var mm = document.getElementById('May');
         if (mm.checked == true)
           month_str = month_str.concat(",5");
-
         var mm = document.getElementById('Jun');
         if (mm.checked == true)
           month_str = month_str.concat(",6");
-
         var mm = document.getElementById('Jul');
         if (mm.checked == true)
           month_str = month_str.concat(",7");
-
         var mm = document.getElementById('Aug');
         if (mm.checked == true)
           month_str = month_str.concat(",8");
-
         var mm = document.getElementById('Sep');
         if (mm.checked == true)
           month_str = month_str.concat(",9");
-
         var mm = document.getElementById('Oct');
         if (mm.checked == true)
           month_str = month_str.concat(",10");
-
         var mm = document.getElementById('Nov');
         if (mm.checked == true)
           month_str = month_str.concat(",11");
-
         var mm = document.getElementById('Dec');
         if (mm.checked == true)
           month_str = month_str.concat(",12");
-
-        // remove the leading ','
         month_str = month_str.substr(1);
-        // alert(month_str);
-
         arglist = arglist.concat("&months=");
         arglist = arglist.concat(month_str);
-        // alert("arglist: " + arglist);
-
         arglist = arglist.concat("&scale=");
         var z = document.getElementById("radioLin").checked;
-        // alert(z);
         if (z == true)
           arglist = arglist.concat('0');
         else
           arglist = arglist.concat('4');
-
         var purpose = $("#purpose").val();
         arglist = arglist.concat("&purpose=");
         arglist = arglist.concat(purpose);
-
-        // url = url + encodeURIComponent(arglist);
         url = url + encodeURI(arglist);
-        // url = url + arglist;
-        //alert("url: " + url);
-
-        var urlTimeBounds = "http://" + window.location.hostname + ":9002/svc/time_bounds?";
-        //var urlTimeBounds = "http://" + "einstein.sv.cmu.edu" + ":9002/svc/time_bounds?";
+        var urlTimeBounds = "http:
         var arglistTB = "";
         arglistTB = arglistTB.concat("serviceType=");
         arglistTB = arglistTB.concat("1");
@@ -929,9 +774,6 @@
         arglistTB = arglistTB.concat("&var=");
         arglistTB = arglistTB.concat(variable);
         urlTimeBounds = urlTimeBounds + encodeURI(arglistTB);
-        // alert("urlTimeBounds: " + urlTimeBounds);
-
-
         $.ajax({
             type: "GET",
             url: urlTimeBounds,
@@ -939,9 +781,7 @@
             data: null,
             success: function(data, textStatus, xhr) {
                 Response = data;
-                // alert("data: " + data);
                 if (data.success == false) {
-                    // alert(data.error);
                     Response = null;
                     var text = JSON.stringify(data, null, 4);
                     text = "Error in backend: <br>" + text; 
@@ -950,44 +790,29 @@
                     return;
                 }
                 var text = JSON.stringify(data, null, 4);
-                // alert("text: " + text);
-                // $("#Response").html("<pre>"+text+"</pre>");
-                // $("#Response").html(text);
-
                 var tb = data.time_bounds;
                 var bds = String(tb).split(",");
-                // alert("tb: " + tb);
-                // alert("bds: " + bds);
                 var lowerT = parseInt(bds[0]);
                 var upperT = parseInt(bds[1]);
-                // alert("lowerT: " + lowerT);
-                // alert("upperT: " + upperT);
                 var t0I = parseInt(t0);
                 var t1I = parseInt(t1);
-                // alert("t0: " + t0I);
-                // alert("t1: " + t1I);
-
                 if ( lowerT == 0 && upperT ==0 ) {
                   alert("We do not have data for this source and variable configuration.");
                   return;
                 }
-
                 if (t0I < lowerT && t1I < lowerT ||
                     t0I > upperT && t1I > upperT) {
                   alert("We do not have data that span your time range. Try the range inside ["+lowerT+", "+upperT+"].");
                   return;
                 }
-
                 if (t0I < lowerT && t1I <= upperT) {
                   alert("Your start year-month is out of bound. It has to be in or later than " + lowerT +
                         ". We will use the range ["+lowerT+", "+t1I+"] for you.");
                 }
-
                 if (t1I > upperT && t0I >= lowerT) {
                   alert("Your end year-month is out of bound. It has to be in or earlier than " + upperT +
                         ". We will use the range ["+t0I+", "+upperT+"] for you.");
                 }
-
                 if (t0I < lowerT && t1I > upperT ) {
                   alert("Both of your start and end year-months are out of bounds. They have to be in or earlier than " + upperT +
                         ", and in or later than " + lowerT + ". We will use the range ["+lowerT+", "+upperT+"] for you.");
@@ -996,14 +821,10 @@
             error: function(xhr, textStatus, errorThrown) {
 		$("#Response").html("error!");
 		$("#data_url").html("error!");
-                // alert("xhr.status: "+xhr.status);
-                // alert("error status: "+textStatus);
             },
             complete: function(xhr, textStatus) {
-                //alert("complete status: "+textStatus);
             }
         });
-
         $.ajax({
             type: "GET",
             url: url,
@@ -1011,53 +832,32 @@
             data: null,
             success: function(data, textStatus, xhr) {
                 Response = data;
-                // alert("data: " + data);
                 if (data.success == false) {
-                    // alert(data.error);
                     Response = null;
                     var text = JSON.stringify(data, null, 4);
                     text = "Error in backend: <br>" + text; 
-                    // $("#Response").html("<span style='color:red'>" + text + "</span>");
                     $("#Response").html(text);
                     $("#data_url").html(text);
                     return;
                 }
                 var text = JSON.stringify(data, null, 4);
-                // alert(text);
-                // $("#Response").html("<pre>"+text+"</pre>");
                 $("#Response").html(text);
-
                 var html1 = "<img src='"+data.url+"' width='680'/>";
-                // alert(html1);
                 $("#Image").html(html1);
-
-                // post dataUrl to textarea and enable download button
                 $("#data_url").html(data.dataUrl);
                 enable_download_button();
             },
             error: function(xhr, textStatus, errorThrown) {
 		$("#Response").html("error!");
 		$("#data_url").html("error!");
-                // alert("xhr.status: "+xhr.status);
-                // alert("error status: "+textStatus);
             },
             complete: function(xhr, textStatus) {
-                //alert("complete status: "+textStatus);
             }
         });
-
       });
-
-
     });
-    
   </script>
-}
-
-@main("Service 12", scripts){
-	
-	@flash_message() 
-
+} @main("Service 12", scripts){ @flash_message()
 <p>
 <div id="dataSource" style="display: none;">@parameters.getDataSource()</div>
 <div id="variableName" style="display: none;">@parameters.getVariableName()</div>
@@ -1074,190 +874,176 @@
 <div id="image" style="display: none;">@parameters.getImage()</div>
 <div id="dataURL" style="display: none;">@parameters.getDataURL()</div>
 <div id="serviceResponseText" style="display: none;">@parameters.getServiceResponseText()</div>
-
 <table border="1" align="center">
-
-<tr>
-<td colspan="4">
-<center>
-<b>Service: 2-D Variable Map</b> <br> <br>
-This service generates a map of a 2-dimensional variable with time averaging and spatial subsetting. <br>
-Select a data source (model or observation), a variable name, a time range, and a spatial range (lat-lon box) below.<br><br>
-</center>
-</td>
-</tr>
-
-<tr>
-<td>data source:</td><td><select name="data", id="data" onchange="select_data()">
-<!-- <option>NASA/obs4MIPs</option>  -->
-<optgroup label="Observation">
-<option selected="NASA/MODIS">NASA/MODIS</option>
-<option>NASA/AMSRE</option>
-<option>NASA/TRMM</option>
-<option>NASA/GPCP</option>
-<option>NASA/QuikSCAT</option>
-<option>NASA/AVISO</option>
-<option>NASA/GRACE</option>
-<option>NOAA/NODC</option>
-<option>NASA/CERES</option>
-</optgroup>
-<optgroup label="Model: Historical">
-<option>CCCMA/CANESM2</option>
-<option>GFDL/ESM2G</option>
-<option>GISS/E2-H</option>
-<option>GISS/E2-R</option>
-<option>NCAR/CAM5</option>
-<option>NCC/NORESM</option>
-<option>UKMO/HadGEM2-ES</option>
-</optgroup>
-<optgroup label="Model: AMIP">
-<option>CCCMA/CANAM4</option>
-<option>CSIRO/MK3.6</option>
-<option>GFDL/CM3</option>
-<option>IPSL/CM5A-LR</option>
-<option>MIROC/MIROC5</option>
-<option>UKMO/HadGEM2-A</option>
-</optgroup>
-<optgroup label="Reanalysis">
-<option>ECMWF/interim</option>
-</optgroup>
-</select></td>
-
-<td>variable name:</td><td><select name="var", id="var" onchange="select_var()">
-<option>Precipitation Flux</option>
-<option>Total Cloud Fraction</option>
-<option>Surface Temperature</option>
-<option>Sea Surface Temperature</option>
-<option>Eastward Near-Surface Wind</option>
-<option>Northward Near-Surface Wind</option>
-<option>Near-Surface Wind Speed</option>
-<option>Sea Surface Height</option>
-<option>Leaf Area Index</option>
-<option>Equivalent Water Height Over Land</option>
-<option>Equivalent Water Height Over Ocean</option>
-<option>Ocean Heat Content Anomaly within 700 m Depth</option>
-<option>Ocean Heat Content Anomaly within 2000 m Depth</option>
-<option>Surface Downwelling Longwave Radiation</option>
-<option>Surface Downwelling Shortwave Radiation</option>
-<option>Surface Upwelling Longwave Radiation</option>
-<option>Surface Upwelling Shortwave Radiation</option>
-<option>Surface Downwelling Clear-Sky Longwave Radiation</option>
-<option>Surface Downwelling Clear-Sky Shortwave Radiation</option>
-<option>Surface Upwelling Clear-Sky Shortwave Radiation</option>
-<option>TOA Incident Shortwave Radiation</option>
-<option>TOA Outgoing Longwave Radiation</option>
-<option>TOA Outgoing Shortwave Radiation</option>
-<option>TOA Outgoing Clear-Sky Longwave Radiation</option>
-<option>TOA Outgoing Clear-Sky Shortwave Radiation</option>
-</select></td>
-
-</tr>
-
-<tr>
-<td>start year-month:</td><td><input id="t0" value="2004-01" alt="start"/></td>
-<td>end year-month:</td><td><input id="t1" value="2004-12" alt="end"/></td>
-</tr>
-
-<tr>
-<td>select months:</td>
-<td><select name="months" id="months" onchange="select_months()">
-<option id="all">select all</option>
-<option id="none">select none</option>
-<option id="summer">Summer:Jun-Jul-Aug</option>
-<option id="autum">Autumn:Sep-Oct-Nov</option>
-<option id="winter">Winter:Dec-Jan-Feb</option>
-<option id="spring">Spring:Mar-Apr-May</option> </select>
-</td>
-<td>
-</td>
-<td>
-</tr>
-
-<tr>
-<td>
-<label><input type="checkbox" name="option1" id="Jan" value="Jan" /> Jan<br></label>
-<label><input type="checkbox" name="option1" id="Feb" value="Feb" /> Feb<br></label>
-<label><input type="checkbox" name="option1" id="Mar" value="Mar" /> Mar<br></label>
-</td>
-<td>
-<label><input type="checkbox" name="option1" id="Apr" value="Apr" /> Apr<br></label>
-<label><input type="checkbox" name="option1" id="May" value="May" /> May<br></label>
-<label><input type="checkbox" name="option1" id="Jun" value="Jun" /> Jun<br></label>
-</td>
-<td>
-<label><input type="checkbox" name="option1" id="Jul" value="Jul" /> Jul<br></label>
-<label><input type="checkbox" name="option1" id="Aug" value="Aug" /> Aug<br></label>
-<label><input type="checkbox" name="option1" id="Sep" value="Sep" /> Sep<br></label>
-</td>
-<td>
-<label><input type="checkbox" name="option1" id="Oct" value="Oct" /> Oct<br></label>
-<label><input type="checkbox" name="option1" id="Nov" value="Nov" /> Nov<br></label>
-<label><input type="checkbox" name="option1" id="Dec" value="Dec" /> Dec<br></label>
-</td>
-</tr>
-
-<tr>
-<td>start lat (deg):</td><td><input id="lat0" value="-90"/></td>
-<td>end lat (deg):</td><td><input id="lat1" value="90"/></td>
-</tr>
-
-<tr>
-<td>start lon (deg):</td><td><input id="lon0" value="0"/></td>
-<td>end lon (deg):</td><td><input id="lon1" value="360"/></td>
-</tr>
-
-<tr>
-<td colspan="1">
-color scale: 
-</td>
-<td colspan="3">
-<form> <input type="radio" name="scale1" value="linear" id="radioLin" checked>linear 
-<input type="radio" name="scale1" value="logarithmic" id="radioLog">logarithmic 
-</form>
-</td>
-</tr>
-
-<tr>
-<td colspan="1">
-Execution purpose
-</td>
-<td colspan="3">
-<form>
-<textarea name="purpose" id="purpose" rows="4" cols="50"> </textarea>
-</form>
-</td>
-</tr>
-
-
-
-
-
-<tr>
-<td colspan="2" align="center"><input id="twodvarmap" type="submit" value="            Run  Again            " style="height:28px"/></td>
-<form>
-<td colspan="2" align="center"><input id="download_data" type="button" value="Download Data" style="height:28px"/>
-</td>
-</form>
-
-</tr>
-
-<tr>
-<td colspan="4">
-<div id="Image">Image Here</div>
-</td>
-</tr>
-<tr>
-<td colspan="4" align="center">
-<textarea readonly id="data_url" cols="89" rows="2">Data URL Here</textarea>
-</td>
-</tr>
-<tr>
-<td colspan="4" align="center">
-<textarea readonly id="Response" cols="89" rows="6">Service Response Text Here</textarea>
-</td>
-</tr>
-</p>
-
+	<tr>
+		<td colspan="4">
+			<center>
+				<b>Service: 2-D Variable Map</b> <br> <br> This service
+				generates a map of a 2-dimensional variable with time averaging and
+				spatial subsetting. <br> Select a data source (model or
+				observation), a variable name, a time range, and a spatial range
+				(lat-lon box) below.<br>
+				<br>
+			</center>
+		</td>
+	</tr>
+	<tr>
+		<td>data source:</td>
+		<td><select name="data" , id="data" onchange="select_data()">
+				<optgroup label="Observation">
+					<option selected="NASA/MODIS">NASA/MODIS</option>
+					<option>NASA/AMSRE</option>
+					<option>NASA/TRMM</option>
+					<option>NASA/GPCP</option>
+					<option>NASA/QuikSCAT</option>
+					<option>NASA/AVISO</option>
+					<option>NASA/GRACE</option>
+					<option>NOAA/NODC</option>
+					<option>NASA/CERES</option>
+				</optgroup>
+				<optgroup label="Model: Historical">
+					<option>CCCMA/CANESM2</option>
+					<option>GFDL/ESM2G</option>
+					<option>GISS/E2-H</option>
+					<option>GISS/E2-R</option>
+					<option>NCAR/CAM5</option>
+					<option>NCC/NORESM</option>
+					<option>UKMO/HadGEM2-ES</option>
+				</optgroup>
+				<optgroup label="Model: AMIP">
+					<option>CCCMA/CANAM4</option>
+					<option>CSIRO/MK3.6</option>
+					<option>GFDL/CM3</option>
+					<option>IPSL/CM5A-LR</option>
+					<option>MIROC/MIROC5</option>
+					<option>UKMO/HadGEM2-A</option>
+				</optgroup>
+				<optgroup label="Reanalysis">
+					<option>ECMWF/interim</option>
+				</optgroup>
+		</select></td>
+		<td>variable name:</td>
+		<td><select name="var" , id="var" onchange="select_var()">
+				<option>Precipitation Flux</option>
+				<option>Total Cloud Fraction</option>
+				<option>Surface Temperature</option>
+				<option>Sea Surface Temperature</option>
+				<option>Eastward Near-Surface Wind</option>
+				<option>Northward Near-Surface Wind</option>
+				<option>Near-Surface Wind Speed</option>
+				<option>Sea Surface Height</option>
+				<option>Leaf Area Index</option>
+				<option>Equivalent Water Height Over Land</option>
+				<option>Equivalent Water Height Over Ocean</option>
+				<option>Ocean Heat Content Anomaly within 700 m Depth</option>
+				<option>Ocean Heat Content Anomaly within 2000 m Depth</option>
+				<option>Surface Downwelling Longwave Radiation</option>
+				<option>Surface Downwelling Shortwave Radiation</option>
+				<option>Surface Upwelling Longwave Radiation</option>
+				<option>Surface Upwelling Shortwave Radiation</option>
+				<option>Surface Downwelling Clear-Sky Longwave Radiation</option>
+				<option>Surface Downwelling Clear-Sky Shortwave Radiation</option>
+				<option>Surface Upwelling Clear-Sky Shortwave Radiation</option>
+				<option>TOA Incident Shortwave Radiation</option>
+				<option>TOA Outgoing Longwave Radiation</option>
+				<option>TOA Outgoing Shortwave Radiation</option>
+				<option>TOA Outgoing Clear-Sky Longwave Radiation</option>
+				<option>TOA Outgoing Clear-Sky Shortwave Radiation</option>
+		</select></td>
+	</tr>
+	<tr>
+		<td>start year-month:</td>
+		<td><input id="t0" value="2004-01" alt="start" /></td>
+		<td>end year-month:</td>
+		<td><input id="t1" value="2004-12" alt="end" /></td>
+	</tr>
+	<tr>
+		<td>select months:</td>
+		<td><select name="months" id="months" onchange="select_months()">
+				<option id="all">select all</option>
+				<option id="none">select none</option>
+				<option id="summer">Summer:Jun-Jul-Aug</option>
+				<option id="autum">Autumn:Sep-Oct-Nov</option>
+				<option id="winter">Winter:Dec-Jan-Feb</option>
+				<option id="spring">Spring:Mar-Apr-May</option>
+		</select></td>
+		<td></td>
+		<td>
+	</tr>
+	<tr>
+		<td><label><input type="checkbox" name="option1" id="Jan"
+				value="Jan" /> Jan<br></label> <label><input type="checkbox"
+				name="option1" id="Feb" value="Feb" /> Feb<br></label> <label><input
+				type="checkbox" name="option1" id="Mar" value="Mar" /> Mar<br></label>
+		</td>
+		<td><label><input type="checkbox" name="option1" id="Apr"
+				value="Apr" /> Apr<br></label> <label><input type="checkbox"
+				name="option1" id="May" value="May" /> May<br></label> <label><input
+				type="checkbox" name="option1" id="Jun" value="Jun" /> Jun<br></label>
+		</td>
+		<td><label><input type="checkbox" name="option1" id="Jul"
+				value="Jul" /> Jul<br></label> <label><input type="checkbox"
+				name="option1" id="Aug" value="Aug" /> Aug<br></label> <label><input
+				type="checkbox" name="option1" id="Sep" value="Sep" /> Sep<br></label>
+		</td>
+		<td><label><input type="checkbox" name="option1" id="Oct"
+				value="Oct" /> Oct<br></label> <label><input type="checkbox"
+				name="option1" id="Nov" value="Nov" /> Nov<br></label> <label><input
+				type="checkbox" name="option1" id="Dec" value="Dec" /> Dec<br></label>
+		</td>
+	</tr>
+	<tr>
+		<td>start lat (deg):</td>
+		<td><input id="lat0" value="-90" /></td>
+		<td>end lat (deg):</td>
+		<td><input id="lat1" value="90" /></td>
+	</tr>
+	<tr>
+		<td>start lon (deg):</td>
+		<td><input id="lon0" value="0" /></td>
+		<td>end lon (deg):</td>
+		<td><input id="lon1" value="360" /></td>
+	</tr>
+	<tr>
+		<td colspan="1">color scale:</td>
+		<td colspan="3">
+			<form>
+				<input type="radio" name="scale1" value="linear" id="radioLin"
+					checked>linear <input type="radio" name="scale1"
+					value="logarithmic" id="radioLog">logarithmic
+			</form>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="1">Execution purpose</td>
+		<td colspan="3">
+			<form>
+				<textarea name="purpose" id="purpose" rows="4" cols="50"> </textarea>
+			</form>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="2" align="center"><input id="twodvarmap"
+			type="submit" value="            Run  Again            "
+			style="height: 28px" /></td>
+		<form>
+			<td colspan="2" align="center"><input id="download_data"
+				type="button" value="Download Data" style="height: 28px" /></td>
+		</form>
+	</tr>
+	<tr>
+		<td colspan="4">
+			<div id="Image">Image Here</div>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="4" align="center"><textarea readonly id="data_url"
+				cols="89" rows="2">Data URL Here</textarea></td>
+	</tr>
+	<tr>
+		<td colspan="4" align="center"><textarea readonly id="Response"
+				cols="89" rows="6">Service Response Text Here</textarea></td>
+	</tr>
+	</p>
 </table>
 }
-  
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/f22b3e32/app/views/climate/twoDVariableTimeSeries.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/twoDVariableTimeSeries.scala.html b/app/views/climate/twoDVariableTimeSeries.scala.html
index d9d49fa..ecb205c 100644
--- a/app/views/climate/twoDVariableTimeSeries.scala.html
+++ b/app/views/climate/twoDVariableTimeSeries.scala.html
@@ -1,35 +1,25 @@
-@(parameters: metadata.TwoDVarTimeSeries)
-
-@import helper._
-
+@(parameters: metadata.TwoDVarTimeSeries) @import helper._
 <link rel="stylesheet"
 	href='@routes.Assets.at("stylesheets/livefitler.css")'>
-	
 @scripts = {
-	<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
-	<script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
-	<script type="text/javascript" src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
-	<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js"></script>
-	<script type="text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
-	<script type="text/javascript" src="@routes.Assets.at("javascripts/xmisc.js")"></script>
-	<script type="text/javascript">
+<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
+<script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
+<script type="text/javascript"
+	src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
+<script type="text/javascript" src="https:
+	<script type="
+	text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
+<script type="text/javascript" src="@routes.Assets.at("javascripts/xmisc.js")"></script>
+<script type="text/javascript">
 	var Response = null;
     var variable = "";
         var method =  @parameters.getVariableScale;
-
-
-    // called on load or reload
     window.onload = function() {
-      
-    	
       changeDataSource();
       select_data();
       changeVariableName();
       select_var();
-      
-      // no data to download yet
       disable_download_button();
-    
     var variableScale = $('#variableScale').text();
     if(variableScale == "0") {
       $('#radioLin').prop( "checked", true );
@@ -45,11 +35,8 @@
     $('#data_url').html($('#dataURL').text());
     $('#Response').html($('serviceResponseText').text());
     }
-
-
     function changeDataSource(){
     var dataSource = $('#dataSource').text();
-    //dataSource = "NASA_QuikSCAT";
     var x = document.getElementById("data");
     if(dataSource == "NASA_MODIS" ){
     x.options[0].selected=true;
@@ -120,9 +107,7 @@
     else if(dataSource == "ECMWF_interim" ){
     x.options[22].selected=true;
     }
-    //$('#data option:contains('+dataSource+')').prop({selected: true});
     }
-
     function changeVariableName(){
     var var_string = $('#variableName').text();
     var x=document.getElementById("var");
@@ -177,28 +162,19 @@
     else if (var_string == "rsut")
     x.options[24].selected=true;
     }
-
-
-    // disable download data button
     function disable_download_button()
     {
       var x=document.getElementById("download_data");
       x.disabled=false;
     }
-
-    // enable download data button
     function enable_download_button()
     {
       var x=document.getElementById("download_data");
       x.disabled=false;
     }         
-
-
-    // enable all vars in dropdown menu
     function reset_vars()
     {
       var x=document.getElementById("var");
-
       x.options[0].disabled=false;
       x.options[1].disabled=false;
       x.options[2].disabled=false;
@@ -225,15 +201,10 @@
       x.options[23].disabled=false;
       x.options[24].disabled=false;
     }
-
-    // form variable string based on "var" dropdown selection
     function select_var()
     {
       var var_string = $("#var").val();
-
-      // disable the download button because of this change
       disable_download_button();
-
       if (var_string == "Total Cloud Fraction")
         variable = "clt";
       else if (var_string == "Surface Temperature")
@@ -284,27 +255,13 @@
         variable = "rsutcs";
       else if (var_string == "TOA Outgoing Shortwave Radiation")
         variable = "rsut";
-
-      // alert("variable: " + variable)
     }
-
-
-    // set up "var" dropdown based status of "data" dropdown
     function select_data()
     {
       var data_string = $("#data").val();
       var x=document.getElementById("var");
-
-      // disable the download button because of this change
       disable_download_button();
-
-      // enable all options in "var" dropdown first
       reset_vars();
-
-      // alert(data_string);
-
-      // disable corresponding "var" options
-
       if (data_string == "NASA/AMSRE") {
         x.options[0].disabled=true;
         x.options[1].disabled=true;
@@ -330,7 +287,6 @@
         x.options[22].disabled=true;
         x.options[23].disabled=true;
         x.options[24].disabled=true;
-
         x.options[3].selected=true;
       }
       else if (data_string == "NASA/MODIS") {
@@ -357,9 +313,7 @@
         x.options[22].disabled=true;
         x.options[23].disabled=true;
         x.options[24].disabled=true;
-
         x.options[1].selected=true;
-        //x.options[8].selected=true;
       }
       else if (data_string == "NASA/TRMM") {
         x.options[0].selected=true;
@@ -416,7 +370,6 @@
         x.options[24].disabled=true;
       }
       else if (data_string == "NASA/QuikSCAT") {
-
         x.options[0].disabled=true;
         x.options[1].disabled=true;
         x.options[2].disabled=true;
@@ -439,10 +392,7 @@
         x.options[22].disabled=true;
         x.options[23].disabled=true;
         x.options[24].disabled=true;
-
         x.options[4].selected=true;
-        //x.options[5].selected=true;
-        //x.options[6].selected=true;
       }
       else if (data_string == "NASA/AVISO") {
         x.options[0].disabled=true;
@@ -469,11 +419,9 @@
         x.options[22].disabled=true;
         x.options[23].disabled=true;
         x.options[24].disabled=true;
-
         x.options[7].selected=true;
       }
       else if (data_string == "NASA/GRACE") {
-
         x.options[0].disabled=true;
         x.options[1].disabled=true;
         x.options[2].disabled=true;
@@ -497,12 +445,9 @@
         x.options[22].disabled=true;
         x.options[23].disabled=true;
         x.options[24].disabled=true;
-
         x.options[9].selected=true;
-        //x.options[10].selected=true;
       }
       else if (data_string == "NOAA/NODC") {
-
         x.options[0].disabled=true;
         x.options[1].disabled=true;
         x.options[2].disabled=true;
@@ -526,12 +471,9 @@
         x.options[22].disabled=true;
         x.options[23].disabled=true;
         x.options[24].disabled=true;
-
         x.options[11].selected=true;
-        //x.options[12].selected=true;
       }
       else if (data_string == "NASA/CERES") {
-
         x.options[0].disabled=true;
         x.options[1].disabled=true;
         x.options[2].disabled=true;
@@ -545,7 +487,6 @@
         x.options[10].disabled=true;
         x.options[11].disabled=true;
         x.options[12].disabled=true;
-
         x.options[13].selected=true;
       }
       else if (data_string == "ECMWF/interim") {
@@ -573,121 +514,68 @@
         x.options[22].disabled=true;
         x.options[23].disabled=true;
         x.options[24].disabled=true;
-
         x.options[3].selected=true;
       }
-      // for all other models
       else {
         x.options[9].disabled=true;
         x.options[10].disabled=true;
         x.options[11].disabled=true;
         x.options[12].disabled=true;
-
         x.options[0].selected=true;
       }
-
-      // form variable string
       select_var();
     }
-
-
     $(document).ready(function(){
-
-      /* $("a").click(function(event){
-        alert("As you can see, the link no longer took you to jquery.com");
-        event.preventDefault();
-      }); */
-
-
       $("#download_data").click(function(event) {
         var durl = $("#data_url").val();
-        // alert(durl);
         window.location.assign(durl);
       });
-
-
       $("#timeSeries2D").click(function(event) {
-        // alert('****** inside timeSeries2D()!');
         Response = null;
-
-        // no data to download yet
         disable_download_button();
-
         $("#Response").html("Calculating ...");
         $("#data_url").html("Calculating ...");
         $("#Image").html("");
-
-        // form url string
-        // var url = "http://cmacws.jpl.nasa.gov:9002/svc/timeSeries2D?";
-        var url = "http://" + window.location.hostname + ":9002/svc/timeSeries2D?";
-        // alert("url: " + url);
-
+        var url = "http:
         var d1 = $("#data").val();
         var model1 = d1.replace("/", "_");
-
         var arglist = "";
         arglist = arglist.concat("model=");
         arglist = arglist.concat(model1);
-
-        // alert("arglist: " + arglist);
-
         var v1 = $("#var").val();
         arglist = arglist.concat("&var=");
         arglist = arglist.concat(variable);
-
-        // alert("arglist: " + arglist);
-
         var t0 = $("#t0").val();
         var t1 = $("#t1").val();
-
         t0 = t0.replace("-", "");
         t1 = t1.replace("-", "");
-
         arglist = arglist.concat("&start_time=");
         arglist = arglist.concat(t0);
-
         arglist = arglist.concat("&end_time=");
         arglist = arglist.concat(t1);
-
-        // alert("arglist: " + arglist);
-
         var lon0 = $("#lon0").val();
         var lon1 = $("#lon1").val();
         var lat0 = $("#lat0").val();
         var lat1 = $("#lat1").val();
-
         arglist = arglist.concat("&lon1=");
         arglist = arglist.concat(lon0);
-
         arglist = arglist.concat("&lon2=");
         arglist = arglist.concat(lon1);
-
         arglist = arglist.concat("&lat1=");
         arglist = arglist.concat(lat0);
-
         arglist = arglist.concat("&lat2=");
         arglist = arglist.concat(lat1);
-
-        // alert("arglist: " + arglist);
-
         arglist = arglist.concat("&scale=");
         var y = document.getElementById("radioLin").checked;
-        // alert(y);
         if (y == true)
           arglist = arglist.concat('0');
         else
           arglist = arglist.concat('2');
-
         var purpose = $("#purpose").val();
         arglist = arglist.concat("&purpose=");
         arglist = arglist.concat(purpose);
-
-        // url = url + encodeURIComponent(arglist);
         url = url + encodeURI(arglist);
-        // url = url + arglist;
-        // alert("url: " + url);
-
-        var urlTimeBounds = "http://" + window.location.hostname + ":9002/svc/time_bounds?";
+        var urlTimeBounds = "http:
         var arglistTB = "";
         arglistTB = arglistTB.concat("serviceType=");
         arglistTB = arglistTB.concat("1");
@@ -696,9 +584,6 @@
         arglistTB = arglistTB.concat("&var=");
         arglistTB = arglistTB.concat(variable);
         urlTimeBounds = urlTimeBounds + encodeURI(arglistTB);
-        // alert("urlTimeBounds: " + urlTimeBounds);
-
-
         $.ajax({
             type: "GET",
             url: urlTimeBounds,
@@ -706,9 +591,7 @@
             data: null,
             success: function(data, textStatus, xhr) {
                 Response = data;
-                // alert("data: " + data);
                 if (data.success == false) {
-                    // alert(data.error);
                     Response = null;
                     var text = JSON.stringify(data, null, 4);
                     text = "Error in backend: <br>" + text; 
@@ -717,44 +600,29 @@
                     return;
                 }
                 var text = JSON.stringify(data, null, 4);
-                // alert("text: " + text);
-                // $("#Response").html("<pre>"+text+"</pre>");
-                // $("#Response").html(text);
-
                 var tb = data.time_bounds;
                 var bds = String(tb).split(",");
-                // alert("tb: " + tb);
-                // alert("bds: " + bds);
                 var lowerT = parseInt(bds[0]);
                 var upperT = parseInt(bds[1]);
-                // alert("lowerT: " + lowerT);
-                // alert("upperT: " + upperT);
                 var t0I = parseInt(t0);
                 var t1I = parseInt(t1);
-                // alert("t0: " + t0I);
-                // alert("t1: " + t1I);
-
                 if ( lowerT == 0 && upperT ==0 ) {
                   alert("We do not have data for this source and variable configuration.");
                   return;
                 }
-
                 if (t0I < lowerT && t1I < lowerT ||
                     t0I > upperT && t1I > upperT) {
                   alert("We do not have data that span your time range. Try the range inside ["+lowerT+", "+upperT+"].");
                   return;
                 }
-
                 if (t0I < lowerT && t1I <= upperT) {
                   alert("Your start year-month is out of bound. It has to be in or later than " + lowerT +
                         ". We will use the range ["+lowerT+", "+t1I+"] for you.");
                 }
-
                 if (t1I > upperT && t0I >= lowerT) {
                   alert("Your end year-month is out of bound. It has to be in or earlier than " + upperT +
                         ". We will use the range ["+t0I+", "+upperT+"] for you.");
                 }
-
                 if (t0I < lowerT && t1I > upperT ) {
                   alert("Both of your start and end year-months are out of bounds. They have to be in or earlier than " + upperT +
                         ", and in or later than " + lowerT + ". We will use the range ["+lowerT+", "+upperT+"] for you.");
@@ -763,14 +631,10 @@
             error: function(xhr, textStatus, errorThrown) {
 		$("#Response").html("error!");
 		$("#data_url").html("error!");
-                // alert("xhr.status: "+xhr.status);
-                // alert("error status: "+textStatus);
             },
             complete: function(xhr, textStatus) {
-                //alert("complete status: "+textStatus);
             }
         });
-
         $.ajax({
             type: "GET",
             url: url,
@@ -778,59 +642,40 @@
             data: null,
             success: function(data, textStatus, xhr) {
                 Response = data;
-                // alert("data: " + data);
                 if (data.success == false) {
-                    // alert(data.error);
                     Response = null;
                     var text = JSON.stringify(data, null, 4);
                     text = "Error in backend: <br>" + text; 
-                    // $("#Response").html("<span style='color:red'>" + text + "</span>");
                     $("#Response").html(text);
                     $("#data_url").html(text);
                     return;
                 }
                 var text = JSON.stringify(data, null, 4);
-                // alert(text);
-                // $("#Response").html("<pre>"+text+"</pre>");
                 $("#Response").html(text);
-
                 var html1 = "<img src='"+data.url+"' width='820'/>";
-                // alert(html1);
                 $("#Image").html(html1);
-
-                // post dataUrl to textarea and enable download button
                 $("#data_url").html(data.dataUrl);
                 enable_download_button();
             },
             error: function(xhr, textStatus, errorThrown) {
                 $("#Response").html("error!");
                 $("#data_url").html("error!");
-                // alert("xhr.status: "+xhr.status);
-                // alert("error status: "+textStatus);
             },
             complete: function(xhr, textStatus) {
-                //alert("complete status: "+textStatus);
             }
         });
-
       });
-
     });
-    
   </script>
-  }
-  
-  @main("Parameters of ConfId", scripts){
-	
-	@flash_message()   
-	<p>
+} @main("Parameters of ConfId", scripts){ @flash_message()
+<p>
 <div id="dataSource" style="display: none;">@parameters.getDataSource()</div>
 <div id="variableName" style="display: none;">@parameters.getVariableName()</div>
 <div id="startYearMonth" style="display: none;">@parameters.getStartYearMonth()</div>
 <div id="endYearMonth" style="display: none;">@parameters.getEndYearMonth()</div>
 <div id="startLat" style="display: none;">@parameters.getStartLat()</div>
 <div id="endLat" style="display: none;">@parameters.getEndLat()</div>
-<div id="startLon"style="display: none;">@parameters.getStartLon()</div>
+<div id="startLon" style="display: none;">@parameters.getStartLon()</div>
 <div id="endLon" style="display: none;">@parameters.getEndLon()</div>
 <div id="variableScale" style="display: none;">@parameters.getVariableScale()</div>
 <div id="executionPurpose" style="display: none;">@parameters.getExecutionPurpose()</div>
@@ -838,145 +683,141 @@
 <div id="dataURL" style="display: none;">@parameters.getDataURL()</div>
 <div id="serviceResponseText" style="display: none;">@parameters.getServiceResponseText()</div>
 <table border="1" align="center">
-
-<tr>
-<td colspan="4">
-<center>
-<b>Service: 2-D Variable Time Series</b><br><br>
-This service generates a graph of a 2-dimensional variable's time series with monthly averaged values. <br>
-Select a data source (model or observation), a variable name, a time range, and a spatial range below.<br><br>
-</center>
-</td>
-</tr>
-
-<tr>
-<td>data source:</td><td><select name="data", id="data" onchange="select_data()">
-<!-- <option>NASA/obs4MIPs</option>  -->
-<optgroup label="Observation">
-<option selected="NASA/MODIS">NASA/MODIS</option>
-<option>NASA/AMSRE</option>
-<option>NASA/TRMM</option>
-<option>NASA/GPCP</option>
-<option>NASA/QuikSCAT</option>
-<option>NASA/AVISO</option>
-<option>NASA/GRACE</option>
-<option>NOAA/NODC</option>
-<option>NASA/CERES</option>
-</optgroup>
-<optgroup label="Model: Historical">
-<option>CCCMA/CANESM2</option>
-<option>GFDL/ESM2G</option>
-<option>GISS/E2-H</option>
-<option>GISS/E2-R</option>
-<option>NCAR/CAM5</option>
-<option>NCC/NORESM</option>
-<option>UKMO/HadGEM2-ES</option>
-</optgroup>
-<optgroup label="Model: AMIP">
-<option>CCCMA/CANAM4</option>
-<option>CSIRO/MK3.6</option>
-<option>GFDL/CM3</option>
-<option>IPSL/CM5A-LR</option>
-<option>MIROC/MIROC5</option>
-<option>UKMO/HadGEM2-A</option>
-</optgroup>
-<optgroup label="Reanalysis">  
-<option>ECMWF/interim</option>  
-</optgroup>
-</select></td>
-
-<td>variable name:</td><td><select name="var", id="var" onchange="select_var()">
-<option>Precipitation Flux</option>
-<option>Total Cloud Fraction</option>
-<option>Surface Temperature</option>
-<option>Sea Surface Temperature</option>
-<option>Eastward Near-Surface Wind</option>
-<option>Northward Near-Surface Wind</option>
-<option>Near-Surface Wind Speed</option>
-<option>Sea Surface Height</option>
-<option>Leaf Area Index</option>
-<option>Equivalent Water Height Over Land</option>
-<option>Equivalent Water Height Over Ocean</option>
-<option>Ocean Heat Content Anomaly within 700 m Depth</option>
-<option>Ocean Heat Content Anomaly within 2000 m Depth</option>
-<option>Surface Downwelling Longwave Radiation</option>
-<option>Surface Downwelling Shortwave Radiation</option>
-<option>Surface Upwelling Longwave Radiation</option>
-<option>Surface Upwelling Shortwave Radiation</option>
-<option>Surface Downwelling Clear-Sky Longwave Radiation</option>
-<option>Surface Downwelling Clear-Sky Shortwave Radiation</option>
-<option>Surface Upwelling Clear-Sky Shortwave Radiation</option>
-<option>TOA Incident Shortwave Radiation</option>
-<option>TOA Outgoing Longwave Radiation</option>
-<option>TOA Outgoing Shortwave Radiation</option>
-<option>TOA Outgoing Clear-Sky Longwave Radiation</option>
-<option>TOA Outgoing Clear-Sky Shortwave Radiation</option>
-</select></td>
-</tr>
-
-<tr>
-<td>start year-month:</td><td><input id="t0" value=@parameters.getStartYearMonth() alt="start"/></td>
-<td>end year-month:</td><td><input id="t1" value=@parameters.getEndYearMonth() alt="end"/></td>
-</tr>
-
-
-<tr>
-<td>start lat (deg):</td><td><input id="lat0" value=@parameters.getStartLat()></td>
-<td>end lat (deg):</td><td><input id="lat1" value=@parameters.getEndLat()></td>
-</tr>
-
-<tr>
-<td>start lon (deg):</td><td><input id="lon0" value=@parameters.getStartLon()></td>
-<td>end lon (deg):</td><td><input id="lon1" value=@parameters.getEndLon()></td>
-</tr>
-
-<tr>
-<td colspan="1">
-variable scale:
-</td>
-<td colspan="3">
-<form> <input type="radio" name="scale1" value="linear" id="radioLin" checked>linear 
-<input type="radio" name="scale1" value="logarithmic" id="radioLog">logarithmic 
-</form>
-</td>
-</tr>
-
-<tr>
-<td colspan="1">
-Execution purpose
-</td>
-<td colspan="3">
-<form>
-<textarea name="purpose" id="purpose" rows="4" cols="50"> </textarea>
-</form>
-</td>
-</tr>
-
-<tr>
-<td colspan="2" align="center"><input id="timeSeries2D" type="submit" value="            Run  Again            " style="height:28px"/></td>
-<form>
-<td colspan="2" align="center"><input id="download_data" type="button" value="Download Data" style="height:28px"/>
-</td>
-</form>
-</tr>
-
-<tr>
-<td colspan="4">
-<div id="Image">Image Here</div>
-</td>
-</tr>
-
-<tr>
-<td colspan="4" align="center">
-<textarea readonly id="data_url" cols="89" rows="2">Data URL Here</textarea>
-</td>
-</tr>
-<tr>  
-<td colspan="4" align="center">  
-<textarea readonly id="Response" cols="89" rows="6">Service Response Text Here</textarea>  
-</td>  
-</tr>  
-
-</p>
+	<tr>
+		<td colspan="4">
+			<center>
+				<b>Service: 2-D Variable Time Series</b><br>
+				<br> This service generates a graph of a 2-dimensional
+				variable's time series with monthly averaged values. <br>
+				Select a data source (model or observation), a variable name, a time
+				range, and a spatial range below.<br>
+				<br>
+			</center>
+		</td>
+	</tr>
+	<tr>
+		<td>data source:</td>
+		<td><select name="data" , id="data" onchange="select_data()">
+				<optgroup label="Observation">
+					<option selected="NASA/MODIS">NASA/MODIS</option>
+					<option>NASA/AMSRE</option>
+					<option>NASA/TRMM</option>
+					<option>NASA/GPCP</option>
+					<option>NASA/QuikSCAT</option>
+					<option>NASA/AVISO</option>
+					<option>NASA/GRACE</option>
+					<option>NOAA/NODC</option>
+					<option>NASA/CERES</option>
+				</optgroup>
+				<optgroup label="Model: Historical">
+					<option>CCCMA/CANESM2</option>
+					<option>GFDL/ESM2G</option>
+					<option>GISS/E2-H</option>
+					<option>GISS/E2-R</option>
+					<option>NCAR/CAM5</option>
+					<option>NCC/NORESM</option>
+					<option>UKMO/HadGEM2-ES</option>
+				</optgroup>
+				<optgroup label="Model: AMIP">
+					<option>CCCMA/CANAM4</option>
+					<option>CSIRO/MK3.6</option>
+					<option>GFDL/CM3</option>
+					<option>IPSL/CM5A-LR</option>
+					<option>MIROC/MIROC5</option>
+					<option>UKMO/HadGEM2-A</option>
+				</optgroup>
+				<optgroup label="Reanalysis">
+					<option>ECMWF/interim</option>
+				</optgroup>
+		</select></td>
+		<td>variable name:</td>
+		<td><select name="var" , id="var" onchange="select_var()">
+				<option>Precipitation Flux</option>
+				<option>Total Cloud Fraction</option>
+				<option>Surface Temperature</option>
+				<option>Sea Surface Temperature</option>
+				<option>Eastward Near-Surface Wind</option>
+				<option>Northward Near-Surface Wind</option>
+				<option>Near-Surface Wind Speed</option>
+				<option>Sea Surface Height</option>
+				<option>Leaf Area Index</option>
+				<option>Equivalent Water Height Over Land</option>
+				<option>Equivalent Water Height Over Ocean</option>
+				<option>Ocean Heat Content Anomaly within 700 m Depth</option>
+				<option>Ocean Heat Content Anomaly within 2000 m Depth</option>
+				<option>Surface Downwelling Longwave Radiation</option>
+				<option>Surface Downwelling Shortwave Radiation</option>
+				<option>Surface Upwelling Longwave Radiation</option>
+				<option>Surface Upwelling Shortwave Radiation</option>
+				<option>Surface Downwelling Clear-Sky Longwave Radiation</option>
+				<option>Surface Downwelling Clear-Sky Shortwave Radiation</option>
+				<option>Surface Upwelling Clear-Sky Shortwave Radiation</option>
+				<option>TOA Incident Shortwave Radiation</option>
+				<option>TOA Outgoing Longwave Radiation</option>
+				<option>TOA Outgoing Shortwave Radiation</option>
+				<option>TOA Outgoing Clear-Sky Longwave Radiation</option>
+				<option>TOA Outgoing Clear-Sky Shortwave Radiation</option>
+		</select></td>
+	</tr>
+	<tr>
+		<td>start year-month:</td>
+		<td><input id="t0" value=@parameters.getStartYearMonth()
+			alt="start" /></td>
+		<td>end year-month:</td>
+		<td><input id="t1" value=@parameters.getEndYearMonth() alt="end" /></td>
+	</tr>
+	<tr>
+		<td>start lat (deg):</td>
+		<td><input id="lat0" value=@parameters.getStartLat()></td>
+		<td>end lat (deg):</td>
+		<td><input id="lat1" value=@parameters.getEndLat()></td>
+	</tr>
+	<tr>
+		<td>start lon (deg):</td>
+		<td><input id="lon0" value=@parameters.getStartLon()></td>
+		<td>end lon (deg):</td>
+		<td><input id="lon1" value=@parameters.getEndLon()></td>
+	</tr>
+	<tr>
+		<td colspan="1">variable scale:</td>
+		<td colspan="3">
+			<form>
+				<input type="radio" name="scale1" value="linear" id="radioLin"
+					checked>linear <input type="radio" name="scale1"
+					value="logarithmic" id="radioLog">logarithmic
+			</form>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="1">Execution purpose</td>
+		<td colspan="3">
+			<form>
+				<textarea name="purpose" id="purpose" rows="4" cols="50"> </textarea>
+			</form>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="2" align="center"><input id="timeSeries2D"
+			type="submit" value="            Run  Again            "
+			style="height: 28px" /></td>
+		<form>
+			<td colspan="2" align="center"><input id="download_data"
+				type="button" value="Download Data" style="height: 28px" /></td>
+		</form>
+	</tr>
+	<tr>
+		<td colspan="4">
+			<div id="Image">Image Here</div>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="4" align="center"><textarea readonly id="data_url"
+				cols="89" rows="2">Data URL Here</textarea></td>
+	</tr>
+	<tr>
+		<td colspan="4" align="center"><textarea readonly id="Response"
+				cols="89" rows="6">Service Response Text Here</textarea></td>
+	</tr>
+	</p>
 </table>
-}
\ No newline at end of file
+}


[18/50] [abbrv] incubator-cmda git commit: delete comments

Posted by xi...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/f22b3e32/app/views/climate/conditionalSampling.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/conditionalSampling.scala.html b/app/views/climate/conditionalSampling.scala.html
index 69d9a67..5ed7ce7 100644
--- a/app/views/climate/conditionalSampling.scala.html
+++ b/app/views/climate/conditionalSampling.scala.html
@@ -1,25 +1,20 @@
-@(parameters: metadata.ConditionalSampling)
-
-@import helper._
-
+@(parameters: metadata.ConditionalSampling) @import helper._
 <link rel="stylesheet"
 	href='@routes.Assets.at("stylesheets/livefitler.css")'>
-	
 @scripts = {
-	<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
-	<script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
-	<script type="text/javascript" src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
-	<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js"></script>
-	<script type="text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
-	<script type="text/javascript" src='@routes.Assets.at("javascripts/xmisc.js")'></script>
-	<script type="text/javascript">
-	
+<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
+<script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
+<script type="text/javascript"
+	src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
+<script type="text/javascript" src="https:
+	<script type="
+	text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
+<script type="text/javascript"
+	src='@routes.Assets.at("javascripts/xmisc.js")'></script>
+<script type="text/javascript">
 	var Response = null;
     var variable1 = "";
     var variable2 = "";
-
-
-    // called on load or reload
     window.onload = function() {
       select_all_months();
       changeDataSource1();
@@ -30,12 +25,9 @@
       select_var1(1);
       changeVariableName2();
       select_var1(2);
-      // no data to download yet
-      //disable_download_button();
       var z=document.getElementById("download_data");
       z.disabled=false;
       setDefault();
-      
       $('#pres1').val("N/A");
       $('#pres2').val("N/A");
       $('#t0').val($('#startYearMonth').text());
@@ -91,11 +83,8 @@
       $('#Image').html('<img src="'+imageUrl+'" width=680 />');
       $('#data_url').html($('#dataURL').text());
       $('#Response').html($('serviceResponseText').text());
-      
-    
     function changeDataSource1(){
     	var dataSource = $('#dataSourceP').text();
-     	//dataSource = "NASA_QuikSCAT";
      	var x = document.getElementById("data1");
      	if(dataSource == "cccma_canesm2" ){
      		x.options[0].selected=true;
@@ -175,11 +164,9 @@
      	else if(dataSource == "ecmwf_interim" ){
      		x.options[25].selected=true;
      	}
-        //$('#data option:contains('+dataSource+')').prop({selected: true});
     }
     function changeDataSource2(){
     	var dataSource = $('#dataSourceE').text();
-     	//dataSource = "NASA_QuikSCAT";
      	var x = document.getElementById("data2");
      	if(dataSource == "cccma_canesm2" ){
      		x.options[0].selected=true;
@@ -259,7 +246,6 @@
      	else if(dataSource == "ecmwf_interim" ){
      		x.options[25].selected=true;
      	}
-        //$('#data option:contains('+dataSource+')').prop({selected: true});
     }
     function changeVariableName1(){
     	var var_string = $('#variableNameP').text();
@@ -409,8 +395,6 @@
     	}
     }
     }
-
-    // select all months in the checkboxes
     function select_all_months()
     {
         document.getElementById('Jan').checked = true;
@@ -426,8 +410,6 @@
         document.getElementById('Nov').checked = true;
         document.getElementById('Dec').checked = true;
     }
-
-    // see if no month is selected
     function no_month_check()
     {
         if (document.getElementById('Jan').checked == false &&
@@ -442,14 +424,11 @@
            document.getElementById('Oct').checked == false &&
            document.getElementById('Nov').checked == false &&
            document.getElementById('Dec').checked == false) {
-           // alert("No month check!");
            return true;
           }
         else
            return false;
     }
-
-    // unselect all months in the checkboxes
     function reset_months()
     {
         document.getElementById('Jan').checked = false;
@@ -465,11 +444,8 @@
         document.getElementById('Nov').checked = false;
         document.getElementById('Dec').checked = false;
     }
-
-    // disable customized input text boxes
     function setDefault()
     {
-       // alert("in setDefault() ... ");
        x=document.getElementById("min1");
        y=document.getElementById("max1");
        z=document.getElementById("bins1");
@@ -480,11 +456,8 @@
        z.value = "N/A";
        z.disabled=true;
     }
-
-    // enable customized input text boxes
     function setCustomized()
     {
-       // alert("in setCustomized() ... ");
        x=document.getElementById("min1");
        y=document.getElementById("max1");
        z=document.getElementById("bins1");
@@ -495,34 +468,25 @@
        z.value = "";
        z.disabled=false;
     }
-
-    // disable download data button
     function disable_download_button()
     {
       var x=document.getElementById("download_data");
       x.disabled=false;
     }
-
-    // enable download data button
     function enable_download_button()
     {
       var x=document.getElementById("download_data");
       x.disabled=false;
     }
-
-
-    // disable all vars1 in dropdown menu
     function unset_vars1(ID)
     {
       var x;
-
       if (ID == 1) {
         x=document.getElementById("var1");
       }
       else if (ID == 2) {
         x=document.getElementById("var2");
       }
-
       x.options[0].disabled=true;
       x.options[1].disabled=true;
       x.options[2].disabled=true;
@@ -557,9 +521,6 @@
       x.options[31].disabled=true;
       x.options[32].disabled=true;
     }
-
-
-    // disable pressure level box for 2D var
     function disable_pres1(ID)
     {
       var x;
@@ -569,12 +530,9 @@
       else if (ID == 2) {
         x=document.getElementById("pres2");
       }
-
       x.value = "N/A";
       x.disabled=true;
     }
-
-    // enable pressure level box for 3D var
     function enable_pres1(ID)
     {
       var x;
@@ -586,37 +544,26 @@
         x=document.getElementById("pres2");
         x.value = "500";
       }
-
       x.disabled=false;
     }
-
-    // form variable1 or variable2 string based on "var" dropdown selection
     function select_var1(ID)
     {
       var var_string;
-
       if (ID == 1) {
         var_string = $("#var1").val();
       }
       else if (ID == 2) {
         var_string = $("#var2").val();
       }
-
-      // alert("var_string: " + var_string)
-
-      // disable the download button because of this change  
       disable_download_button();  
-  
       if (var_string == "Total Cloud Fraction") { 
         if (ID == 1) {
-          variable1 = "clt";  // a 2D var
+          variable1 = "clt";  
         }
         else if (ID == 2) {
-          variable2 = "clt";  // a 2D var
+          variable2 = "clt";  
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
-        // alert("variable1: " + variable1)
       }
       else if (var_string == "Surface Temperature") {
         if (ID == 1) {
@@ -625,7 +572,6 @@
         else if (ID == 2) {
           variable2 = "ts";  
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Sea Surface Temperature") { 
@@ -635,7 +581,6 @@
         else if (ID == 2) {
           variable2 = "tos";  
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Precipitation Flux") { 
@@ -645,7 +590,6 @@
         else if (ID == 2) {
           variable2 = "pr";  
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Eastward Near-Surface Wind") { 
@@ -655,7 +599,6 @@
         else if (ID == 2) {
           variable2 = "uas";  
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Northward Near-Surface Wind") {  
@@ -665,7 +608,6 @@
         else if (ID == 2) {
           variable2 = "vas";  
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Near-Surface Wind Speed") { 
@@ -675,7 +617,6 @@
         else if (ID == 2) {
           variable2 = "sfcWind";  
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Sea Surface Height") { 
@@ -685,7 +626,6 @@
         else if (ID == 2) {
           variable2 = "zos";  
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Leaf Area Index") { 
@@ -695,7 +635,6 @@
         else if (ID == 2) {
           variable2 = "lai";  
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Equivalent Water Height Over Land") {
@@ -705,7 +644,6 @@
         else if (ID == 2) {
           variable2 = "zl";  
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Equivalent Water Height Over Ocean") {
@@ -715,7 +653,6 @@
         else if (ID == 2) {
           variable2 = "zo";
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Ocean Heat Content Anomaly within 700 m Depth") {
@@ -725,7 +662,6 @@
         else if (ID == 2) {
           variable2 = "ohc700";
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Ocean Heat Content Anomaly within 2000 m Depth") {
@@ -735,7 +671,6 @@
         else if (ID == 2) {
           variable2 = "ohc2000";
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Surface Downwelling Longwave Radiation") {
@@ -745,7 +680,6 @@
         else if (ID == 2) {
           variable2 = "rlds";
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Surface Downwelling Shortwave Radiation") {
@@ -755,7 +689,6 @@
         else if (ID == 2) {
           variable2 = "rsds";
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Surface Upwelling Longwave Radiation") {
@@ -765,7 +698,6 @@
         else if (ID == 2) {
           variable2 = "rlus";
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Surface Upwelling Shortwave Radiation") {
@@ -775,7 +707,6 @@
         else if (ID == 2) {
           variable2 = "rsus";
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Surface Downwelling Clear-Sky Longwave Radiation") {
@@ -785,7 +716,6 @@
         else if (ID == 2) {
           variable2 = "rldscs";
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Surface Downwelling Clear-Sky Shortwave Radiation") {
@@ -795,7 +725,6 @@
         else if (ID == 2) {
           variable2 = "rsdscs";
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Surface Upwelling Clear-Sky Shortwave Radiation") {
@@ -805,7 +734,6 @@
         else if (ID == 2) {
           variable2 = "rsuscs";
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "TOA Incident Shortwave Radiation") {
@@ -815,7 +743,6 @@
         else if (ID == 2) {
           variable2 = "rsdt";
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "TOA Outgoing Clear-Sky Longwave Radiation") {
@@ -825,7 +752,6 @@
         else if (ID == 2) {
           variable2 = "rlutcs";
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "TOA Outgoing Longwave Radiation") {
@@ -835,7 +761,6 @@
         else if (ID == 2) {
           variable2 = "rlut";
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "TOA Outgoing Clear-Sky Shortwave Radiation") {
@@ -845,7 +770,6 @@
         else if (ID == 2) {
           variable2 = "rsutcs";
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "TOA Outgoing Shortwave Radiation") {
@@ -855,7 +779,6 @@
         else if (ID == 2) {
           variable2 = "rsut";
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Air Temperature") {
@@ -865,7 +788,6 @@
         else if (ID == 2) {
           variable2 = "ta";
         }
-        // enable pressure level box for 3D var
         enable_pres1(ID);
       }
       else if (var_string == "Specific Humidity") {
@@ -875,7 +797,6 @@
         else if (ID == 2) {
           variable2 = "hus";
         }
-        // enable pressure level box for 3D var
         enable_pres1(ID);
       }
       else if (var_string == "Cloud Ice Water Content") {
@@ -885,7 +806,6 @@
         else if (ID == 2) {
           variable2 = "cli";
         }
-        // enable pressure level box for 3D var
         enable_pres1(ID);
       }
       else if (var_string == "Cloud Liquid Water Content") {
@@ -895,7 +815,6 @@
         else if (ID == 2) {
           variable2 = "clw";
         }
-        // enable pressure level box for 3D var
         enable_pres1(ID);
       }
       else if (var_string == "Ocean Temperature") {
@@ -905,7 +824,6 @@
         else if (ID == 2) {
           variable2 = "ot";
         }
-        // enable pressure level box for 3D var
         enable_pres1(ID);
       }
       else if (var_string == "Ocean Salinity") {
@@ -915,7 +833,6 @@
         else if (ID == 2) {
           variable2 = "os";
         }
-        // enable pressure level box for 3D var
         enable_pres1(ID);
       }
       else if (var_string == "Vertical Wind Velocity") {
@@ -925,7 +842,6 @@
         else if (ID == 2) {
           variable2 = "wap";
         }
-        // enable pressure level box for 3D var
         enable_pres1(ID);
       }
       else if (var_string == "Relative Humidity") {
@@ -935,20 +851,13 @@
         else if (ID == 2) {
           variable2 = "hur";
         }
-        // enable pressure level box for 3D var
         enable_pres1(ID);
       }
-
-      // alert("variable1: " + variable1)
     }
-
-
-    // set up "var1" dropdown based status of "data1" dropdown
     function select_data1(ID)
     {
       var data_string;
       var x;
-
       if (ID == 1) {
         data_string = $("#data1").val();
         x = document.getElementById("var1");
@@ -957,106 +866,64 @@
         data_string = $("#data2").val();
         x = document.getElementById("var2");
       }
-
-      // alert(ID);
-      // alert(data_string);
-
-      // disable the download button because of this change
       disable_download_button();
-
-      // disable corresponding "var" options
       if (data_string == "NASA/AMSRE") {
-
-        unset_vars1(ID); // disable all options in "var" dropdown first
-
+        unset_vars1(ID); 
         x.options[3].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[3].disabled=false;
-
       }
       else if (data_string == "NASA/MODIS") {
-
         unset_vars1(ID);
-
         x.options[1].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[1].disabled=false;
         x.options[8].disabled=false;
-
       }
       else if (data_string == "NASA/TRMM") {
-
         unset_vars1(ID);
-
         x.options[0].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[0].disabled=false;
-
       }
       else if (data_string == "NASA/GPCP") {
-
         unset_vars1(ID);
-
         x.options[0].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[0].disabled=false;
-
       }
       else if (data_string == "NASA/QuikSCAT") {
-
         unset_vars1(ID);
-
         x.options[4].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[4].disabled=false;
         x.options[5].disabled=false;
         x.options[6].disabled=false;
-
       }
       else if (data_string == "NASA/AVISO") {
-
         unset_vars1(ID);
-
         x.options[7].selected=true;
-        disable_pres1(); // the selected one is 2D
-
+        disable_pres1(); 
         x.options[7].disabled=false;
-
       }
       else if (data_string == "NASA/GRACE") {
-
         unset_vars1(ID);
-
         x.options[9].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[9].disabled=false;
         x.options[10].disabled=false;
-
       }
       else if (data_string == "NOAA/NODC") {
-
         unset_vars1(ID);
-
         x.options[11].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[11].disabled=false;
         x.options[12].disabled=false;
-
       }
       else if (data_string == "NASA/CERES") {
-
         unset_vars1(ID);
-
         x.options[13].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[13].disabled=false;
         x.options[14].disabled=false;
         x.options[15].disabled=false;
@@ -1069,65 +936,38 @@
         x.options[22].disabled=false;
         x.options[23].disabled=false;
         x.options[24].disabled=false;
-        // The following 6 commented out
-        // per request by Benyang
-        // x.options[25].disabled=false;
-        // x.options[26].disabled=false;
-        // x.options[27].disabled=false;
-        // x.options[28].disabled=false;
-        // x.options[29].disabled=false;
-        // x.options[30].disabled=false;
-
       }
       else if (data_string == "NASA/AIRS") {
-
         unset_vars1(ID);
-
         x.options[25].selected=true;
-        enable_pres1(ID); // the selected one is 3D
-
+        enable_pres1(ID); 
         x.options[25].disabled=false;
         x.options[26].disabled=false;
-
       }
       else if (data_string == "NASA/MLS") {
-
         unset_vars1(ID);
-
         x.options[25].selected=true;
-        enable_pres1(ID); // the selected one is 3D
-
+        enable_pres1(ID); 
         x.options[25].disabled=false;
         x.options[26].disabled=false;
-
       }
       else if (data_string == "ARGO/ARGO") {
-
         unset_vars1(ID);
-
         x.options[29].selected=true;
-        enable_pres1(ID); // the selected one is 3D
-
+        enable_pres1(ID); 
         x.options[29].disabled=false;
         x.options[30].disabled=false;
-
-        // alert("in ARGO ...");
-        // alert(data_string);
       }
       else if (data_string == "CCCMA/CANAM4") {
-
         unset_vars1(ID);
-
         x.options[0].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[0].disabled=false;
         x.options[1].disabled=false;
         x.options[2].disabled=false;
         x.options[4].disabled=false;
         x.options[5].disabled=false;
         x.options[6].disabled=false;
-
         x.options[13].disabled=false;
         x.options[14].disabled=false;
         x.options[15].disabled=false;
@@ -1144,22 +984,17 @@
         x.options[26].disabled=false;
         x.options[27].disabled=false;
         x.options[28].disabled=false;
-
       }
       else if (data_string == "CSIRO/MK3.6") {
-
         unset_vars1(ID);
-
         x.options[0].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[0].disabled=false;
         x.options[1].disabled=false;
         x.options[2].disabled=false;
         x.options[4].disabled=false;
         x.options[5].disabled=false;
         x.options[6].disabled=false;
-
         x.options[13].disabled=false;
         x.options[14].disabled=false;
         x.options[15].disabled=false;
@@ -1178,9 +1013,7 @@
         x.options[28].disabled=false;
         x.options[31].disabled=false;
         x.options[32].disabled=false;
-
       }
-
       else if (data_string == "CCCMA/CANESM2" || data_string == "GFDL/ESM2G" ||
                data_string == "GISS/E2-H" || data_string == "GISS/E2-R" ||
                data_string == "NCAR/CAM5" || data_string == "NCC/NORESM" ||
@@ -1188,12 +1021,9 @@
                data_string == "GFDL/CM3" || data_string == "IPSL/CM5A-LR" ||
                data_string == "MIROC/MIROC5" || data_string == "UKMO/HadGEM2-A"
               ) {
-
         unset_vars1(ID);
-
         x.options[0].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[0].disabled=false;
         x.options[1].disabled=false;
         x.options[2].disabled=false;
@@ -1203,7 +1033,6 @@
         x.options[6].disabled=false;
         x.options[7].disabled=false;
         x.options[8].disabled=false;
-
         x.options[13].disabled=false;
         x.options[14].disabled=false;
         x.options[15].disabled=false;
@@ -1222,168 +1051,102 @@
         x.options[28].disabled=false;
         x.options[31].disabled=false;
         x.options[32].disabled=false;
-
       }
       else if (data_string == "ECMWF/interim") {
         unset_vars1(ID);
- 
         x.options[3].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[3].disabled=false;
         x.options[31].disabled=false;
         x.options[32].disabled=false;
       }
-
-      // form variable string
       select_var1(ID);
     }
-
-    // select checkboxes based on "months" dropdown
     function select_months()
     {
       var s1=document.getElementById("months");
-      // alert(s1.selectedIndex);
-      // alert(s1.options[s1.selectedIndex].value);
-
-      // disable the download button because of this change
       disable_download_button();
-
-      // "select none"
       if (s1.selectedIndex == 1) {
         reset_months();
       }
-      // "select all"
       if (s1.selectedIndex == 0) {
         select_all_months();
       }
-      // "summer"
       if (s1.selectedIndex == 2) {
         reset_months();
         document.getElementById('Jun').checked = true;
         document.getElementById('Jul').checked = true;
         document.getElementById('Aug').checked = true;
       }
-      // "autumn"
       if (s1.selectedIndex == 3) {
         reset_months();
         document.getElementById('Sep').checked = true;
         document.getElementById('Oct').checked = true;
         document.getElementById('Nov').checked = true;
       }
-      // "winter"
       if (s1.selectedIndex == 4) {
         reset_months();
         document.getElementById('Dec').checked = true;
         document.getElementById('Jan').checked = true;
         document.getElementById('Feb').checked = true;
       }
-      // "spring"
       if (s1.selectedIndex == 5) {
         reset_months();
         document.getElementById('Mar').checked = true;
         document.getElementById('Apr').checked = true;
         document.getElementById('May').checked = true;
       }
-
     }
-
-
     $(document).ready(function(){
-
-      /* $("a").click(function(event){
-        alert("As you can see, the link no longer took you to jquery.com");
-        event.preventDefault();
-      }); */
-
-
       $("#download_data").click(function(event) {
         var durl = $("#data_url").val();
-        // alert(durl);
         window.location.assign(durl);
       });
-
-
       $("#conditionalSamp").click(function(event) {
-        // alert('****** inside conditionalSamp()!');
         Response = null;
-
-        // no data to download yet
         disable_download_button();
-
-        // flag error if no month box is checked
         if (no_month_check()) {
-           // $("#Response").html("<span style='color:red'>Error: please check at least one month.</span>");
            $("#Response").html("Error: please check at least one month.");
            $("#Image").html("");
            return;
         }
-
         $("#Response").html("Calculating ...");
         $("#data_url").html("Calculating ...");
         $("#Image").html("");
-
-        // sample url: http://cmacws.jpl.nasa.gov:9002/svc/conditionalSampling?model1=ukmo_hadgem2-a&var1=ts&pres1=200&model2=ukmo_hadgem2-a&var2=clt&pres2=200&start_time=199001&end_time=199512&lon1=0&lon2=100&lat1=-29&lat2=29
-        // form url string
-        // var url = "http://cmacws.jpl.nasa.gov:9002/svc/conditionalSamp?";
-        var url = "http://" + window.location.hostname + ":9002/svc/conditionalSampling?";
-        // alert("url: " + url);
-
+        var url = "http:
         var d1 = $("#data1").val();
         var model1 = d1.replace("/", "_");
         model1 = model1.toLowerCase();
-
         var arglist = "";
         arglist = arglist.concat("model1=");
         arglist = arglist.concat(model1);
-
-        // alert("arglist: " + arglist);
-
         var v1 = $("#var1").val();
         arglist = arglist.concat("&var1=");
         arglist = arglist.concat(variable1);
-
-        // alert("arglist: " + arglist);
-
-
         var t0 = $("#t0").val();
         var t1 = $("#t1").val();
-
         t0 = t0.replace("-", "");
         t1 = t1.replace("-", "");
-
         arglist = arglist.concat("&start_time=");
         arglist = arglist.concat(t0);
-
         arglist = arglist.concat("&end_time=");
         arglist = arglist.concat(t1);
-
         var lon0 = $("#lon0").val();
         var lon1 = $("#lon1").val();
         var lat0 = $("#lat0").val();
         var lat1 = $("#lat1").val();
-
         arglist = arglist.concat("&lon1=");
         arglist = arglist.concat(lon0);
-
         arglist = arglist.concat("&lon2=");
         arglist = arglist.concat(lon1);
-
         arglist = arglist.concat("&lat1=");
         arglist = arglist.concat(lat0);
-
         arglist = arglist.concat("&lat2=");
         arglist = arglist.concat(lat1);
-
-        // alert("arglist: " + arglist);
-
-
         var press_range = $("#pres1").val();
-        // alert("press_range: " + press_range);
         var pres1;
         var pres2;
         if (press_range != 'N/A') {
-          // split the range into two pressures
           var splitty = press_range.split(",");
           if (splitty.length != 2) {
             alert("pressure level range needs to be two values separated by comma.");
@@ -1392,17 +1155,13 @@
           else {
             pres1 = splitty[0];
             pres2 = splitty[1];
-            // alert("variable1: " + variable1);
-         
-            // when variable is the 3D Ocean Salinity or Ocean Temperature
             if (variable1 == 'ot' || variable1 == 'os') {
-              pres1 = pres1 * 10000;  // convert from dbar on GUI
-              pres2 = pres2 * 10000;  // convert from dbar on GUI
+              pres1 = pres1 * 10000;  
+              pres2 = pres2 * 10000;  
             } 
-            // when variable2 is 3D atmosphere var
             else {
-              pres1 = pres1 * 100;  // convert from hPa on GUI
-              pres2 = pres2 * 100;  // convert from hPa on GUI
+              pres1 = pres1 * 100;  
+              pres2 = pres2 * 100;  
             }
           }
         }
@@ -1410,189 +1169,116 @@
           pres1 = "-1";
           pres2 = "-1";
         }
-
         arglist = arglist.concat("&pres1=");
         arglist = arglist.concat(pres1);
         arglist = arglist.concat("&pres2=");
         arglist = arglist.concat(pres2);
-
-        // alert("arglist: " + arglist);
-
-
         var s1 = document.getElementById('months');
-
-        // get months checked by client
         var month_str = "";
-
         var mm = document.getElementById('Jan');
         if (mm.checked == true)
           month_str = month_str.concat(",1");
-
         var mm = document.getElementById('Feb');
         if (mm.checked == true)
           month_str = month_str.concat(",2");
-
         var mm = document.getElementById('Mar');
         if (mm.checked == true)
           month_str = month_str.concat(",3");
-
         var mm = document.getElementById('Apr');
         if (mm.checked == true)
           month_str = month_str.concat(",4");
-
         var mm = document.getElementById('May');
         if (mm.checked == true)
           month_str = month_str.concat(",5");
           var mm = document.getElementById('Jun');
         if (mm.checked == true)
           month_str = month_str.concat(",6");
-
         var mm = document.getElementById('Jul');
         if (mm.checked == true)
           month_str = month_str.concat(",7");
-
         var mm = document.getElementById('Aug');
         if (mm.checked == true)
           month_str = month_str.concat(",8");
-
         var mm = document.getElementById('Sep');
         if (mm.checked == true)
           month_str = month_str.concat(",9");
-
         var mm = document.getElementById('Oct');
         if (mm.checked == true)
           month_str = month_str.concat(",10");
-
         var mm = document.getElementById('Nov');
         if (mm.checked == true)
           month_str = month_str.concat(",11");
-
         var mm = document.getElementById('Dec');
         if (mm.checked == true)
           month_str = month_str.concat(",12");
-
-        // remove the leading ','
         month_str = month_str.substr(1);
-        // alert(month_str);
-
         arglist = arglist.concat("&months=");
         arglist = arglist.concat(month_str);
-
-        // alert("arglist: " + arglist);
-
-
-
-
-
-
         var d2 = $("#data2").val();
         var model2 = d2.replace("/", "_");
         model2 = model2.toLowerCase();
-
         arglist = arglist.concat("&model2=");
         arglist = arglist.concat(model2);
-
-        // alert("arglist: " + arglist);
-
         var v2 = $("#var2").val();
         arglist = arglist.concat("&var2=");
         arglist = arglist.concat(variable2);
-
-        // alert("arglist: " + arglist);
-
         var plev = $("#pres2").val();
         if (plev == "N/A")
           plev = "-1";
-
-        // when variable is the 3D Ocean Salinity or Ocean Temperature
         if (variable2 == 'ot' || variable2 == 'os') {
-          plev = plev * 10000;  // convert from dbar on GUI
+          plev = plev * 10000;  
         } 
-        // when variable2 is 3D atmosphere var
         else {
-          plev = plev * 100;  // convert from hPa on GUI
+          plev = plev * 100;  
         }
-
-
         arglist = arglist.concat("&env_var_plev=");
         arglist = arglist.concat(plev);
-
-        // alert("arglist: " + arglist);
-
         var binstate = document.getElementById('radioDef').checked;
-
         var binMin, binMax, numBins;
-
-        if (binstate == true) { // default
+        if (binstate == true) { 
           binMin = "-1";
           binMax = "-1";
           numBins = "-1";
         }
-        else { // customized
+        else { 
           binMin = $("#min1").val();
           binMax = $("#max1").val();
           numBins = $("#bins1").val();
         }
-
         arglist = arglist.concat("&bin_min=");
         arglist = arglist.concat(binMin);
         arglist = arglist.concat("&bin_max=");
         arglist = arglist.concat(binMax);
         arglist = arglist.concat("&bin_n=");
         arglist = arglist.concat(numBins);
-
-        // alert("arglist: " + arglist);
-
         var xstate = document.getElementById('radioXLin').checked;
         var xvalue;
-
         if (xstate == true)
           xvalue = 0;
         else
           xvalue = 1;
-
-        // alert("xvalue: " + xvalue);
-
         var ystate = document.getElementById('radioYLin').checked;
         var yvalue;
-
         if (ystate == true)
           yvalue = 0;
         else
           yvalue = 1;
-
-        // alert("yvalue: " + yvalue);
-
         var zstate = document.getElementById('radioZLin').checked;
         var zvalue;
-
         if (zstate == true)
           zvalue = 0;
         else
           zvalue = 1;
-
-        // alert("zvalue: " + zvalue);
-
         var dispOpt;
         dispOpt = xvalue*1 + yvalue*2 + zvalue*4;
-        // alert("dispOpt: " + dispOpt);
         var dispOptString = dispOpt.toString();
-
         arglist = arglist.concat("&displayOpt=");
         arglist = arglist.concat(dispOptString);
-
-        // alert("arglist: " + arglist);
-
         var purpose = $("#purpose").val();
         arglist = arglist.concat("&purpose=");
         arglist = arglist.concat(purpose);
-
-        // url = url + encodeURIComponent(arglist);
         url = url + encodeURI(arglist);
-        // url = url + arglist;
-         //alert("url: " + url);
-
-        var urlTimeBounds = "http://" + window.location.hostname + ":9002/svc/two_time_bounds?";
+        var urlTimeBounds = "http:
         var arglistTB = "";
         arglistTB = arglistTB.concat("serviceType=");
         arglistTB = arglistTB.concat("1");
@@ -1605,8 +1291,6 @@
         arglistTB = arglistTB.concat("&var2=");
         arglistTB = arglistTB.concat(variable2);
         urlTimeBounds = urlTimeBounds + encodeURI(arglistTB);
-        //alert("urlTimeBounds: " + urlTimeBounds);
-
         $.ajax({
             type: "GET",
             url: urlTimeBounds,
@@ -1614,9 +1298,7 @@
             data: null,
             success: function(data, textStatus, xhr) {
                 Response = data;
-                // alert("data: " + data);
                 if (data.success == false) {
-                    // alert(data.error);
                     Response = null;
                     var text = JSON.stringify(data, null, 4);
                     text = "Error in backend: <br>" + text; 
@@ -1625,82 +1307,56 @@
                     return;
                 }
                 var text = JSON.stringify(data, null, 4);
-                // alert("text: " + text);
-                // $("#Response").html("<pre>"+text+"</pre>");
-                // $("#Response").html(text);
-
                 var tb1 = data.time_bounds1;
                 var bds1 = String(tb1).split(",");
-                // alert("tb1: " + tb1);
-                // alert("bds1: " + bds1);
                 var lowerT1 = parseInt(bds1[0]);
-                // alert("inside ajax, lowerT1: " + lowerT1);
                 var upperT1 = parseInt(bds1[1]);
-                // alert("upperT1: " + upperT1);
-
                 var tb2 = data.time_bounds2;
                 var bds2 = String(tb2).split(",");
-                // alert("tb2: " + tb2);
-                // alert("bds2: " + bds2);
                 var lowerT2 = parseInt(bds2[0]);
-                // alert("inside ajax, lowerT2: " + lowerT2);
                 var upperT2 = parseInt(bds2[1]);
-                // alert("upperT2: " + upperT2);
-
                 var t0I = parseInt(t0);
                 var t1I = parseInt(t1);
-                // alert("t0: " + t0I);
-                // alert("t1: " + t1I);
-
                 var lowerT, upperT;
-                // compute the intersection of the two data bounds
-
-                if (lowerT1 == 0  || upperT1 == 0){ // no data-1
+                if (lowerT1 == 0  || upperT1 == 0){ 
                   alert("We do not have data for the data-1 source and variable configuration.");
                   return;
                 }
-                else if (lowerT2 == 0  || upperT2 == 0){ // no data-2
+                else if (lowerT2 == 0  || upperT2 == 0){ 
                   alert("We do not have data for the data-2 source and variable configuration.");
                   return;
                 }
-                else if (lowerT2 > upperT1 || lowerT1 > upperT2) { // no intersection
+                else if (lowerT2 > upperT1 || lowerT1 > upperT2) { 
                   alert("The two data sets/vars do not have a common time range.");
                   return;
                 }
-                else { // compute intersection
-                  if (lowerT1 > lowerT2) { // pick bigger lower time bound
+                else { 
+                  if (lowerT1 > lowerT2) { 
                     lowerT = lowerT1;
                   }
                   else {
                     lowerT = lowerT2;
                   }
-
-                  if (upperT1 > upperT2) { // pick smaller upper time bound
+                  if (upperT1 > upperT2) { 
                     upperT = upperT2;
                   }
                   else {
                     upperT = upperT1;
                   }
                 }
-                // alert("lowerT: " + lowerT);
-                // alert("upperT: " + upperT);
-
                 if (t0I < lowerT && t1I < lowerT ||
                     t0I > upperT && t1I > upperT) {
                   alert("We do not have data that span your time range. Try the range inside ["+lowerT+", "+upperT+"].");
                   return;
                 }
-
                 if (t0I < lowerT && t1I <= upperT) {
                   alert("Your start year-month is out of bound. It has to be in or later than " + lowerT +
                         ". We will use the range ["+lowerT+", "+t1I+"] for you.");
                 }
-
                 if (t1I > upperT && t0I >= lowerT) {
                   alert("Your end year-month is out of bound. It has to be in or earlier than " + upperT +
                         ". We will use the range ["+t0I+", "+upperT+"] for you.");
                 }
-
                 if (t0I < lowerT && t1I > upperT ) {
                   alert("Both of your start and end year-months are out of bounds. They have to be in or earlier than " + upperT +
                         ", and in or later than " + lowerT + ". We will use the range ["+lowerT+", "+upperT+"] for you.");
@@ -1709,15 +1365,10 @@
             error: function(xhr, textStatus, errorThrown) {
 		$("#Response").html("error!");
 		$("#data_url").html("error!");
-                // alert("xhr.status: "+xhr.status);
-                // alert("error status: "+textStatus);
             },
             complete: function(xhr, textStatus) {
-                //alert("complete status: "+textStatus);
             }
         });
-
-
         $.ajax({
             type: "GET",
             url: url,
@@ -1725,53 +1376,33 @@
             data: null,
             success: function(data, textStatus, xhr) {
                 Response = data;
-                // alert("data: " + data);
                 if (data.success == false) {
-                    // alert(data.error);
                     Response = null;
                     var text = JSON.stringify(data, null, 4);
                     text = "Error in backend: <br>" + text; 
-                    // $("#Response").html("<span style='color:red'>" + text + "</span>");
                     $("#Response").html(text);
                     $("#data_url").html(text);
                     return;
                 }
                 var text = JSON.stringify(data, null, 4);
-                // alert(text);
-                // $("#Response").html("<pre>"+text+"</pre>");
                 $("#Response").html(text);
-
                 var html = "<img src='"+data.url+"' width='820'/>";
-                // alert(html);
                 $("#Image").html(html);
-
-                // post dataUrl to textarea and enable download button
                 $("#data_url").html(data.dataUrl);
                 enable_download_button();
             },
             error: function(xhr, textStatus, errorThrown) {
                 $("#Response").html("error!");
                 $("#data_url").html("error!");
-                // alert("xhr.status: "+xhr.status);
-                // alert("error status: "+textStatus);
             },
             complete: function(xhr, textStatus) {
-                //alert("complete status: "+textStatus);
             }
         });
-
       });
-
     });
-    
   </script>
-  }
-  
-  @main("Parameters of ConfId", scripts){
-	
-	@flash_message()   
-	 
-    <p>
+} @main("Parameters of ConfId", scripts){ @flash_message()
+<p>
 <div id="dataSourceP" style="display: none;">@parameters.getDataSourceP()</div>
 <div id="variableNameP" style="display: none;">@parameters.getVariableNameP()</div>
 <div id="pressureRangeP" style="display: none;">@parameters.getPressureRangeP()</div>
@@ -1780,7 +1411,7 @@
 <div id="pressureRangeE" style="display: none;">@parameters.getPressureRangeE()</div>
 <div id="startYearMonth" style="display: none;">@parameters.getStartYearMonth()</div>
 <div id="endYearMonth" style="display: none;">@parameters.getEndYearMonth()</div>
-<div id="selectMonths" style="display: none;" >@parameters.getSelectMonths()</div>
+<div id="selectMonths" style="display: none;">@parameters.getSelectMonths()</div>
 <div id="monthsPara" style="display: none;">@parameters.getMonth()</div>
 <div id="startLat" style="display: none;">@parameters.getStartLat()</div>
 <div id="endLat" style="display: none;">@parameters.getEndLat()</div>
@@ -1789,7 +1420,7 @@
 <div id="div_X" style="display: none;">@parameters.getX()</div>
 <div id="div_Y" style="display: none;">@parameters.getY()</div>
 <div id="div_Z" style="display: none;">@parameters.getZ()</div>
-<div id="binMin" style="display: none;" >@parameters.getBin_min()</div>
+<div id="binMin" style="display: none;">@parameters.getBin_min()</div>
 <div id="binMax" style="display: none;">@parameters.getBin_max()</div>
 <div id="binNum" style="display: none;">@parameters.getBin_n()</div>
 <div id="executionPurpose" style="display: none;">@parameters.getExecutionPurpose()</div>
@@ -1797,352 +1428,317 @@
 <div id="dataURL" style="display: none;">@parameters.getDataURL()</div>
 <div id="serviceResponseText" style="display: none;">@parameters.getServiceResponseText()</div>
 <table border="1" align="center">
-
-<tr>
-<td colspan="4">
-<center>
-<b>Service: Conditional Sampling with One Variable</b><br><br>
-This service sorts one variable by the values of another variable (environmental condition, e.g. SST) 
-and displays the averaged value of the first variable as a function of the bin value of the second variable.
-If the first variable is a two-dimensional variable, the plot will be a X-Y plot. 
-If the first variable is a three-dimensional variable, the plot will be a colored profile image. <br><br> 
-</center>
-</td>
-</tr>
-
-<tr>
-<td colspan="2">
-<center>
-Physical Variable (sampled variable)
-</center>
-</td>
-
-<td colspan="2">
-<center>
-Environmental Variable (sampling variable)
-</center>
-</td>
-</tr>
-
-<tr>
-<td>source:</td><td><select name="data1", id="data1" onchange="select_data1(1)">
-<optgroup label="Model: Historical">
-<option selected="CCCMA/CANESM2">CCCMA/CANESM2</option>
-<option>GFDL/ESM2G</option>
-<option>GISS/E2-H</option>
-<option>GISS/E2-R</option>
-<option>NCAR/CAM5</option>
-<option>NCC/NORESM</option>
-<option>UKMO/HadGEM2-ES</option>
-</optgroup>
-<optgroup label="Model: AMIP">
-<option>CCCMA/CANAM4</option>
-<option>CSIRO/MK3.6</option>
-<option>GFDL/CM3</option>
-<option>IPSL/CM5A-LR</option>
-<option>MIROC/MIROC5</option>
-<option>UKMO/HadGEM2-A</option>
-</optgroup>
-<!-- <option>NASA/obs4MIPs</option>  -->
-<optgroup label="Observation">
-<option>NASA/MODIS</option>
-<option>NASA/AMSRE</option>
-<option>NASA/TRMM</option>
-<option>NASA/GPCP</option>
-<option>NASA/QuikSCAT</option>
-<option>NASA/AVISO</option>
-<option>NASA/GRACE</option>
-<option>NOAA/NODC</option>
-<option>NASA/CERES</option>
-<option>NASA/AIRS</option>
-<option>NASA/MLS</option>
-<option>ARGO/ARGO</option>
-</optgroup>
-<optgroup label="Reanalysis">
-<option>ECMWF/interim</option>
-</optgroup>
-</select></td>
-
-<td>source:</td><td><select name="data2", id="data2" onchange="select_data1(2)">
-<optgroup label="Model: Historical">
-<option selected="CCCMA/CANESM2">CCCMA/CANESM2</option>
-<option>GFDL/ESM2G</option>
-<option>GISS/E2-H</option>
-<option>GISS/E2-R</option>
-<option>NCAR/CAM5</option>
-<option>NCC/NORESM</option>
-<option>UKMO/HadGEM2-ES</option>
-</optgroup>
-<optgroup label="Model: AMIP">
-<option>CCCMA/CANAM4</option>
-<option>CSIRO/MK3.6</option>
-<option>GFDL/CM3</option>
-<option>IPSL/CM5A-LR</option>
-<option>MIROC/MIROC5</option>
-<option>UKMO/HadGEM2-A</option>
-</optgroup>
-<!-- <option>NASA/obs4MIPs</option>  -->
-<optgroup label="Observation">
-<option>NASA/MODIS</option>
-<option>NASA/AMSRE</option>
-<option>NASA/TRMM</option>
-<option>NASA/GPCP</option>
-<option>NASA/QuikSCAT</option>
-<option>NASA/AVISO</option>
-<option>NASA/GRACE</option>
-<option>NOAA/NODC</option>
-<option>NASA/CERES</option>
-<option>NASA/AIRS</option>
-<option>NASA/MLS</option>
-<option>ARGO/ARGO</option>
-</optgroup>
-<optgroup label="Reanalysis">
-<option>ECMWF/interim</option>
-</optgroup>
-</select></td>
-
-</tr>
-
-<tr>
-
-<td>variable name:</td><td><select name="var1", id="var1" onchange="select_var1(1)">
-<option>Precipitation Flux</option>
-<option>Total Cloud Fraction</option>
-<option>Surface Temperature</option>
-<option>Sea Surface Temperature</option>
-<option>Eastward Near-Surface Wind</option>
-<option>Northward Near-Surface Wind</option>
-<option>Near-Surface Wind Speed</option>
-<option>Sea Surface Height</option>
-<option>Leaf Area Index</option>
-<option>Equivalent Water Height Over Land</option>
-<option>Equivalent Water Height Over Ocean</option>
-<option>Ocean Heat Content Anomaly within 700 m Depth</option>
-<option>Ocean Heat Content Anomaly within 2000 m Depth</option>
-<option>Surface Downwelling Longwave Radiation</option>
-<option>Surface Downwelling Shortwave Radiation</option>
-<option>Surface Upwelling Longwave Radiation</option>
-<option>Surface Upwelling Shortwave Radiation</option>
-<option>Surface Downwelling Clear-Sky Longwave Radiation</option>
-<option>Surface Downwelling Clear-Sky Shortwave Radiation</option>
-<option>Surface Upwelling Clear-Sky Shortwave Radiation</option>
-<option>TOA Incident Shortwave Radiation</option>
-<option>TOA Outgoing Longwave Radiation</option>
-<option>TOA Outgoing Shortwave Radiation</option>
-<option>TOA Outgoing Clear-Sky Longwave Radiation</option>
-<option>TOA Outgoing Clear-Sky Shortwave Radiation</option>
-<option>Air Temperature</option>
-<option>Specific Humidity</option>
-<option>Cloud Ice Water Content</option>
-<option>Cloud Liquid Water Content</option>
-<option>Ocean Temperature</option>
-<option>Ocean Salinity</option>
-<option>Vertical Wind Velocity</option>
-<option>Relative Humidity</option>
-</select>
-</td>
-
-
-<td>variable name:</td><td><select name="var2", id="var2" onchange="select_var1(2)">
-<option>Precipitation Flux</option>
-<option>Total Cloud Fraction</option>
-<option>Surface Temperature</option>
-<option>Sea Surface Temperature</option>
-<option>Eastward Near-Surface Wind</option>
-<option>Northward Near-Surface Wind</option>
-<option>Near-Surface Wind Speed</option>
-<option>Sea Surface Height</option>
-<option>Leaf Area Index</option>
-<option>Equivalent Water Height Over Land</option>
-<option>Equivalent Water Height Over Ocean</option>
-<option>Ocean Heat Content Anomaly within 700 m Depth</option>
-<option>Ocean Heat Content Anomaly within 2000 m Depth</option>
-<option>Surface Downwelling Longwave Radiation</option>
-<option>Surface Downwelling Shortwave Radiation</option>
-<option>Surface Upwelling Longwave Radiation</option>
-<option>Surface Upwelling Shortwave Radiation</option>
-<option>Surface Downwelling Clear-Sky Longwave Radiation</option>
-<option>Surface Downwelling Clear-Sky Shortwave Radiation</option>
-<option>Surface Upwelling Clear-Sky Shortwave Radiation</option>
-<option>TOA Incident Shortwave Radiation</option>
-<option>TOA Outgoing Longwave Radiation</option>
-<option>TOA Outgoing Shortwave Radiation</option>
-<option>TOA Outgoing Clear-Sky Longwave Radiation</option>
-<option>TOA Outgoing Clear-Sky Shortwave Radiation</option>
-<option>Air Temperature</option>
-<option>Specific Humidity</option>
-<option>Cloud Ice Water Content</option>
-<option>Cloud Liquid Water Content</option>
-<option>Ocean Temperature</option>
-<option>Ocean Salinity</option>
-<option>Vertical Wind Velocity</option>
-<option>Relative Humidity</option>
-</select>
-</td>
-
-</tr>
-
-<tr>
-
-<td>
-atmosphere pressure range (hPa) <br> or ocean pressure range (dbar):
-</td>
-<td>
-<input id="pres1" value="200, 900" alt="pressure"/>
-</td>
-
-<td>
-atmosphere pressure level (hPa) <br> or ocean pressure level (dbar):
-</td>
-<td>
-<input id="pres2" value="500" alt="pressure"/>
-</td>
-
-</tr>
-
-<tr>
-</tr>
-
-<tr>
-<td>start year-month:</td><td><input id="t0" value="2004-01" alt="start"/></td>
-<td>end year-month:</td><td><input id="t1" value="2004-12" alt="end"/></td>
-</tr>
-
-
-<tr>
-<td>select months:</td>
-<td><select name="months" id="months" onchange="select_months()">
-<option id="all">select all</option>
-<option id="none">select none</option>
-<option id="summer">Summer:Jun-Jul-Aug</option>
-<option id="autum">Autumn:Sep-Oct-Nov</option>
-<option id="winter">Winter:Dec-Jan-Feb</option>
-<option id="spring">Spring:Mar-Apr-May</option> </select>
-</td>
-<td>
-</td>
-<td>
-</tr>
-
-<tr>
-<td>
-<label><input type="checkbox" name="option1" id="Jan" value="Jan" /> Jan<br></label>
-<label><input type="checkbox" name="option1" id="Feb" value="Feb" /> Feb<br></label>
-<label><input type="checkbox" name="option1" id="Mar" value="Mar" /> Mar<br></label>
-</td>
-<td>
-<label><input type="checkbox" name="option1" id="Apr" value="Apr" /> Apr<br></label>
-<label><input type="checkbox" name="option1" id="May" value="May" /> May<br></label>
-<label><input type="checkbox" name="option1" id="Jun" value="Jun" /> Jun<br></label>
-</td>
-<td>
-<label><input type="checkbox" name="option1" id="Jul" value="Jul" /> Jul<br></label>
-<label><input type="checkbox" name="option1" id="Aug" value="Aug" /> Aug<br></label>
-<label><input type="checkbox" name="option1" id="Sep" value="Sep" /> Sep<br></label>
-</td>
-<td>
-<label><input type="checkbox" name="option1" id="Oct" value="Oct" /> Oct<br></label>
-<label><input type="checkbox" name="option1" id="Nov" value="Nov" /> Nov<br></label>
-<label><input type="checkbox" name="option1" id="Dec" value="Dec" /> Dec<br></label>
-</td>
-</tr>
-
-
-<tr>
-<td>start lat (deg):</td><td><input id="lat0" value="-90"/></td>
-<td>end lat (deg):</td><td><input id="lat1" value="90"/></td>
-</tr>
-
-<tr>
-<td>start lon (deg):</td><td><input id="lon0" value="0"/></td>
-<td>end lon (deg):</td><td><input id="lon1" value="360"/></td>
-</tr>
-
-
-<tr>
-<td colspan="1" rowspan="3">
-display option:
-</td>
-<td colspan="3">
-<form>X-axis (sampling variable) scale: <input type="radio" name="scale1" value="linear" id="radioXLin" checked>linear
-<input type="radio" name="scale1" value="logarithmic" id="radioXLog">logarithmic
-</form>
-</td>
-</tr>
-
-<tr>
-<td colspan="3">
-<form>Y-axis (sampled variable or pressure) scale: <input type="radio" name="scale1" value="linear" id="radioYLin" checked>linear
-<input type="radio" name="scale1" value="logarithmic" id="radioYLog">logarithmic
-</form>
-</tr>
-
-<tr>
-<td colspan="3">
-<form>Z-axis (color) scale: <input type="radio" name="scale1" value="linear" id="radioZLin" checked>linear
-<input type="radio" name="scale1" value="logarithmic" id="radioZLog">logarithmic
-</form>
-</td>
-</tr>
-
-
-<tr>
-<td colspan="1" rowspan="2">
-sampling variable binning specification:
-</td>
-<td colspan="3">
-<form>default: <input onclick="setDefault()" type="radio" name="default1" value="" id="radioDef" checked>
-</td>
-</tr>
-<tr>
-<td colspan="3">
-customized: <input onclick="setCustomized()" type="radio" name="default1" value="" id="radioCus">
-Min: <input id="min1" value="" alt=""/> 
-Max: <input id="max1" value="" alt=""/>
-number of bins: <input id="bins1" value="" alt=""/>
-</form> 
-</td>
-
-</tr>
-
-<tr>
-<td colspan="1">
-Execution purpose
-</td>
-<td colspan="3">
-<form>
-<textarea name="purpose" id="purpose" rows="4" cols="50"> </textarea>
-</form>
-</td>
-</tr>
-
-
-<tr>
-<td colspan="2" align="center"><input id="conditionalSamp" type="submit" value="            Run  Again            " style="height:28px"/></td>
-<form>
-<td colspan="2" align="center"><input id="download_data" type="button" value="Download Data" style="height:28px"/>
-</td>
-</form>
-
-</tr>
-
-<tr>
-<td colspan="4">
-<div id="Image">Image Here</div>
-</td>
-</tr>
-
-<tr>
-<td colspan="4" align="center">
-<textarea readonly id="data_url" cols="150" rows="2">Data URL Here</textarea>
-</td>
-</tr>
-
-<tr>
-<td colspan="4" align="center">
-<textarea id="Response" cols="150" rows="6">Service Response Text Here</textarea>
-</td>
-</tr>
-
+	<tr>
+		<td colspan="4">
+			<center>
+				<b>Service: Conditional Sampling with One Variable</b><br>
+				<br> This service sorts one variable by the values of another
+				variable (environmental condition, e.g. SST) and displays the
+				averaged value of the first variable as a function of the bin value
+				of the second variable. If the first variable is a two-dimensional
+				variable, the plot will be a X-Y plot. If the first variable is a
+				three-dimensional variable, the plot will be a colored profile
+				image. <br>
+				<br>
+			</center>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="2">
+			<center>Physical Variable (sampled variable)</center>
+		</td>
+		<td colspan="2">
+			<center>Environmental Variable (sampling variable)</center>
+		</td>
+	</tr>
+	<tr>
+		<td>source:</td>
+		<td><select name="data1" , id="data1" onchange="select_data1(1)">
+				<optgroup label="Model: Historical">
+					<option selected="CCCMA/CANESM2">CCCMA/CANESM2</option>
+					<option>GFDL/ESM2G</option>
+					<option>GISS/E2-H</option>
+					<option>GISS/E2-R</option>
+					<option>NCAR/CAM5</option>
+					<option>NCC/NORESM</option>
+					<option>UKMO/HadGEM2-ES</option>
+				</optgroup>
+				<optgroup label="Model: AMIP">
+					<option>CCCMA/CANAM4</option>
+					<option>CSIRO/MK3.6</option>
+					<option>GFDL/CM3</option>
+					<option>IPSL/CM5A-LR</option>
+					<option>MIROC/MIROC5</option>
+					<option>UKMO/HadGEM2-A</option>
+				</optgroup>
+				<optgroup label="Observation">
+					<option>NASA/MODIS</option>
+					<option>NASA/AMSRE</option>
+					<option>NASA/TRMM</option>
+					<option>NASA/GPCP</option>
+					<option>NASA/QuikSCAT</option>
+					<option>NASA/AVISO</option>
+					<option>NASA/GRACE</option>
+					<option>NOAA/NODC</option>
+					<option>NASA/CERES</option>
+					<option>NASA/AIRS</option>
+					<option>NASA/MLS</option>
+					<option>ARGO/ARGO</option>
+				</optgroup>
+				<optgroup label="Reanalysis">
+					<option>ECMWF/interim</option>
+				</optgroup>
+		</select></td>
+		<td>source:</td>
+		<td><select name="data2" , id="data2" onchange="select_data1(2)">
+				<optgroup label="Model: Historical">
+					<option selected="CCCMA/CANESM2">CCCMA/CANESM2</option>
+					<option>GFDL/ESM2G</option>
+					<option>GISS/E2-H</option>
+					<option>GISS/E2-R</option>
+					<option>NCAR/CAM5</option>
+					<option>NCC/NORESM</option>
+					<option>UKMO/HadGEM2-ES</option>
+				</optgroup>
+				<optgroup label="Model: AMIP">
+					<option>CCCMA/CANAM4</option>
+					<option>CSIRO/MK3.6</option>
+					<option>GFDL/CM3</option>
+					<option>IPSL/CM5A-LR</option>
+					<option>MIROC/MIROC5</option>
+					<option>UKMO/HadGEM2-A</option>
+				</optgroup>
+				<optgroup label="Observation">
+					<option>NASA/MODIS</option>
+					<option>NASA/AMSRE</option>
+					<option>NASA/TRMM</option>
+					<option>NASA/GPCP</option>
+					<option>NASA/QuikSCAT</option>
+					<option>NASA/AVISO</option>
+					<option>NASA/GRACE</option>
+					<option>NOAA/NODC</option>
+					<option>NASA/CERES</option>
+					<option>NASA/AIRS</option>
+					<option>NASA/MLS</option>
+					<option>ARGO/ARGO</option>
+				</optgroup>
+				<optgroup label="Reanalysis">
+					<option>ECMWF/interim</option>
+				</optgroup>
+		</select></td>
+	</tr>
+	<tr>
+		<td>variable name:</td>
+		<td><select name="var1" , id="var1" onchange="select_var1(1)">
+				<option>Precipitation Flux</option>
+				<option>Total Cloud Fraction</option>
+				<option>Surface Temperature</option>
+				<option>Sea Surface Temperature</option>
+				<option>Eastward Near-Surface Wind</option>
+				<option>Northward Near-Surface Wind</option>
+				<option>Near-Surface Wind Speed</option>
+				<option>Sea Surface Height</option>
+				<option>Leaf Area Index</option>
+				<option>Equivalent Water Height Over Land</option>
+				<option>Equivalent Water Height Over Ocean</option>
+				<option>Ocean Heat Content Anomaly within 700 m Depth</option>
+				<option>Ocean Heat Content Anomaly within 2000 m Depth</option>
+				<option>Surface Downwelling Longwave Radiation</option>
+				<option>Surface Downwelling Shortwave Radiation</option>
+				<option>Surface Upwelling Longwave Radiation</option>
+				<option>Surface Upwelling Shortwave Radiation</option>
+				<option>Surface Downwelling Clear-Sky Longwave Radiation</option>
+				<option>Surface Downwelling Clear-Sky Shortwave Radiation</option>
+				<option>Surface Upwelling Clear-Sky Shortwave Radiation</option>
+				<option>TOA Incident Shortwave Radiation</option>
+				<option>TOA Outgoing Longwave Radiation</option>
+				<option>TOA Outgoing Shortwave Radiation</option>
+				<option>TOA Outgoing Clear-Sky Longwave Radiation</option>
+				<option>TOA Outgoing Clear-Sky Shortwave Radiation</option>
+				<option>Air Temperature</option>
+				<option>Specific Humidity</option>
+				<option>Cloud Ice Water Content</option>
+				<option>Cloud Liquid Water Content</option>
+				<option>Ocean Temperature</option>
+				<option>Ocean Salinity</option>
+				<option>Vertical Wind Velocity</option>
+				<option>Relative Humidity</option>
+		</select></td>
+		<td>variable name:</td>
+		<td><select name="var2" , id="var2" onchange="select_var1(2)">
+				<option>Precipitation Flux</option>
+				<option>Total Cloud Fraction</option>
+				<option>Surface Temperature</option>
+				<option>Sea Surface Temperature</option>
+				<option>Eastward Near-Surface Wind</option>
+				<option>Northward Near-Surface Wind</option>
+				<option>Near-Surface Wind Speed</option>
+				<option>Sea Surface Height</option>
+				<option>Leaf Area Index</option>
+				<option>Equivalent Water Height Over Land</option>
+				<option>Equivalent Water Height Over Ocean</option>
+				<option>Ocean Heat Content Anomaly within 700 m Depth</option>
+				<option>Ocean Heat Content Anomaly within 2000 m Depth</option>
+				<option>Surface Downwelling Longwave Radiation</option>
+				<option>Surface Downwelling Shortwave Radiation</option>
+				<option>Surface Upwelling Longwave Radiation</option>
+				<option>Surface Upwelling Shortwave Radiation</option>
+				<option>Surface Downwelling Clear-Sky Longwave Radiation</option>
+				<option>Surface Downwelling Clear-Sky Shortwave Radiation</option>
+				<option>Surface Upwelling Clear-Sky Shortwave Radiation</option>
+				<option>TOA Incident Shortwave Radiation</option>
+				<option>TOA Outgoing Longwave Radiation</option>
+				<option>TOA Outgoing Shortwave Radiation</option>
+				<option>TOA Outgoing Clear-Sky Longwave Radiation</option>
+				<option>TOA Outgoing Clear-Sky Shortwave Radiation</option>
+				<option>Air Temperature</option>
+				<option>Specific Humidity</option>
+				<option>Cloud Ice Water Content</option>
+				<option>Cloud Liquid Water Content</option>
+				<option>Ocean Temperature</option>
+				<option>Ocean Salinity</option>
+				<option>Vertical Wind Velocity</option>
+				<option>Relative Humidity</option>
+		</select></td>
+	</tr>
+	<tr>
+		<td>atmosphere pressure range (hPa) <br> or ocean pressure
+			range (dbar):
+		</td>
+		<td><input id="pres1" value="200, 900" alt="pressure" /></td>
+		<td>atmosphere pressure level (hPa) <br> or ocean pressure
+			level (dbar):
+		</td>
+		<td><input id="pres2" value="500" alt="pressure" /></td>
+	</tr>
+	<tr>
+	</tr>
+	<tr>
+		<td>start year-month:</td>
+		<td><input id="t0" value="2004-01" alt="start" /></td>
+		<td>end year-month:</td>
+		<td><input id="t1" value="2004-12" alt="end" /></td>
+	</tr>
+	<tr>
+		<td>select months:</td>
+		<td><select name="months" id="months" onchange="select_months()">
+				<option id="all">select all</option>
+				<option id="none">select none</option>
+				<option id="summer">Summer:Jun-Jul-Aug</option>
+				<option id="autum">Autumn:Sep-Oct-Nov</option>
+				<option id="winter">Winter:Dec-Jan-Feb</option>
+				<option id="spring">Spring:Mar-Apr-May</option>
+		</select></td>
+		<td></td>
+		<td>
+	</tr>
+	<tr>
+		<td><label><input type="checkbox" name="option1" id="Jan"
+				value="Jan" /> Jan<br></label> <label><input type="checkbox"
+				name="option1" id="Feb" value="Feb" /> Feb<br></label> <label><input
+				type="checkbox" name="option1" id="Mar" value="Mar" /> Mar<br></label>
+		</td>
+		<td><label><input type="checkbox" name="option1" id="Apr"
+				value="Apr" /> Apr<br></label> <label><input type="checkbox"
+				name="option1" id="May" value="May" /> May<br></label> <label><input
+				type="checkbox" name="option1" id="Jun" value="Jun" /> Jun<br></label>
+		</td>
+		<td><label><input type="checkbox" name="option1" id="Jul"
+				value="Jul" /> Jul<br></label> <label><input type="checkbox"
+				name="option1" id="Aug" value="Aug" /> Aug<br></label> <label><input
+				type="checkbox" name="option1" id="Sep" value="Sep" /> Sep<br></label>
+		</td>
+		<td><label><input type="checkbox" name="option1" id="Oct"
+				value="Oct" /> Oct<br></label> <label><input type="checkbox"
+				name="option1" id="Nov" value="Nov" /> Nov<br></label> <label><input
+				type="checkbox" name="option1" id="Dec" value="Dec" /> Dec<br></label>
+		</td>
+	</tr>
+	<tr>
+		<td>start lat (deg):</td>
+		<td><input id="lat0" value="-90" /></td>
+		<td>end lat (deg):</td>
+		<td><input id="lat1" value="90" /></td>
+	</tr>
+	<tr>
+		<td>start lon (deg):</td>
+		<td><input id="lon0" value="0" /></td>
+		<td>end lon (deg):</td>
+		<td><input id="lon1" value="360" /></td>
+	</tr>
+	<tr>
+		<td colspan="1" rowspan="3">display option:</td>
+		<td colspan="3">
+			<form>
+				X-axis (sampling variable) scale: <input type="radio" name="scale1"
+					value="linear" id="radioXLin" checked>linear <input
+					type="radio" name="scale1" value="logarithmic" id="radioXLog">logarithmic
+			</form>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="3">
+			<form>
+				Y-axis (sampled variable or pressure) scale: <input type="radio"
+					name="scale1" value="linear" id="radioYLin" checked>linear
+				<input type="radio" name="scale1" value="logarithmic" id="radioYLog">logarithmic
+			</form>
+	</tr>
+	<tr>
+		<td colspan="3">
+			<form>
+				Z-axis (color) scale: <input type="radio" name="scale1"
+					value="linear" id="radioZLin" checked>linear <input
+					type="radio" name="scale1" value="logarithmic" id="radioZLog">logarithmic
+			</form>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="1" rowspan="2">sampling variable binning
+			specification:</td>
+		<td colspan="3">
+			<form>
+				default: <input onclick="setDefault()" type="radio" name="default1"
+					value="" id="radioDef" checked>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="3">customized: <input onclick="setCustomized()"
+			type="radio" name="default1" value="" id="radioCus"> Min: <input
+			id="min1" value="" alt="" /> Max: <input id="max1" value="" alt="" />
+			number of bins: <input id="bins1" value="" alt="" />
+			</form>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="1">Execution purpose</td>
+		<td colspan="3">
+			<form>
+				<textarea name="purpose" id="purpose" rows="4" cols="50"> </textarea>
+			</form>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="2" align="center"><input id="conditionalSamp"
+			type="submit" value="            Run  Again            "
+			style="height: 28px" /></td>
+		<form>
+			<td colspan="2" align="center"><input id="download_data"
+				type="button" value="Download Data" style="height: 28px" /></td>
+		</form>
+	</tr>
+	<tr>
+		<td colspan="4">
+			<div id="Image">Image Here</div>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="4" align="center"><textarea readonly id="data_url"
+				cols="150" rows="2">Data URL Here</textarea></td>
+	</tr>
+	<tr>
+		<td colspan="4" align="center"><textarea id="Response" cols="150"
+				rows="6">Service Response Text Here</textarea></td>
+	</tr>
 </table>
-}
\ No newline at end of file
+}


[11/50] [abbrv] incubator-cmda git commit: Remove sensor home page

Posted by xi...@apache.org.
Remove sensor home page

Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/cabc2e67
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/cabc2e67
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/cabc2e67

Branch: refs/heads/master
Commit: cabc2e67fb9ee6970804dd64a10cf19572e4dfdf
Parents: 253db35
Author: mingqi830 <mq...@andrew.cmu.edu>
Authored: Wed Sep 2 16:44:49 2015 -0700
Committer: mingqi830 <mq...@andrew.cmu.edu>
Committed: Wed Sep 2 16:44:49 2015 -0700

----------------------------------------------------------------------
 app/controllers/Secured.java      | 43 ---------------
 app/views/bugReporting.scala.html | 51 ------------------
 app/views/bugs.scala.html         | 76 --------------------------
 app/views/header.scala.html       | 38 -------------
 app/views/index.scala.html        | 75 ++------------------------
 app/views/login.scala.html        | 34 ------------
 app/views/main.scala.html         | 98 ++++------------------------------
 app/views/sayHello.scala.html     |  4 --
 8 files changed, 15 insertions(+), 404 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/cabc2e67/app/controllers/Secured.java
----------------------------------------------------------------------
diff --git a/app/controllers/Secured.java b/app/controllers/Secured.java
deleted file mode 100644
index 9be6c60..0000000
--- a/app/controllers/Secured.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2013 Carnegie Mellon University Silicon Valley. 
- * All rights reserved. 
- * 
- * This program and the accompanying materials are made available
- * under the terms of dual licensing(GPL V2 for Research/Education
- * purposes). GNU Public License v2.0 which accompanies this distribution
- * is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
- * 
- * Please contact http://www.cmu.edu/silicon-valley/ if you have any 
- * questions.
- * 
- * */
-package controllers;
-
-import play.mvc.*;
-import play.mvc.Http.*;
-
-
-public class Secured extends Security.Authenticator {
-    
-    @Override
-    public String getUsername(Context ctx) {
-        return ctx.session().get("email");
-    }
-    
-    @Override
-    public Result onUnauthorized(Context ctx) {
-        return redirect(routes.Application.login());
-    }
-
-    // Access rights
-//    public static boolean isLoggedIn() {
-//    	if(Context.current().request().username().equals("admin@admin.com"))
-//    		return true;
-//    	else
-//    		return false;
-//    }
-    
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/cabc2e67/app/views/bugReporting.scala.html
----------------------------------------------------------------------
diff --git a/app/views/bugReporting.scala.html b/app/views/bugReporting.scala.html
deleted file mode 100644
index f893144..0000000
--- a/app/views/bugReporting.scala.html
+++ /dev/null
@@ -1,51 +0,0 @@
-@(bugReportForm: play.data.Form[BugReport])
-
-@import helper._
-@import helper.twitterBootstrap._
-
-@main("Bug Report") {
-    
-    @flash_message()
-        
-    @helper.form(action = routes.BugReportController.newReport) {
-        
-        <fieldset>
-            <legend>Bug Report</legend>
-            
-            @inputText(
-                bugReportForm("name"), 
-                '_label -> "Your name",                 
-                '_error -> bugReportForm.globalError                                
-            )
-            @inputText(
-                bugReportForm("title"), 
-                '_label -> "Bug Title",                 
-                '_error -> bugReportForm.globalError                                
-            )
-            @inputText(
-                bugReportForm("email"), 
-                '_label -> "Email",
-                '_helper -> "You must be a registered user to report a bug",                 
-                '_error -> bugReportForm.globalError                                
-            )
-            @inputText(
-                bugReportForm("organization"), 
-                '_label -> "Organization",                 
-                '_error -> bugReportForm.globalError                                
-            )
-            @textarea(
-                bugReportForm("description"), 
-                '_label -> "Description", 'cols -> 65, 'rows -> 7                                               
-            )
-           
-        </fieldset>
-        
-      
-        <div class="actions">
-            <input type="submit" class="btn primary" value="Submit">
-            <a href="@routes.Application.index" class="btn">Cancel</a>
-        </div>
-        
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/cabc2e67/app/views/bugs.scala.html
----------------------------------------------------------------------
diff --git a/app/views/bugs.scala.html b/app/views/bugs.scala.html
deleted file mode 100644
index 3c6d574..0000000
--- a/app/views/bugs.scala.html
+++ /dev/null
@@ -1,76 +0,0 @@
-
-@(bugReports: LinkedList[BugReport])
-
-@import helper._
-
-@main("Bug Reports") {
-    
-    @flash_message()
-        
-    <h1> Bug Reports(s)</h1>
-		<table class="table table-striped table-bordered ">
-			<thead ">
-			<tr>
-	    	  <td>Solved</td>
-	    	  <td>Report Title</td>
-	    	  <td>Reporter Name</td>
-	    	  <td>Reporter's email</td>
-	    	  <td>Reporter's organization</td>
-	    	  <td>Bug content</td>
-	    	  <td>Operation</td>
-	        </tr>
-			</thead>
-			
-			<tbody>
-            <tr>
-               @for(bugReport <- bugReports) {
-                    <tr>
-                    	<td>
-                    		@{if(bugReport.getSolved()==1){"Yes"}
-                    			else{"No"}
-                    		}
-                    			
-                    	</td>
-                        <td>
-                            @bugReport.getTitle()
-                        </td>
-                        <td> 
-                            @bugReport.getName()
-                        </td>
-                        <td> 
-                            @bugReport.getEmail()
-                        </td>
-                        <td> 
-                            @bugReport.getOrganization()
-                        </td>
-                        <td> 
-                            @bugReport.getDescription()
-                        </td>
-                        
-                        
-                        <td>
-                        <div class="input-group input-group-sm">
-                        <span>
-						@form(routes.BugReportController.solveReport()){
-               		 		<input name="idHolder" type="hidden" value="@bugReport.getId()">
-        					<input type="submit"  class="btn btn-success" value="Solve" onclick="return confirm('Are you sure you want to solve this issue?')">
-        				}	
-        				</span>
-                        <span>
-						@form(routes.BugReportController.deleteReport()){
-               		 		<input name="idHolder" type="hidden" value="@bugReport.getId()">
-        					<input type="submit"  class="btn btn-danger" value="Delete" onclick="return confirm('Are you sure you want to delete this issue?')">
-        				}	
-        				</span>
-        				</div>
-           				
-						
-						</td>
-                    </tr>
-                }
-            </tr>
-            </tbody>
-
-    </table>
-    
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/cabc2e67/app/views/header.scala.html
----------------------------------------------------------------------
diff --git a/app/views/header.scala.html b/app/views/header.scala.html
deleted file mode 100644
index 798a72e..0000000
--- a/app/views/header.scala.html
+++ /dev/null
@@ -1,38 +0,0 @@
-
-@()
-	<div class="navbar navbar-default navbar-fixed-top" role="navigation">
-		<div class="container">
-			<div class="navbar-header">
-				<button type="button" class="navbar-toggle" data-toggle="collapse"
-					data-target=".navbar-collapse">
-					<span class="sr-only">Toggle navigation</span> <span
-						class="icon-bar"></span> <span class="icon-bar"></span> <span
-						class="icon-bar"></span>
-				</button>
-				<a class="navbar-brand" style="padding-bottom: 0;" href="/"><img
-					src='@routes.Assets.at("images/NASA_JPL_logo.png")' style="height: 30px; width: 180px;">&nbsp&nbsp<img
-					src='@routes.Assets.at("images/logo.png")' style="height: 15px; width: 200px;"></a>
-			</div>
-			<div class="navbar-collapse collapse" style="height:">
-				<ul class="nav navbar-nav navbar-right">
-
-					<li><a href="@routes.Application.index()">Home</a></li>				
-											
-					<li><a href="@routes.AboutusController.aboutus()">About Us</a></li>
-
-					@if(!session.get("email")){
-					
-						<form class="navbar-form navbar-right" action="@routes.Application.login()">
-							<button type="submit" class="btn btn-success">Sign in</button>
-						</form>
-					}else{
-						<form class="navbar-form navbar-right" action="@routes.Application.logout()">
-							<button type="submit" class="btn btn-success">Log out</button>
-						</form>
-					}
-					
-				</ul>
-			</div>
-			<!--/.nav-collapse -->
-		</div>
-	</div>

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/cabc2e67/app/views/index.scala.html
----------------------------------------------------------------------
diff --git a/app/views/index.scala.html b/app/views/index.scala.html
index f7dd2e9..adb4b31 100644
--- a/app/views/index.scala.html
+++ b/app/views/index.scala.html
@@ -1,74 +1,7 @@
+@(message: String)
 
-@import helper._ 
+@main("Welcome to Play") {
 
-@main("Carnegie Mellon University Sensor Data Storage"){
+    @play20.welcome(message, style = "Java")
 
-	<div class="jumbotron">
-		<div class="row">
-			<div class="col-lg-6">
-
-				<img src='@routes.Assets.at("images/fireimp_small.jpg")' style="padding-bottom: 0;">
-
-			</div>
-			<div class="col-lg-6">
-				<h1>Internet of Things Data Service Platform</h1>
-				<p>A federated cloud platform for mobile data-centric service
-					development and sharing.</p>
-				<p>
-					<a class="btn btn-lg btn-default"
-						href="https://drive.google.com/file/d/0B9nWqnYxEA3HSEo3Zkx2QWJEVlE/edit?usp=sharing">Getting Started &raquo;</a>
-				</p>
-			</div>
-		</div>
-	</div>
-
-	<!-- Content -->
-	<div class="row">
-		<div class="col-lg-4">
-			<h2>Tutorial</h2>
-			<p>
-			Here is a simple guide on <a 
-				href="https://drive.google.com/file/d/0B0uwbnoOCGhEWGVuZjMtcDljcFE/edit?usp=sharing"
-				>how to use the platform</a>.
-			</p>
-		</div>
-		<div class="col-lg-4">
-			<h2>Visualization</h2>
-			<p>
-				A <a href="http://sensorserviceplatform.github.io/Visualization/">visualization</a> of the sensor network.
-			</p>
-		</div>
-		<div class="col-lg-4">
-			<h2>Virtual Sensor</h2>
-			<p>
-				A <a href="http://sensorserviceplatform.github.io/VirtualSensorEditor/">virtual sensor</a> tour.
-			</p>
-		</div>
-	</div>
-	<div class="row">
-		<div class="col-lg-4">
-			<h2>Open Source</h2>
-			<p>
-				All the code is currently hosted on Github. Feel free to contribute
-				to this <a href="https://github.com/cmusv-sc">community</a>.
-			</p>
-		</div>
-		<div class="col-lg-4">
-			<h2>To Dos</h2>
-			<p>
-				Check the open <a
-					href="https://github.com/cmusv-sc/ArchF2013-Project3-FT/issues?page=1&state=open">issues</a>
-				on Github.
-			</p>
-		</div>
-		<div class="col-lg-4">
-			<h2>More information</h2>
-			<p>
-				For more information about this project, and a good general
-				overview, see the <a
-					href="https://docs.google.com/open?id=0B6VEjpK6RPgVN2Q1aDhRRjJid0U">slide
-					deck</a> covering relevant features.
-			</p>
-		</div>
-	</div>
-}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/cabc2e67/app/views/login.scala.html
----------------------------------------------------------------------
diff --git a/app/views/login.scala.html b/app/views/login.scala.html
deleted file mode 100644
index d5a58a4..0000000
--- a/app/views/login.scala.html
+++ /dev/null
@@ -1,34 +0,0 @@
-@(form: Form[Application.Login])
-
-@main("Login") {  
-    
-    @helper.form(routes.Application.authenticate) {
-        
-        <h1>Sign in</h1>
-        
-        @if(form.hasGlobalErrors) { 
-            <p class="error">
-                @form.globalError.message
-            </p>
-        }
-        
-        @if(flash.contains("success")) {
-            <p class="success">
-                @flash.get("success")
-            </p>
-        }
-        
-        <p>
-            <input type="email" name="email" placeholder="Email" value="@form("email").value">
-        </p>
-
-        <p>
-            <input type="password" name="password" placeholder="Password">
-        </p>
-        <p>
-            <button type="submit" class="btn btn-primary">Login</button>
-        </p>
-        }
-}
-    
-

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/cabc2e67/app/views/main.scala.html
----------------------------------------------------------------------
diff --git a/app/views/main.scala.html b/app/views/main.scala.html
index a7e43d3..e919a4c 100644
--- a/app/views/main.scala.html
+++ b/app/views/main.scala.html
@@ -1,91 +1,15 @@
-@(title: String, moreScripts: Html = Html(""))(content: Html) 
-
+@(title: String)(content: Html)
 
 <!DOCTYPE html>
 
 <html>
-<head>
-
-<title>@title</title>
-<meta charset="utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
-
-<link rel="stylesheet"
-	href='@routes.Assets.at("stylesheets/bootstrap.css")'>
-<link rel="stylesheet"
-	href='@routes.Assets.at("stylesheets/navbar-fixed-top.css")'>
-<link rel="stylesheet"
-	href='@routes.Assets.at("stylesheets/custom.css")'>
-<link rel="stylesheet" media="screen"
-	href='@routes.Assets.at("stylesheets/main.css")'>
-<link rel="shortcut icon" type="image/png"
-	href='@routes.Assets.at("images/favicon.png")'>
-
-
-
-<link
-	href='@routes.Assets.at("stylesheets/bootstrap-editable.css")'
-	rel="stylesheet" />
-<!--[if (!IE)|(gte IE 8)]><!-->
-  <link href='@routes.Assets.at("stylesheets/visualsearch-datauri.css")' media="screen" rel="stylesheet" type="text/css" />
-<!--<![endif]-->
-<!--[if lte IE 7]><!-->
-  <link href='@routes.Assets.at("stylesheets/visualsearch.css")' media="screen" rel="stylesheet" type="text/css" />
-<!--<![endif]-->
-
-<script src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'
-	type="text/javascript"></script>
-<script src='@routes.Assets.at("javascripts/jquery-ui-1.10.4.min.js")'
-	type="text/javascript"></script>
-	
-<script src='@routes.Assets.at("javascripts/bootstrap.min.js")'
-	type="text/javascript"></script>
-<script src='@routes.Assets.at("javascripts/bootstrap-editable.min.js")' 
-	type="text/javascript"></script>
-	
-<script src='@routes.Assets.at("javascripts/underscore-1.5.2.js")' 
-	type="text/javascript"></script>
-<script src='@routes.Assets.at("javascripts/backbone-1.1.0.js")' 
-	type="text/javascript"></script>
-<script src='@routes.Assets.at("javascripts/visualsearch.js")' 
-	type="text/javascript"></script>
-@moreScripts
-</head>
-
-<body>
-	@header()
-	<div class="container">
-
-		@content
-
-		<!-- Footer -->
-		<div class="footer">
-			<div class="row">
-				<div class="col-md-4">
-					<div class="row">
-						<p class="text-muted" style="text-align: left;"https://github.com/sdscmusv">
-							<img src='@routes.Assets.at("images/github.png")'
-								style="width: 32px;"></a> Follow and contribute to this
-							project on <a href="https://github.com/cmusv-sc/ArchF2013-Project3-FT">Github</a>
-						</p>
-					</div>
-					<div class="row">
-						<p class="text-muted" style="text-align: left;"@routes.BugReportController.reports()">
-							<img src='@routes.Assets.at("images/bug.png")'
-								style="width: 32px;"></a> Any issues? Please report bugs <a
-								href="@routes.BugReportController.reports()">here</a>
-						</p>
-					</div>
-				</div>
-				<div class="col-lg-6 col-lg-offset-3">
-					<p class="text-muted" style="text-align: right; font-size: 14px;">&copy;
-						Carnegie Mellon University - Silicon Valley ; NASA Jet Propulsion Laboratory 2015</p>
-				</div>
-			</div>
-		</div>
-
-	</div>
-
-</body>
-</html>
+    <head>
+        <title>@title</title>
+        <link rel="stylesheet" media="screen" href="@routes.Assets.at("stylesheets/main.css")">
+        <link rel="shortcut icon" type="image/png" href="@routes.Assets.at("images/favicon.png")">
+        <script src="@routes.Assets.at("javascripts/hello.js")" type="text/javascript"></script>
+    </head>
+    <body>
+        @content
+    </body>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/cabc2e67/app/views/sayHello.scala.html
----------------------------------------------------------------------
diff --git a/app/views/sayHello.scala.html b/app/views/sayHello.scala.html
deleted file mode 100644
index a1ff218..0000000
--- a/app/views/sayHello.scala.html
+++ /dev/null
@@ -1,4 +0,0 @@
-@(name: String)
-@main("Say Hello"){
-	<p>Welcome  --> @{name}</p>
-}
\ No newline at end of file


[35/50] [abbrv] incubator-cmda git commit: Fix "//" bug

Posted by xi...@apache.org.
Fix "//" bug

Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/081668fb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/081668fb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/081668fb

Branch: refs/heads/master
Commit: 081668fb3d365fe839f4237a6e5d5a5ae185f9ec
Parents: 5fc73a2
Author: mingqi830 <mq...@andrew.cmu.edu>
Authored: Fri Sep 4 16:11:50 2015 -0700
Committer: mingqi830 <mq...@andrew.cmu.edu>
Committed: Fri Sep 4 16:11:50 2015 -0700

----------------------------------------------------------------------
 .../climate/twoDVariableZonelMean.scala.html    | 33 ++++++++++++++++++++
 1 file changed, 33 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/081668fb/app/views/climate/twoDVariableZonelMean.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/twoDVariableZonelMean.scala.html b/app/views/climate/twoDVariableZonelMean.scala.html
index 74bb104..b689ea9 100644
--- a/app/views/climate/twoDVariableZonelMean.scala.html
+++ b/app/views/climate/twoDVariableZonelMean.scala.html
@@ -835,6 +835,39 @@
       });
     });
   </script>
+}
+
+@main("Parameters of ConfId", scripts){ @flash_message()   
+	 
+<p>
+<div id="dataSource" style="display: none;">@parameters.getDataSource()</div>
+<div id="variableName" style="display: none;">@parameters.getVariableName()</div>
+<div id="startYearMonth" style="display: none;">@parameters.getStartYearMonth()</div>
+<div id="endYearMonth" style="display: none;">@parameters.getEndYearMonth()</div>
+<div id="selectMonths" style="display: none;">@parameters.getSelectMonths()</div>
+<div id="monthsPara" style="display: none;">@parameters.getMonth()</div>
+<div id="startLat" style="display: none;">@parameters.getStartLat()</div>
+<div id="endLat" style="display: none;">@parameters.getEndLat()</div>
+<div id="variableScale" style="display: none;">@parameters.getVariableScale()</div>
+<div id="executionPurpose" style="display: none;">@parameters.getExecutionPurpose()</div>
+<div id="image" style="display: none;">@parameters.getImage()</div>
+<div id="dataURL" style="display: none;">@parameters.getDataURL()</div>
+<div id="serviceResponseText" style="display: none;">@parameters.getServiceResponseText()</div>
+<table border="1" align="center">
+
+<tr>
+<td colspan="4">
+<center>
+<b>Service: 2-D Variable Zonal Mean</b> <br><br>
+This service generates a graph of a 2-dimensional variable's zonal mean with time averaing. <br>
+Select a data source (model or observation), a variable name, and a time range below.<br><br>
+</center>
+</td>
+</tr>
+
+<tr>
+<td>data source:</td><td><select name="data", id="data" onchange="select_data()">
+<!-- <option>NASA/obs4MIPs</option>  -->
 <optgroup label="Observation">
 	<option>NASA/MODIS</option>
 	<option>NASA/AMSRE</option>


[21/50] [abbrv] incubator-cmda git commit: Change Service Name

Posted by xi...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/7d2aaccb/app/views/climate/differencePlotTwoTimeAveragedVariables.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/differencePlotTwoTimeAveragedVariables.scala.html b/app/views/climate/differencePlotTwoTimeAveragedVariables.scala.html
new file mode 100644
index 0000000..0a64039
--- /dev/null
+++ b/app/views/climate/differencePlotTwoTimeAveragedVariables.scala.html
@@ -0,0 +1,1357 @@
+@(parameters: metadata.DiffPlotTwoTimeAveragedVar) @import helper._
+<link rel="stylesheet"
+	href='@routes.Assets.at("stylesheets/livefitler.css")'>
+@scripts = {
+<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
+<script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
+<script type="text/javascript"
+	src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
+<script type="text/javascript" src="https:
+	<script type="
+	text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
+<script type="text/javascript"
+	src='@routes.Assets.at("javascripts/xmisc.js")'></script>
+<script type="text/javascript">
+	var Response = null;
+    var variable1 = "";
+    var variable2 = "";
+    window.onload = function() {
+	    changeDataSource();
+	    select_data1(1);
+	    changeDataSource1();
+	    select_data1(2);
+	    changeVariableName();
+	    select_var1(1);
+	    changeVariableName1();
+	    select_var1(2);
+	    var imageUrl = $('#image').text();
+	    $('#purpose').html($('#executionPurpose').text());
+	    $('#Image').html('<img src="'+imageUrl+'" width=680 />');
+	    $('#data_url').html($('#dataURL').text());
+	    $('#Response').html($('serviceResponseText').text());
+    }
+    function changeVariableName1(){
+	    var var_string = $('#variableName2').text();
+	    var x=document.getElementById("var2");
+	    if (var_string == "clt")
+	    x.options[1].selected=true;
+	    else if (var_string == "ts")
+	    x.options[2].selected=true;
+	    else if (var_string == "tos")
+	    x.options[3].selected=true;
+	    else if (var_string == "pr")
+	    x.options[0].selected=true;
+	    else if (var_string == "uas")
+	    x.options[4].selected=true;
+	    else if (var_string == "vas")
+	    x.options[5].selected=true;
+	    else if (var_string == "sfcWind")
+	    x.options[6].selected=true;
+	    else if (var_string == "zos")
+	    x.options[7].selected=true;
+	    else if (var_string == "lai")
+	    x.options[8].selected=true;
+	    else if (var_string == "zl")
+	    x.options[9].selected=true;
+	    else if (var_string == "zo")
+	    x.options[10].selected=true;
+	    else if (var_string == "ohc700")
+	    x.options[11].selected=true;
+	    else if (var_string == "ohc2000")
+	    x.options[12].selected=true;
+	    else if (var_string == "rlds")
+	    x.options[13].selected=true;
+	    else if (var_string == "rsds")
+	    x.options[14].selected=true;
+	    else if (var_string == "rlus")
+	    x.options[15].selected=true;
+	    else if (var_string == "rsus")
+	    x.options[16].selected=true;
+	    else if (var_string == "rldscs")
+	    x.options[17].selected=true;
+	    else if (var_string == "rsdscs")
+	    x.options[18].selected=true;
+	    else if (var_string == "rsuscs")
+	    x.options[19].selected=true;
+	    else if (var_string == "rsdt")
+	    x.options[20].selected=true;
+	    else if (var_string == "rlutcs")
+	    x.options[21].selected=true;
+	    else if (var_string == "rlut")
+	    x.options[22].selected=true;
+	    else if (var_string == "rsutcs")
+	    x.options[23].selected=true;
+	    else if (var_string == "rsut")
+	    x.options[24].selected=true;
+	}
+    function changeVariableName(){
+	    var var_string = $('#variableName1').text();
+	    var x=document.getElementById("var1");
+	    if (var_string == "clt")
+	    x.options[1].selected=true;
+	    else if (var_string == "ts")
+	    x.options[2].selected=true;
+	    else if (var_string == "tos")
+	    x.options[3].selected=true;
+	    else if (var_string == "pr")
+	    x.options[0].selected=true;
+	    else if (var_string == "uas")
+	    x.options[4].selected=true;
+	    else if (var_string == "vas")
+	    x.options[5].selected=true;
+	    else if (var_string == "sfcWind")
+	    x.options[6].selected=true;
+	    else if (var_string == "zos")
+	    x.options[7].selected=true;
+	    else if (var_string == "lai")
+	    x.options[8].selected=true;
+	    else if (var_string == "zl")
+	    x.options[9].selected=true;
+	    else if (var_string == "zo")
+	    x.options[10].selected=true;
+	    else if (var_string == "ohc700")
+	    x.options[11].selected=true;
+	    else if (var_string == "ohc2000")
+	    x.options[12].selected=true;
+	    else if (var_string == "rlds")
+	    x.options[13].selected=true;
+	    else if (var_string == "rsds")
+	    x.options[14].selected=true;
+	    else if (var_string == "rlus")
+	    x.options[15].selected=true;
+	    else if (var_string == "rsus")
+	    x.options[16].selected=true;
+	    else if (var_string == "rldscs")
+	    x.options[17].selected=true;
+	    else if (var_string == "rsdscs")
+	    x.options[18].selected=true;
+	    else if (var_string == "rsuscs")
+	    x.options[19].selected=true;
+	    else if (var_string == "rsdt")
+	    x.options[20].selected=true;
+	    else if (var_string == "rlutcs")
+	    x.options[21].selected=true;
+	    else if (var_string == "rlut")
+	    x.options[22].selected=true;
+	    else if (var_string == "rsutcs")
+	    x.options[23].selected=true;
+	    else if (var_string == "rsut")
+	    x.options[24].selected=true;
+    }
+    function changeDataSource1(){
+	    var dataSource = $('#source2').text();
+	    dataSource = dataSource.toUpperCase();
+	    var x = document.getElementById("data2");
+	    if(dataSource == "NASA_MODIS" ){
+	    x.options[13].selected=true;
+	    }
+	    else if(dataSource == "NASA_AMSRE" ){
+	    x.options[14].selected=true;
+	    }
+	    else if(dataSource == "NASA_TRMM" ){
+	    x.options[15].selected=true;
+	    }
+	    else if(dataSource == "NASA_GPCP" ){
+	    x.options[16].selected=true;
+	    }
+	    else if(dataSource == "NASA_QUIKSCAT" ){
+	    x.options[17].selected=true;
+	    }
+	    else if(dataSource == "NASA_AVISO" ){
+	    x.options[18].selected=true;
+	    }
+	    else if(dataSource == "NASA_GRACE" ){
+	    x.options[19].selected=true;
+	    }
+	    else if(dataSource == "NOAA_NODC" ){
+	    x.options[20].selected=true;
+	    }
+	    else if(dataSource == "NASA_CERES" ){
+	    x.options[21].selected=true;
+	    }
+	    else if(dataSource == "NASA_AIRS" ){
+	    x.options[22].selected=true;
+	    }
+	    else if(dataSource == "NASA_MLS" ){
+	    x.options[23].selected=true;
+	    }
+	    else if(dataSource == "NASA_ARGO" ){
+	    x.options[24].selected=true;
+	    }
+	    else if(dataSource == "CCCMA_CANESM2" ){
+	    x.options[0].selected=true;
+	    }
+	    else if(dataSource == "GFDL_ESM2G" ){
+	    x.options[1].selected=true;
+	    }
+	    else if(dataSource == "GISS_E2-H" ){
+	    x.options[2].selected=true;
+	    }
+	    else if(dataSource == "GISS_E2-R" ){
+	    x.options[3].selected=true;
+	    }
+	    else if(dataSource == "NCAR_CAM5" ){
+	    x.options[4].selected=true;
+	    }
+	    else if(dataSource == "NCC_NORESM" ){
+	    x.options[5].selected=true;
+	    }
+	    else if(dataSource == "UKMO_HADGEM2-ES" ){
+	    x.options[6].selected=true;
+	    }
+	    else if(dataSource == "CCCMA_CANAM4" ){
+	    x.options[7].selected=true;
+	    }
+	    else if(dataSource == "CSIRO_MK3.6" ){
+	    x.options[8].selected=true;
+	    }
+	    else if(dataSource == "GFDL_CM3" ){
+	    x.options[9].selected=true;
+	    }
+	    else if(dataSource == "IPSL_CM5A-LR" ){
+	    x.options[10].selected=true;
+	    }
+	    else if(dataSource == "MIROC_MIROC5" ){
+	    x.options[11].selected=true;
+	    }
+	    else if(dataSource == "UKMO_HADGEM2-A" ){
+	    x.options[12].selected=true;
+	    }
+	    else if(dataSource == "ECMWF_INTERIM" ){
+	    x.options[25].selected=true;
+	    }
+    }
+    function changeDataSource(){
+	    var dataSource = $('#source1').text();
+	    dataSource = dataSource.toUpperCase();
+	    var x = document.getElementById("data1");
+	    if(dataSource == "NASA_MODIS" ){
+	    x.options[13].selected=true;
+	    }
+	    else if(dataSource == "NASA_AMSRE" ){
+	    x.options[14].selected=true;
+	    }
+	    else if(dataSource == "NASA_TRMM" ){
+	    x.options[15].selected=true;
+	    }
+	    else if(dataSource == "NASA_GPCP" ){
+	    x.options[16].selected=true;
+	    }
+	    else if(dataSource == "NASA_QUIKSCAT" ){
+	    x.options[17].selected=true;
+	    }
+	    else if(dataSource == "NASA_AVISO" ){
+	    x.options[18].selected=true;
+	    }
+	    else if(dataSource == "NASA_GRACE" ){
+	    x.options[19].selected=true;
+	    }
+	    else if(dataSource == "NOAA_NODC" ){
+	    x.options[20].selected=true;
+	    }
+	    else if(dataSource == "NASA_CERES" ){
+	    x.options[21].selected=true;
+	    }
+	    else if(dataSource == "NASA_AIRS" ){
+	    x.options[22].selected=true;
+	    }
+	    else if(dataSource == "NASA_MLS" ){
+	    x.options[23].selected=true;
+	    }
+	    else if(dataSource == "NASA_ARGO" ){
+	    x.options[24].selected=true;
+	    }
+	    else if(dataSource == "CCCMA_CANESM2" ){
+	    x.options[0].selected=true;
+	    }
+	    else if(dataSource == "GFDL_ESM2G" ){
+	    x.options[1].selected=true;
+	    }
+	    else if(dataSource == "GISS_E2-H" ){
+	    x.options[2].selected=true;
+	    }
+	    else if(dataSource == "GISS_E2-R" ){
+	    x.options[3].selected=true;
+	    }
+	    else if(dataSource == "NCAR_CAM5" ){
+	    x.options[4].selected=true;
+	    }
+	    else if(dataSource == "NCC_NORESM" ){
+	    x.options[5].selected=true;
+	    }
+	    else if(dataSource == "UKMO_HADGEM2-ES" ){
+	    x.options[6].selected=true;
+	    }
+	    else if(dataSource == "CCCMA_CANAM4" ){
+	    x.options[7].selected=true;
+	    }
+	    else if(dataSource == "CSIRO_MK3.6" ){
+	    x.options[8].selected=true;
+	    }
+	    else if(dataSource == "GFDL_CM3" ){
+	    x.options[9].selected=true;
+	    }
+	    else if(dataSource == "IPSL_CM5A-LR" ){
+	    x.options[10].selected=true;
+	    }
+	    else if(dataSource == "MIROC_MIROC5" ){
+	    x.options[11].selected=true;
+	    }
+	    else if(dataSource == "UKMO_HADGEM2-A" ){
+	    x.options[12].selected=true;
+	    }
+	    else if(dataSource == "ECMWF_INTERIM" ){
+	    x.options[25].selected=true;
+	    }
+    }
+    function enable_download_button()
+    {
+      var x=document.getElementById("download_data");
+      x.disabled=false;
+    }
+    function unset_vars1(ID)
+    {
+      var x;
+      if (ID == 1) {
+        x=document.getElementById("var1");
+      }
+      else if (ID == 2) {
+        x=document.getElementById("var2");
+      }
+      x.options[0].disabled=true;
+      x.options[1].disabled=true;
+      x.options[2].disabled=true;
+      x.options[3].disabled=true;
+      x.options[4].disabled=true;
+      x.options[5].disabled=true;
+      x.options[6].disabled=true;
+      x.options[7].disabled=true;
+      x.options[8].disabled=true;
+      x.options[9].disabled=true;
+      x.options[10].disabled=true;
+      x.options[11].disabled=true;
+      x.options[12].disabled=true;
+      x.options[13].disabled=true;
+      x.options[14].disabled=true;
+      x.options[15].disabled=true;
+      x.options[16].disabled=true;
+      x.options[17].disabled=true;
+      x.options[18].disabled=true;
+      x.options[19].disabled=true;
+      x.options[20].disabled=true;
+      x.options[21].disabled=true;
+      x.options[22].disabled=true;
+      x.options[23].disabled=true;
+      x.options[24].disabled=true;
+      x.options[25].disabled=true;
+      x.options[26].disabled=true;
+      x.options[27].disabled=true;
+      x.options[28].disabled=true;
+      x.options[29].disabled=true;
+      x.options[30].disabled=true;
+      x.options[31].disabled=true;
+      x.options[32].disabled=true;
+    }
+    function disable_pres1(ID)
+    {
+      var x;
+      if (ID == 1) {
+        x=document.getElementById("pres1");
+      }
+      else if (ID == 2) {
+        x=document.getElementById("pres2");
+      }
+      x.value = "N/A";
+      x.disabled=true;
+    }
+    function enable_pres1(ID)
+    {
+      var x;
+      if (ID == 1) {
+        x=document.getElementById("pres1");
+      }
+      else if (ID == 2) {
+        x=document.getElementById("pres2");
+      }
+      x.value = "500";
+      x.disabled=false;
+    }
+    function select_var1(ID)
+    {
+      var var_string;
+      if (ID == 1) {
+        var_string = $("#var1").val();
+      }
+      else if (ID == 2) {
+        var_string = $("#var2").val();
+    }
+    disable_download_button();  
+    if (var_string == "Total Cloud Fraction") { 
+      if (ID == 1) {
+        variable1 = "clt";  
+      }
+      else if (ID == 2) {
+        variable2 = "clt";  
+      }
+      disable_pres1(ID);
+    }
+     else if (var_string == "Surface Temperature") {
+       if (ID == 1) {
+         variable1 = "ts";  
+       }
+       else if (ID == 2) {
+         variable2 = "ts";  
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Sea Surface Temperature") { 
+       if (ID == 1) {
+         variable1 = "tos";  
+       }
+       else if (ID == 2) {
+         variable2 = "tos";  
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Precipitation Flux") { 
+       if (ID == 1) {
+         variable1 = "pr";  
+       }
+       else if (ID == 2) {
+         variable2 = "pr";  
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Eastward Near-Surface Wind") { 
+       if (ID == 1) {
+         variable1 = "uas";  
+       }
+       else if (ID == 2) {
+         variable2 = "uas";  
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Northward Near-Surface Wind") {  
+       if (ID == 1) {
+         variable1 = "vas";  
+       }
+       else if (ID == 2) {
+         variable2 = "vas";  
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Near-Surface Wind Speed") { 
+       if (ID == 1) {
+         variable1 = "sfcWind";  
+       }
+       else if (ID == 2) {
+         variable2 = "sfcWind";  
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Sea Surface Height") { 
+       if (ID == 1) {
+         variable1 = "zos";  
+       }
+       else if (ID == 2) {
+         variable2 = "zos";  
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Leaf Area Index") { 
+       if (ID == 1) {
+         variable1 = "lai";  
+       }
+       else if (ID == 2) {
+         variable2 = "lai";  
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Equivalent Water Height Over Land") {
+       if (ID == 1) {
+         variable1 = "zl";  
+       }
+       else if (ID == 2) {
+         variable2 = "zl";  
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Equivalent Water Height Over Ocean") {
+       if (ID == 1) {
+         variable1 = "zo";
+       }
+       else if (ID == 2) {
+         variable2 = "zo";
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Ocean Heat Content Anomaly within 700 m Depth") {
+       if (ID == 1) {
+         variable1 = "ohc700";
+       }
+       else if (ID == 2) {
+         variable2 = "ohc700";
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Ocean Heat Content Anomaly within 2000 m Depth") {
+       if (ID == 1) {
+         variable1 = "ohc2000";
+       }
+       else if (ID == 2) {
+         variable2 = "ohc2000";
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Surface Downwelling Longwave Radiation") {
+       if (ID == 1) {
+         variable1 = "rlds";
+       }
+       else if (ID == 2) {
+         variable2 = "rlds";
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Surface Downwelling Shortwave Radiation") {
+       if (ID == 1) {
+         variable1 = "rsds";
+       }
+       else if (ID == 2) {
+         variable2 = "rsds";
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Surface Upwelling Longwave Radiation") {
+       if (ID == 1) {
+         variable1 = "rlus";
+       }
+       else if (ID == 2) {
+         variable2 = "rlus";
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Surface Upwelling Shortwave Radiation") {
+       if (ID == 1) {
+         variable1 = "rsus";
+       }
+       else if (ID == 2) {
+         variable2 = "rsus";
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Surface Downwelling Clear-Sky Longwave Radiation") {
+       if (ID == 1) {
+         variable1 = "rldscs";
+       }
+       else if (ID == 2) {
+         variable2 = "rldscs";
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Surface Downwelling Clear-Sky Shortwave Radiation") {
+       if (ID == 1) {
+         variable1 = "rsdscs";
+       }
+       else if (ID == 2) {
+         variable2 = "rsdscs";
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Surface Upwelling Clear-Sky Shortwave Radiation") {
+       if (ID == 1) {
+         variable1 = "rsuscs";
+       }
+       else if (ID == 2) {
+         variable2 = "rsuscs";
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "TOA Incident Shortwave Radiation") {
+       if (ID == 1) {
+         variable1 = "rsdt";
+       }
+       else if (ID == 2) {
+         variable2 = "rsdt";
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "TOA Outgoing Clear-Sky Longwave Radiation") {
+       if (ID == 1) {
+         variable1 = "rlutcs";
+       }
+       else if (ID == 2) {
+         variable2 = "rlutcs";
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "TOA Outgoing Longwave Radiation") {
+       if (ID == 1) {
+         variable1 = "rlut";
+       }
+       else if (ID == 2) {
+         variable2 = "rlut";
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "TOA Outgoing Clear-Sky Shortwave Radiation") {
+       if (ID == 1) {
+         variable1 = "rsutcs";
+       }
+       else if (ID == 2) {
+         variable2 = "rsutcs";
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "TOA Outgoing Shortwave Radiation") {
+       if (ID == 1) {
+         variable1 = "rsut";
+       }
+       else if (ID == 2) {
+         variable2 = "rsut";
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Air Temperature") {
+       if (ID == 1) {
+         variable1 = "ta";
+       }
+       else if (ID == 2) {
+         variable2 = "ta";
+       }
+       enable_pres1(ID);
+     }
+     else if (var_string == "Specific Humidity") {
+       if (ID == 1) {
+         variable1 = "hus";
+       }
+       else if (ID == 2) {
+         variable2 = "hus";
+       }
+       enable_pres1(ID);
+     }
+     else if (var_string == "Cloud Ice Water Content") {
+       if (ID == 1) {
+         variable1 = "cli";
+       }
+       else if (ID == 2) {
+         variable2 = "cli";
+       }
+       enable_pres1(ID);
+     }
+     else if (var_string == "Cloud Liquid Water Content") {
+       if (ID == 1) {
+         variable1 = "clw";
+       }
+       else if (ID == 2) {
+         variable2 = "clw";
+       }
+       enable_pres1(ID);
+     }
+     else if (var_string == "Ocean Temperature") {
+       if (ID == 1) {
+         variable1 = "ot";
+       }
+       else if (ID == 2) {
+         variable2 = "ot";
+       }
+       enable_pres1(ID);
+     }
+     else if (var_string == "Ocean Salinity") {
+       if (ID == 1) {
+         variable1 = "os";
+       }
+       else if (ID == 2) {
+         variable2 = "os";
+       }
+       enable_pres1(ID);
+     }
+     else if (var_string == "Vertical Wind Velocity") {
+       if (ID == 1) {
+         variable1 = "wap";
+       }
+       else if (ID == 2) {
+         variable2 = "wap";
+       }
+       enable_pres1(ID);
+     }
+     else if (var_string == "Relative Humidity") {
+       if (ID == 1) {
+         variable1 = "hur";
+       }
+       else if (ID == 2) {
+         variable2 = "hur";
+       }
+       enable_pres1(ID);
+     }
+    }
+    function select_data1(ID)
+    {
+      var data_string;
+      var x;
+      if (ID == 1) {
+        data_string = $("#data1").val();
+        x = document.getElementById("var1");
+      }
+      else if (ID == 2) {
+        data_string = $("#data2").val();
+        x = document.getElementById("var2");
+      }
+      disable_download_button();
+      if (data_string == "NASA/AMSRE") {
+        unset_vars1(ID); 
+        x.options[3].selected=true;
+        disable_pres1(ID); 
+        x.options[3].disabled=false;
+      }
+      else if (data_string == "NASA/MODIS") {
+        unset_vars1(ID);
+        x.options[1].selected=true;
+        disable_pres1(ID); 
+        x.options[1].disabled=false;
+        x.options[8].disabled=false;
+      }
+      else if (data_string == "NASA/TRMM") {
+        unset_vars1(ID);
+        x.options[0].selected=true;
+        disable_pres1(ID); 
+        x.options[0].disabled=false;
+      }
+      else if (data_string == "NASA/GPCP") {
+        unset_vars1(ID);
+        x.options[0].selected=true;
+        disable_pres1(ID); 
+        x.options[0].disabled=false;
+      }
+      else if (data_string == "NASA/QuikSCAT") {
+        unset_vars1(ID);
+        x.options[4].selected=true;
+        disable_pres1(ID); 
+        x.options[4].disabled=false;
+        x.options[5].disabled=false;
+        x.options[6].disabled=false;
+      }
+      else if (data_string == "NASA/AVISO") {
+        unset_vars1(ID);
+        x.options[7].selected=true;
+        disable_pres1(ID); 
+        x.options[7].disabled=false;
+      }
+      else if (data_string == "NASA/GRACE") {
+        unset_vars1(ID);
+        x.options[9].selected=true;
+        disable_pres1(ID); 
+        x.options[9].disabled=false;
+        x.options[10].disabled=false;
+      }
+      else if (data_string == "NOAA/NODC") {
+        unset_vars1(ID);
+        x.options[11].selected=true;
+        disable_pres1(ID); 
+        x.options[11].disabled=false;
+        x.options[12].disabled=false;
+      }
+      else if (data_string == "NASA/CERES") {
+        unset_vars1(ID);
+        x.options[13].selected=true;
+        disable_pres1(ID); 
+        x.options[13].disabled=false;
+        x.options[14].disabled=false;
+        x.options[15].disabled=false;
+        x.options[16].disabled=false;
+        x.options[17].disabled=false;
+        x.options[18].disabled=false;
+        x.options[19].disabled=false;
+        x.options[20].disabled=false;
+        x.options[21].disabled=false;
+        x.options[22].disabled=false;
+        x.options[23].disabled=false;
+        x.options[24].disabled=false;
+      }
+      else if (data_string == "NASA/AIRS") {
+        unset_vars1(ID);
+        x.options[25].selected=true;
+        enable_pres1(ID); 
+        x.options[25].disabled=false;
+        x.options[26].disabled=false;
+      }
+      else if (data_string == "NASA/MLS") {
+        unset_vars1(ID);
+        x.options[25].selected=true;
+        enable_pres1(ID); 
+        x.options[25].disabled=false;
+        x.options[26].disabled=false;
+      }
+      else if (data_string == "ARGO/ARGO") {
+        unset_vars1(ID);
+        x.options[29].selected=true;
+        enable_pres1(ID); 
+        x.options[29].disabled=false;
+        x.options[30].disabled=false;
+      }
+      else if (data_string == "CCCMA/CANAM4") {
+        unset_vars1(ID);
+        x.options[0].selected=true;
+        disable_pres1(ID); 
+        x.options[0].disabled=false;
+        x.options[1].disabled=false;
+        x.options[2].disabled=false;
+        x.options[4].disabled=false;
+        x.options[5].disabled=false;
+        x.options[6].disabled=false;
+        x.options[13].disabled=false;
+        x.options[14].disabled=false;
+        x.options[15].disabled=false;
+        x.options[16].disabled=false;
+        x.options[17].disabled=false;
+        x.options[18].disabled=false;
+        x.options[19].disabled=false;
+        x.options[20].disabled=false;
+        x.options[21].disabled=false;
+        x.options[22].disabled=false;
+        x.options[23].disabled=false;
+        x.options[24].disabled=false;
+        x.options[25].disabled=false;
+        x.options[26].disabled=false;
+        x.options[27].disabled=false;
+        x.options[28].disabled=false;
+      }
+      else if (data_string == "CSIRO/MK3.6") {
+        unset_vars1(ID);
+        x.options[0].selected=true;
+        disable_pres1(ID); 
+        x.options[0].disabled=false;
+        x.options[1].disabled=false;
+        x.options[2].disabled=false;
+        x.options[4].disabled=false;
+        x.options[5].disabled=false;
+        x.options[6].disabled=false;
+        x.options[13].disabled=false;
+        x.options[14].disabled=false;
+        x.options[15].disabled=false;
+        x.options[16].disabled=false;
+        x.options[17].disabled=false;
+        x.options[18].disabled=false;
+        x.options[19].disabled=false;
+        x.options[20].disabled=false;
+        x.options[21].disabled=false;
+        x.options[22].disabled=false;
+        x.options[23].disabled=false;
+        x.options[24].disabled=false;
+        x.options[25].disabled=false;
+        x.options[26].disabled=false;
+        x.options[27].disabled=false;
+        x.options[28].disabled=false;
+        x.options[31].disabled=false;
+        x.options[32].disabled=false;
+      }
+      else if (data_string == "NCAR/CAM5") {
+        unset_vars1(ID);
+        x.options[0].selected=true;
+        disable_pres1(ID); 
+        x.options[0].disabled=false;
+        x.options[1].disabled=false;
+        x.options[2].disabled=false;
+        x.options[3].disabled=false;
+        x.options[4].disabled=false;
+        x.options[5].disabled=false;
+        x.options[6].disabled=false;
+        x.options[7].disabled=false;
+        x.options[8].disabled=false;
+        x.options[14].disabled=false;
+        x.options[15].disabled=false;
+        x.options[16].disabled=false;
+        x.options[17].disabled=false;
+        x.options[18].disabled=false;
+        x.options[19].disabled=false;
+        x.options[20].disabled=false;
+        x.options[21].disabled=false;
+        x.options[22].disabled=false;
+        x.options[23].disabled=false;
+        x.options[24].disabled=false;
+        x.options[25].disabled=false;
+        x.options[26].disabled=false;
+        x.options[27].disabled=false;
+        x.options[28].disabled=false;
+        x.options[31].disabled=false;
+        x.options[32].disabled=false;
+      }
+      else if (data_string == "CCCMA/CANESM2" || data_string == "GFDL/ESM2G" ||
+               data_string == "GISS/E2-H" || data_string == "GISS/E2-R" ||
+               data_string == "NCC/NORESM" ||
+               data_string == "UKMO/HadGEM2-ES" ||
+               data_string == "GFDL/CM3" || data_string == "IPSL/CM5A-LR" ||
+               data_string == "MIROC/MIROC5" || data_string == "UKMO/HadGEM2-A"
+              ) {
+        unset_vars1(ID);
+        x.options[0].selected=true;
+        disable_pres1(ID); 
+        x.options[0].disabled=false;
+        x.options[1].disabled=false;
+        x.options[2].disabled=false;
+        x.options[3].disabled=false;
+        x.options[4].disabled=false;
+        x.options[5].disabled=false;
+        x.options[6].disabled=false;
+        x.options[7].disabled=false;
+        x.options[8].disabled=false;
+        x.options[13].disabled=false;
+        x.options[14].disabled=false;
+        x.options[15].disabled=false;
+        x.options[16].disabled=false;
+        x.options[17].disabled=false;
+        x.options[18].disabled=false;
+        x.options[19].disabled=false;
+        x.options[20].disabled=false;
+        x.options[21].disabled=false;
+        x.options[22].disabled=false;
+        x.options[23].disabled=false;
+        x.options[24].disabled=false;
+        x.options[25].disabled=false;
+        x.options[26].disabled=false;
+        x.options[27].disabled=false;
+        x.options[28].disabled=false;
+        x.options[31].disabled=false;
+        x.options[32].disabled=false;
+      }
+      else if (data_string == "ECMWF/interim") {
+        unset_vars1(ID);
+        x.options[3].selected=true;
+        disable_pres1(ID); 
+        x.options[3].disabled=false;
+        x.options[31].disabled=false;
+        x.options[32].disabled=false;
+      }
+      select_var1(ID);
+    }
+    $(document).ready(function(){
+    $("#download_data").click(function(event) {
+      var durl = $("#data_url").val();
+      window.location.assign(durl);
+    });
+      $("#scatterPlot2V").click(function(event) {
+        Response = null;
+        disable_download_button();
+        $("#Response").html("Calculating ...");
+        $("#data_url").html("Calculating ...");
+        $("#Image").html("");
+        var url = "http:
+        var d1 = $("#data1").val();
+        var model1 = d1.replace("/", "_");
+        model1 = model1.toLowerCase();
+        var arglist = "";
+        arglist = arglist.concat("model1=");
+        arglist = arglist.concat(model1);
+        var v1 = $("#var1").val();
+        arglist = arglist.concat("&var1=");
+        arglist = arglist.concat(variable1);
+        var pres1 = $("#pres1").val();
+        arglist = arglist.concat("&pres1=");
+        arglist = arglist.concat(pres1);
+        var d2 = $("#data2").val();
+        var model2 = d2.replace("/", "_");
+        model2 = model2.toLowerCase();
+        arglist = arglist.concat("&model2=");
+        arglist = arglist.concat(model2);
+        var v2 = $("#var2").val();
+        arglist = arglist.concat("&var2=");
+        arglist = arglist.concat(variable2);
+        var pres2 = $("#pres2").val();
+        arglist = arglist.concat("&pres2=");
+        arglist = arglist.concat(pres2);
+        var t0 = $("#t0").val();
+        var t1 = $("#t1").val();
+        t0 = t0.replace("-", "");
+        t1 = t1.replace("-", "");
+        arglist = arglist.concat("&start_time=");
+        arglist = arglist.concat(t0);
+        arglist = arglist.concat("&end_time=");
+        arglist = arglist.concat(t1);
+        var lon0 = $("#lon0").val();
+        var lon1 = $("#lon1").val();
+        var lat0 = $("#lat0").val();
+        var lat1 = $("#lat1").val();
+        arglist = arglist.concat("&lon1=");
+        arglist = arglist.concat(lon0);
+        arglist = arglist.concat("&lon2=");
+        arglist = arglist.concat(lon1);
+        arglist = arglist.concat("&lat1=");
+        arglist = arglist.concat(lat0);
+        arglist = arglist.concat("&lat2=");
+        arglist = arglist.concat(lat1);
+        var purpose = $("#purpose").val();
+        arglist = arglist.concat("&purpose=");
+        arglist = arglist.concat(purpose);
+        url = url + encodeURI(arglist);
+        var urlTimeBounds = "http:
+        var arglistTB = "";
+        arglistTB = arglistTB.concat("serviceType=");
+        arglistTB = arglistTB.concat("2");
+        arglistTB = arglistTB.concat("&source1=");
+        arglistTB = arglistTB.concat(d1);
+        arglistTB = arglistTB.concat("&var1=");
+        arglistTB = arglistTB.concat(variable1);
+        arglistTB = arglistTB.concat("&source2=");
+        arglistTB = arglistTB.concat(d2);
+        arglistTB = arglistTB.concat("&var2=");
+        arglistTB = arglistTB.concat(variable2);
+        urlTimeBounds = urlTimeBounds + encodeURI(arglistTB);
+        $.ajax({
+            type: "GET",
+            url: urlTimeBounds,
+            dataType: "json",
+            data: null,
+            success: function(data, textStatus, xhr) {
+                Response = data;
+                if (data.success == false) {
+                    Response = null;
+                    var text = JSON.stringify(data, null, 4);
+                    text = "Error in backend: <br>" + text; 
+                    $("#Response").html(text);
+                    $("#data_url").html(text);
+                    return;
+                }
+                var text = JSON.stringify(data, null, 4);
+                var tb1 = data.time_bounds1;
+                var bds1 = String(tb1).split(",");
+                var lowerT1 = parseInt(bds1[0]);
+                var upperT1 = parseInt(bds1[1]);
+                var tb2 = data.time_bounds2;
+                var bds2 = String(tb2).split(",");
+                var lowerT2 = parseInt(bds2[0]);
+                var upperT2 = parseInt(bds2[1]);
+                var t0I = parseInt(t0);
+                var t1I = parseInt(t1);
+                var lowerT, upperT;
+                if (lowerT1 == 0  || upperT1 == 0){ 
+                  alert("We do not have data for the data-1 source and variable configuration.");
+                  return;
+                }
+                else if (lowerT2 == 0  || upperT2 == 0){ 
+                  alert("We do not have data for the data-2 source and variable configuration.");
+                  return;
+                }
+                else if (lowerT2 > upperT1 || lowerT1 > upperT2) { 
+                  alert("The two data sets/vars do not have a common time range.");
+                  return;
+                }
+                else { 
+                  if (lowerT1 > lowerT2) { 
+                    lowerT = lowerT1;
+                  }
+                  else {
+                    lowerT = lowerT2;
+                  }
+                  if (upperT1 > upperT2) { 
+                    upperT = upperT2;
+                  }
+                  else {
+                    upperT = upperT1;
+                  }
+                }
+                if (t0I < lowerT && t1I < lowerT ||
+                    t0I > upperT && t1I > upperT) {
+                  alert("We do not have data that span your time range. Try the range inside ["+lowerT+", "+upperT+"].");
+                  return;
+                }
+                if (t0I < lowerT && t1I <= upperT) {
+                  alert("Your start year-month is out of bound. It has to be in or later than " + lowerT +
+                        ". We will use the range ["+lowerT+", "+t1I+"] for you.");
+                }
+                if (t1I > upperT && t0I >= lowerT) {
+                  alert("Your end year-month is out of bound. It has to be in or earlier than " + upperT +
+                        ". We will use the range ["+t0I+", "+upperT+"] for you.");
+                }
+                if (t0I < lowerT && t1I > upperT ) {
+                  alert("Both of your start and end year-months are out of bounds. They have to be in or earlier than " + upperT +
+                        ", and in or later than " + lowerT + ". We will use the range ["+lowerT+", "+upperT+"] for you.");
+                }
+            },
+            error: function(xhr, textStatus, errorThrown) {
+		$("#Response").html("error!");
+		$("#data_url").html("error!");
+            },
+            complete: function(xhr, textStatus) {
+            }
+        });
+        $.ajax({
+            type: "GET",
+            url: url,
+            dataType: "json",
+            data: null,
+            success: function(data, textStatus, xhr) {
+                Response = data;
+                if (data.success == false) {
+                    Response = null;
+                    var text = JSON.stringify(data, null, 4);
+                    text = "Error in backend: <br>" + text; 
+                    $("#Response").html(text);
+                    $("#data_url").html(text);
+                    return;
+                }
+                var text = JSON.stringify(data, null, 4);
+                $("#Response").html(text);
+                var html = "<img src='"+data.url+"' width='820'/>";
+                $("#Image").html(html);
+                $("#data_url").html(data.dataUrl);
+                enable_download_button();
+            },
+            error: function(xhr, textStatus, errorThrown) {
+                $("#Response").html("error!");
+                $("#data_url").html("error!");
+            },
+            complete: function(xhr, textStatus) {
+            }
+        });
+      });
+    });
+  </script>
+} @main("Parameters of ConfId", scripts){ @flash_message()
+<p>
+<div id="source1" style="display: none;">@parameters.getSource1()</div>
+<div id="variableName1" style="display: none;">@parameters.getVaribaleName1()</div>
+<div id="pressureLevel1" style="display: none;">@parameters.getPressureLevel1()</div>
+<div id="startYearMonth" style="display: none;">@parameters.getStartYear()</div>
+<div id="startLat" style="display: none;">@parameters.getStartLat()</div>
+<div id="startLon" style="display: none;">@parameters.getStartLon()</div>
+<div id="source2" style="display: none;">@parameters.getSource2()</div>
+<div id="variableName2" style="display: none;">@parameters.getVaribaleName2()</div>
+<div id="pressureLevel2" style="display: none;">@parameters.getPressureLevel2()</div>
+<div id="endYearMonth" style="display: none;">@parameters.getEndYear()</div>
+<div id="endLat" style="display: none;">@parameters.getEndLat()</div>
+<div id="endLon" style="display: none;">@parameters.getEndLon()</div>
+<div id="executionPurpose" style="display: none;">@parameters.getExecutionPurpose()</div>
+<div id="image" style="display: none;">@parameters.getImage()</div>
+<div id="dataURL" style="display: none;">@parameters.getDataUrl()</div>
+<div id="serviceResponseText" style="display: none;">@parameters.getServiceResponse()</div>
+<table border="1">
+	<tr>
+		<td colspan="4">
+			<center>
+				<b>Service: Difference Plot of Two Time Averaged Variables</b><br>
+				<br> This service calculates the differences between two
+				specified variables and displays the lat-lon maps of the two
+				variables and their differences. <br>
+				<br>
+			</center>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="2">
+			<center>data 1</center>
+		</td>
+		<td colspan="2">
+			<center>data 2</center>
+		</td>
+	</tr>
+	<tr>
+		<td>source:</td>
+		<td><select name="data1" , id="data1" onchange="select_data1(1)">
+				<optgroup label="Model: Historical">
+					<option>CCCMA/CANESM2</option>
+					<option>GFDL/ESM2G</option>
+					<option>GISS/E2-H</option>
+					<option>GISS/E2-R</option>
+					<option>NCAR/CAM5</option>
+					<option>NCC/NORESM</option>
+					<option>UKMO/HadGEM2-ES</option>
+				</optgroup>
+				<optgroup label="Model: AMIP">
+					<option>CCCMA/CANAM4</option>
+					<option>CSIRO/MK3.6</option>
+					<option>GFDL/CM3</option>
+					<option>IPSL/CM5A-LR</option>
+					<option>MIROC/MIROC5</option>
+					<option>UKMO/HadGEM2-A</option>
+				</optgroup>
+				<optgroup label="Observation">
+					<option>NASA/MODIS</option>
+					<option>NASA/AMSRE</option>
+					<option>NASA/TRMM</option>
+					<option>NASA/GPCP</option>
+					<option>NASA/QuikSCAT</option>
+					<option>NASA/AVISO</option>
+					<option>NASA/GRACE</option>
+					<option>NOAA/NODC</option>
+					<option>NASA/CERES</option>
+					<option>NASA/AIRS</option>
+					<option>NASA/MLS</option>
+					<option>ARGO/ARGO</option>
+				</optgroup>
+				<optgroup label="Reanalysis">
+					<option>ECMWF/interim</option>
+				</optgroup>
+		</select></td>
+		<td>source:</td>
+		<td><select name="data2" , id="data2" onchange="select_data1(2)">
+				<optgroup label="Model: Historical">
+					<option>CCCMA/CANESM2</option>
+					<option>GFDL/ESM2G</option>
+					<option>GISS/E2-H</option>
+					<option>GISS/E2-R</option>
+					<option>NCAR/CAM5</option>
+					<option>NCC/NORESM</option>
+					<option>UKMO/HadGEM2-ES</option>
+				</optgroup>
+				<optgroup label="Model: AMIP">
+					<option>CCCMA/CANAM4</option>
+					<option>CSIRO/MK3.6</option>
+					<option>GFDL/CM3</option>
+					<option>IPSL/CM5A-LR</option>
+					<option>MIROC/MIROC5</option>
+					<option>UKMO/HadGEM2-A</option>
+				</optgroup>
+				<optgroup label="Observation">
+					<option>NASA/MODIS</option>
+					<option>NASA/AMSRE</option>
+					<option>NASA/TRMM</option>
+					<option>NASA/GPCP</option>
+					<option>NASA/QuikSCAT</option>
+					<option>NASA/AVISO</option>
+					<option>NASA/GRACE</option>
+					<option>NOAA/NODC</option>
+					<option>NASA/CERES</option>
+					<option>NASA/AIRS</option>
+					<option>NASA/MLS</option>
+					<option>ARGO/ARGO</option>
+				</optgroup>
+				<optgroup label="Reanalysis">
+					<option>ECMWF/interim</option>
+				</optgroup>
+		</select></td>
+	</tr>
+	<tr>
+		<td>variable name:</td>
+		<td><select name="var1" , id="var1" onchange="select_var1(1)">
+				<option>Precipitation Flux</option>
+				<option>Total Cloud Fraction</option>
+				<option>Surface Temperature</option>
+				<option>Sea Surface Temperature</option>
+				<option>Eastward Near-Surface Wind</option>
+				<option>Northward Near-Surface Wind</option>
+				<option>Near-Surface Wind Speed</option>
+				<option>Sea Surface Height</option>
+				<option>Leaf Area Index</option>
+				<option>Equivalent Water Height Over Land</option>
+				<option>Equivalent Water Height Over Ocean</option>
+				<option>Ocean Heat Content Anomaly within 700 m Depth</option>
+				<option>Ocean Heat Content Anomaly within 2000 m Depth</option>
+				<option>Surface Downwelling Longwave Radiation</option>
+				<option>Surface Downwelling Shortwave Radiation</option>
+				<option>Surface Upwelling Longwave Radiation</option>
+				<option>Surface Upwelling Shortwave Radiation</option>
+				<option>Surface Downwelling Clear-Sky Longwave Radiation</option>
+				<option>Surface Downwelling Clear-Sky Shortwave Radiation</option>
+				<option>Surface Upwelling Clear-Sky Shortwave Radiation</option>
+				<option>TOA Incident Shortwave Radiation</option>
+				<option>TOA Outgoing Longwave Radiation</option>
+				<option>TOA Outgoing Shortwave Radiation</option>
+				<option>TOA Outgoing Clear-Sky Longwave Radiation</option>
+				<option>TOA Outgoing Clear-Sky Shortwave Radiation</option>
+				<option>Air Temperature</option>
+				<option>Specific Humidity</option>
+				<option>Cloud Ice Water Content</option>
+				<option>Cloud Liquid Water Content</option>
+				<option>Ocean Temperature</option>
+				<option>Ocean Salinity</option>
+				<option>Vertical Wind Velocity</option>
+				<option>Relative Humidity</option>
+		</select></td>
+		<td>variable name:</td>
+		<td><select name="var2" , id="var2" onchange="select_var1(2)">
+				<option>Precipitation Flux</option>
+				<option>Total Cloud Fraction</option>
+				<option>Surface Temperature</option>
+				<option>Sea Surface Temperature</option>
+				<option>Eastward Near-Surface Wind</option>
+				<option>Northward Near-Surface Wind</option>
+				<option>Near-Surface Wind Speed</option>
+				<option>Sea Surface Height</option>
+				<option>Leaf Area Index</option>
+				<option>Equivalent Water Height Over Land</option>
+				<option>Equivalent Water Height Over Ocean</option>
+				<option>Ocean Heat Content Anomaly within 700 m Depth</option>
+				<option>Ocean Heat Content Anomaly within 2000 m Depth</option>
+				<option>Surface Downwelling Longwave Radiation</option>
+				<option>Surface Downwelling Shortwave Radiation</option>
+				<option>Surface Upwelling Longwave Radiation</option>
+				<option>Surface Upwelling Shortwave Radiation</option>
+				<option>Surface Downwelling Clear-Sky Longwave Radiation</option>
+				<option>Surface Downwelling Clear-Sky Shortwave Radiation</option>
+				<option>Surface Upwelling Clear-Sky Shortwave Radiation</option>
+				<option>TOA Incident Shortwave Radiation</option>
+				<option>TOA Outgoing Longwave Radiation</option>
+				<option>TOA Outgoing Shortwave Radiation</option>
+				<option>TOA Outgoing Clear-Sky Longwave Radiation</option>
+				<option>TOA Outgoing Clear-Sky Shortwave Radiation</option>
+				<option>Air Temperature</option>
+				<option>Specific Humidity</option>
+				<option>Cloud Ice Water Content</option>
+				<option>Cloud Liquid Water Content</option>
+				<option>Ocean Temperature</option>
+				<option>Ocean Salinity</option>
+				<option>Vertical Wind Velocity</option>
+				<option>Relative Humidity</option>
+		</select></td>
+	</tr>
+	<tr>
+		<td>atmosphere pressure level (hPa) <br> or ocean pressure
+			level (dbar)
+		</td>
+		<td><input id="pres1" value="500" alt="pressure" /></td>
+		<td>atmosphere pressure level (hPa) <br> or ocean pressure
+			level (dbar)
+		</td>
+		<td><input id="pres2" value="500" alt="pressure" /></td>
+	</tr>
+	<tr>
+	</tr>
+	<tr>
+		<td>start year-month:</td>
+		<td><input id="t0" value=@parameters.getStartYear() alt="start" /></td>
+		<td>end year-month:</td>
+		<td><input id="t1" value=@parameters.getEndYear() alt="end" /></td>
+	</tr>
+	<tr>
+		<td>start lat (deg):</td>
+		<td><input id="lat0" value=@parameters.getStartLat()></td>
+		<td>end lat (deg):</td>
+		<td><input id="lat1" value=@parameters.getEndLat()></td>
+	</tr>
+	<tr>
+		<td>start lon (deg):</td>
+		<td><input id="lon0" value=@parameters.getStartLon()></td>
+		<td>end lon (deg):</td>
+		<td><input id="lon1" value=@parameters.getEndLon()></td>
+	</tr>
+	<tr>
+		<td colspan="1">Execution purpose</td>
+		<td colspan="3">
+			<form>
+				<textarea name="purpose" id="purpose" rows="4" cols="50"> </textarea>
+			</form>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="2" align="center"><input id="scatterPlot2V"
+			type="submit" value="            Run  Again            "
+			style="height: 28px" /></td>
+		<form>
+			<td colspan="2" align="center"><input id="download_data"
+				type="button" value="Download Data" style="height: 28px" /></td>
+		</form>
+	</tr>
+	<tr>
+		<td colspan="4">
+			<div id="Image">Image Here</div>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="4" align="center"><textarea readonly id="data_url"
+				cols="89" rows="2">Data URL Here</textarea></td>
+	</tr>
+	<tr>
+		<td colspan="4" align="center"><textarea id="Response" cols="89"
+				rows="6">Service Response Text Here</textarea></td>
+	</tr>
+</table>
+}



[07/50] [abbrv] incubator-cmda git commit: remove test

Posted by xi...@apache.org.
remove test 

Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/73b592c1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/73b592c1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/73b592c1

Branch: refs/heads/master
Commit: 73b592c1a11505d3cd63e52c46797a568e2df4ae
Parents: a0c167b
Author: mingqi830 <mq...@andrew.cmu.edu>
Authored: Wed Sep 2 15:51:52 2015 -0700
Committer: mingqi830 <mq...@andrew.cmu.edu>
Committed: Wed Sep 2 15:51:52 2015 -0700

----------------------------------------------------------------------
 test/models/DeviceTypeTest.java | 45 ------------------------------------
 1 file changed, 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/73b592c1/test/models/DeviceTypeTest.java
----------------------------------------------------------------------
diff --git a/test/models/DeviceTypeTest.java b/test/models/DeviceTypeTest.java
deleted file mode 100644
index b4a07b6..0000000
--- a/test/models/DeviceTypeTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package models;
-
-import static org.junit.Assert.assertEquals;
-import models.metadata.DeviceType;
-
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.JUnit4;
-
-/**
- * Contains unit tests for Device Type
- */
-@RunWith(JUnit4.class)
-public class DeviceTypeTest
-{
-   private static DeviceType deviceType;
-   private static String TEST_ID = "1";
-   private static String TEST_NAME = "testDeviceType";
-   private static String TEST_MANUFACTURER = "testSensorType";
-   private static Double TEST_VERSION = 1.00;
-
-//public DeviceType(String id, String deviceTypeName, String manufacturer, double version) {
-
-   /**
-    * Setup a sensor object to test on
-    */
-   @BeforeClass
-   public static void initSensor()
-   {
-      //deviceType = new DeviceType(TEST_ID, TEST_NAME, TEST_MANUFACTURER, TEST_VERSION);
-   }
-   
-   /**
-    */
-   @Test
-   public void getterTest()
-   {
-      String deviceName =  deviceType.getDeviceTypeName();
-      //String deviceManufacturer = sensor.getManufacturer();
-      //assertEquals(TEST_DEVICE, deviceName);
-      //assertEquals(TEST_SENSORTYPE, deviceManufacturer);
-   }
-}
-


[17/50] [abbrv] incubator-cmda git commit: delete comments

Posted by xi...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/f22b3e32/app/views/climate/conditionalSampling2Var.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/conditionalSampling2Var.scala.html b/app/views/climate/conditionalSampling2Var.scala.html
index 8c039bd..9addb1d 100644
--- a/app/views/climate/conditionalSampling2Var.scala.html
+++ b/app/views/climate/conditionalSampling2Var.scala.html
@@ -1,31 +1,27 @@
-@(parameters: metadata.ConditionalSampling2Var)
-
-@import helper._
-
+@(parameters: metadata.ConditionalSampling2Var) @import helper._
 <link rel="stylesheet"
 	href='@routes.Assets.at("stylesheets/livefitler.css")'>
-	
 @scripts = {
-	<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
-	<script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
-	<script type="text/javascript" src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
-	<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js"></script>
-	<script type="text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
-	<script type="text/javascript" src='@routes.Assets.at("javascripts/xmisc.js")'></script>
-
-	<script type="text/javascript" src='@routes.Assets.at("html/js2/dataList2.js")'></script>
-	<script type="text/javascript" src='@routes.Assets.at("html/js2/varList.js")'></script>
-	<script type="text/javascript" src='@routes.Assets.at("html/js2/common.js")'></script>
-
-  	<script type="text/javascript">
-	
+<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
+<script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
+<script type="text/javascript"
+	src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
+<script type="text/javascript" src="https:
+	<script type="
+	text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
+<script type="text/javascript"
+	src='@routes.Assets.at("javascripts/xmisc.js")'></script>
+<script type="text/javascript"
+	src='@routes.Assets.at("html/js2/dataList2.js")'></script>
+<script type="text/javascript"
+	src='@routes.Assets.at("html/js2/varList.js")'></script>
+<script type="text/javascript"
+	src='@routes.Assets.at("html/js2/common.js")'></script>
+<script type="text/javascript">
   	var Response = null;
     var variable1 = "";
     var variable2 = "";
-
     var naValue = "-999999";
-
-    // called on load or reload
     window.onload = function() {
       put_data(1);
       changeDataSource1();
@@ -39,25 +35,14 @@
       changeVariableName2();
       put_var(3);
       changeVariableName3();
-      
       time_range3();
       fillMonth();
-
       enable_download_button();
-
-      
-      
-/*       $('#pres1').val("N/A");
-      $('#pres2').val("N/A");
-      $('#pres3').val("N/A"); */
       disable_pres(1);
       disable_pres(2);
       disable_pres(3);
-      
       $('#t0').val($('#startYearMonth').text());
       $('#t1').val($('#endYearMonth').text());
-     
-      
       var enviVariableChoose1 = $('#enChoose1');
       if(enviVariableChoose1 == "0"){
     	  $('#radioDef1').prop("checked", true);
@@ -66,7 +51,6 @@
     	  $('#radioDef1').prop("checked", false);
     	  $('#radioCus1').prop("checked", true);
       }
-      
       var enviVariableChoose2 = $('#enChoose2');
       if(enviVariableChoose2 == "0"){
     	  $('#radioDef2').prop("checked", true);
@@ -75,10 +59,8 @@
     	  $('#radioDef2').prop("checked", false);
     	  $('#radioCus2').prop("checked", true);
       }
-      
       var selectMonths = $('#selectMonths').text();
       $('#months option:contains('+selectMonths+')').prop({selected: true});
-/*       select_months(); */
       select_monthsByPara();
       $('#lat0').val($('#startLat').text());
       $('#lat1').val($('#endLat').text());
@@ -123,7 +105,6 @@
           $('#max1').val(binMax1);
           $('#bins1').val(binNum1);
       }
-      
       var binMin2 = $('#binMin2').text();
       var binMax2 = $('#binMax2').text();
       var binNum2 = $('#binNum2').text();
@@ -136,18 +117,14 @@
           $('#max2').val(binMax2);
           $('#bins2').val(binNum2);
       }
-     	      
       $('#purpose').html($('#executionPurpose').text());
       var imageUrl = $('#image').text();
       $('#Image').html('<img src="'+imageUrl+'" width=680 />');
       $('#data_url').html($('#dataURL').text());
       $('#Response').html($('serviceResponseText').text());
-    
     }
-    
     function put_data(ID){
         var list1=document.getElementById("data"+ID);
-
         for(var key in dataList) {
           if (key.slice(0,5)==="group") {
             var og = document.createElement("OPTGROUP");
@@ -158,13 +135,11 @@
           }
         }
       }
-
       function put_var(ID) {
         var list1=document.getElementById("var"+ID);
         for (var i=list1.length-1; i>=0; i--) {
         list1.remove(i);
         }
-
         data_string =  document.getElementById("data"+ID).value;
         var varList2 = dataList[data_string][1];  
         for (var i=0; i<varList2.length; i++) {
@@ -172,7 +147,6 @@
           list1.add(new Option(varList[k][0],k));
         }
       }
-
     function select_monthsByPara(){
       	var monthsByPara = $('#monthsPara').text();
       	console.log("HERE!!!!!!"+monthsByPara);
@@ -214,8 +188,6 @@
       		document.getElementById('Dec').checked = true;
       	}
       }
-    
-	// disable pressure level box for 2D var
     function disable_pres(ID)
     {
       var x;
@@ -232,43 +204,35 @@
 	    	  	var split12 = x.value.split(",");
 	   	        var temp1 = split12[0];
 	   	        var temp2 = split12[1];
-	   	        // when variable is the 3D Ocean Salinity or Ocean Temperature
 	   	        if ( var1 == 'ot' || var1 == 'os') {
-	   	          temp1 = temp1 / 10000;  // convert from dbar on GUI
-	   	          temp2 = temp2 / 10000;  // convert from dbar on GUI
+	   	          temp1 = temp1 / 10000;  
+	   	          temp2 = temp2 / 10000;  
 	   	        } 
-	   	        // when variable2 is 3D atmosphere var
 	   	        else {
-	   	          temp1 = temp1 / 100;  // convert from hPa on GUI
-	   	          temp2 = temp2 / 100;  // convert from hPa on GUI
+	   	          temp1 = temp1 / 100;  
+	   	          temp2 = temp2 / 100;  
 	   	        }
 	   	        x.value = temp1 + "," + temp2;
     	  }
     	  else{
     		  if ( var1 == 'ot' || var1 == 'os') {
-	   	          x.value = x.value / 10000;  // convert from dbar on GUI
+	   	          x.value = x.value / 10000;  
 	   	        } 
-	   	        // when variable2 is 3D atmosphere var
 	   	        else {
-	   	        	x.value = x.value / 100;  // convert from hPa on GUI
+	   	        	x.value = x.value / 100;  
 	   	        }
     	  }
       }
     }
-
-    // enable pressure level box for 3D var
     function enable_pres1(ID)
     {
       var x;
       x=document.getElementById("pres"+ID);
       x.disabled=false;
     }
-    
     function changeDataSource1() {
     	var dataSource = $('#dataSourceP').text();
-
 	    var x = document.getElementById("data1");
-
 	    if(dataSource == "gfdl_esm2g" ){
      		x.options[0].selected=true;
      	}
@@ -345,10 +309,8 @@
      		x.options[24].selected=true;
      	}
     }
-    
     function changeDataSource2() {
     	var dataSource = $('#dataSourceE1').text();
-	    //dataSource = "NASA_QuikSCAT";
 	    var x = document.getElementById("data2");
 	    if(dataSource == "gfdl_esm2g" ){
      		x.options[0].selected=true;
@@ -386,7 +348,7 @@
      	else if(dataSource == "ukmo_hadgem2-a" ){
      		x.options[11].selected=true;
      	}
-     	else if(dataSource == "nasa_grace" ){ //////////////////////////////////
+     	else if(dataSource == "nasa_grace" ){
      		x.options[12].selected=true;
      	}
      	else if(dataSource == "nasa_modis" ){
@@ -426,10 +388,8 @@
      		x.options[24].selected=true;
      	}
     }
-    
     function changeDataSource3() {
     	var dataSource = $('#dataSourceE2').text();
-	    //dataSource = "NASA_QuikSCAT";
 	    var x = document.getElementById("data3");
 	    if(dataSource == "gfdl_esm2g" ){
      		x.options[0].selected=true;
@@ -467,7 +427,7 @@
      	else if(dataSource == "ukmo_hadgem2-a" ){
      		x.options[11].selected=true;
      	}
-     	else if(dataSource == "nasa_grace" ){ //////////////////////////////////
+     	else if(dataSource == "nasa_grace" ){
      		x.options[12].selected=true;
      	}
      	else if(dataSource == "nasa_modis" ){
@@ -507,65 +467,48 @@
      		x.options[24].selected=true;
      	}
     }
-    
     function changeVariableName1(){
         var var_string = $('#variableNameP').text();
         var data_string = $('#dataSourceP').text();
         data_string = data_string.replace("_", "/").toUpperCase();
-        
-      
         var varList2 = dataList[data_string][1];  
         var x = document.getElementById("var1");
-        
         for (var i=0; i<varList2.length; i++) {
       	  var k = varList2[i];
-      	  
             if (k == var_string) {
             	x.options[i].selected=true;
             	break;
             }
         }
     }
-    
     function changeVariableName2(){
         var var_string = $('#variableNameE1').text();
         var data_string = $('#dataSourceE1').text();
         data_string = data_string.replace("_", "/").toUpperCase();
-        
-      
         var varList2 = dataList[data_string][1];  
         var x = document.getElementById("var2");
-        
         for (var i=0; i<varList2.length; i++) {
       	  var k = varList2[i];
-      	  
             if (k == var_string) {
             	x.options[i].selected=true;
             	break;
             }
         }
     }
-    
     function changeVariableName3(){
         var var_string = $('#variableNameE2').text();
         var data_string = $('#dataSourceE2').text();
         data_string = data_string.replace("_", "/").toUpperCase();
-        
-      
         var varList2 = dataList[data_string][1];  
         var x = document.getElementById("var3");
-        
         for (var i=0; i<varList2.length; i++) {
       	  var k = varList2[i];
-      	  
             if (k == var_string) {
             	x.options[i].selected=true;
             	break;
             }
         }
     }
-    
- // select all months in the checkboxes
     function select_all_months()
     {
         document.getElementById('Jan').checked = true;
@@ -581,8 +524,6 @@
         document.getElementById('Nov').checked = true;
         document.getElementById('Dec').checked = true;
     }
-
-    // see if no month is selected
     function no_month_check()
     {
         if (document.getElementById('Jan').checked == false &&
@@ -597,14 +538,11 @@
            document.getElementById('Oct').checked == false &&
            document.getElementById('Nov').checked == false &&
            document.getElementById('Dec').checked == false) {
-           // alert("No month check!");
            return true;
           }
         else
            return false;
     }
-
-    // unselect all months in the checkboxes
     function reset_months()
     {
         document.getElementById('Jan').checked = false;
@@ -620,11 +558,8 @@
         document.getElementById('Nov').checked = false;
         document.getElementById('Dec').checked = false;
     }
-    
-    // disable customized input text boxes
     function setDefault(ID)
     {
-       // alert("in setDefault() ... ");
        var x=document.getElementById("min"+ID);
        var y=document.getElementById("max"+ID);
        var z=document.getElementById("bins"+ID);
@@ -635,11 +570,8 @@
        z.value = "N/A";
        z.disabled=true;
     }
-
-    // enable customized input text boxes
     function setCustomized(ID)
     {
-       // alert("in setCustomized() ... ");
        var x=document.getElementById("min"+ID);
        var y=document.getElementById("max"+ID);
        var z=document.getElementById("bins"+ID);
@@ -650,10 +582,7 @@
        z.value = "";
        z.disabled=false;
     }
-    
- // getMonthStr__
     function getMonthStr() {
-            // get months checked by client
             var month_str = "";
             for (var i=0; i<monthList.length; i++) {
               var mm = document.getElementById(monthList[i]);
@@ -664,94 +593,54 @@
             month_str = month_str.substr(1);
             return month_str;
     }
-
     $(document).ready(function(){
-
       $("#download_data").click(function(event) {
         var durl = $("#data_url").val();
-        // alert(durl);
         window.location.assign(durl);
       });
-
-
       $("#conditionalSamp").click(function(event) {
-        // alert('****** inside conditionalSamp()!');
         Response = null;
-
-        // no data to download yet
         disable_download_button();
-
-        // flag error if no month box is checked
         if (no_month_check()) {
-           // $("#Response").html("<span style='color:red'>Error: please check at least one month.</span>");
            $("#Response").html("Error: please check at least one month.");
            $("#Image").html("");
            return;
         }
-
         $("#Response").html("Calculating ...");
         $("#data_url").html("Calculating ...");
         $("#Image").html("");
-
-        // sample url: http://cmacws.jpl.nasa.gov:8090/svc/conditionalSampling?model1=ukmo_hadgem2-a&var1=ts&pres1=200&model2=ukmo_hadgem2-a&var2=clt&pres2=200&start_time=199001&end_time=199512&lon1=0&lon2=100&lat1=-29&lat2=29
-        // form url string
-        // var url = "http://cmacws.jpl.nasa.gov:8090/svc/conditionalSamp?";
-        var url = "http://" + window.location.hostname + ":9002/svc/conditionalSampling2Var?";
-        // alert("url: " + url);
-
+        var url = "http:
         var d1 = $("#data1").val();
         var model1 = d1.replace("/", "_");
         model1 = model1.toLowerCase();
-
         var arglist = "";
         arglist = arglist.concat("model1=");
         arglist = arglist.concat(model1);
-
-        // alert("arglist: " + arglist);
-
         var variable1 = $("#var1").val();
         arglist = arglist.concat("&var1=");
         arglist = arglist.concat(variable1);
-
-        // alert("arglist: " + arglist);
-
-
         var t0 = $("#t0").val();
         var t1 = $("#t1").val();
-
         t0 = t0.replace("-", "");
         t1 = t1.replace("-", "");
-
         arglist = arglist.concat("&start_time=");
         arglist = arglist.concat(t0);
-
         arglist = arglist.concat("&end_time=");
         arglist = arglist.concat(t1);
-
         var lon0 = $("#lon0").val();
         var lon1 = $("#lon1").val();
         var lat0 = $("#lat0").val();
         var lat1 = $("#lat1").val();
-
         arglist = arglist.concat("&lon1=");
         arglist = arglist.concat(lon0);
-
         arglist = arglist.concat("&lon2=");
         arglist = arglist.concat(lon1);
-
         arglist = arglist.concat("&lat1=");
         arglist = arglist.concat(lat0);
-
         arglist = arglist.concat("&lat2=");
         arglist = arglist.concat(lat1);
-
-        // alert("arglist: " + arglist);
-
         var press_range = $("#pres1").val();
-        // alert("press_range: " + press_range);
-
         var pres12 = parse_pres(press_range);
-
         var pres1;
         var pres2;
         if (pres12 === naValue) {
@@ -765,190 +654,124 @@
           } else {
             pres1 = split12[0];
             pres2 = split12[1];
-        
-            // when variable is the 3D Ocean Salinity or Ocean Temperature
             if (variable1 == 'ot' || variable1 == 'os') {
-              pres1 = pres1 * 10000;  // convert from dbar on GUI
-              pres2 = pres2 * 10000;  // convert from dbar on GUI
+              pres1 = pres1 * 10000;  
+              pres2 = pres2 * 10000;  
             } 
-            // when variable2 is 3D atmosphere var
             else {
-              pres1 = pres1 * 100;  // convert from hPa on GUI
-              pres2 = pres2 * 100;  // convert from hPa on GUI
+              pres1 = pres1 * 100;  
+              pres2 = pres2 * 100;  
             }
           }
         }
-        //alert("pres1, pres2: " + pres1 + ", " + pres2);
-
         arglist = arglist.concat("&pres1=");
         arglist = arglist.concat(pres1);
         arglist = arglist.concat("&pres2=");
         arglist = arglist.concat(pres2);
-
-        // alert("arglist: " + arglist);
-
         var month_str = getMonthStr();
         arglist = arglist.concat("&months=");
         arglist = arglist.concat(month_str);
-
-        // alert("arglist: " + arglist);
-
-
         var d2 = $("#data2").val();
         var model2 = d2.replace("/", "_");
         model2 = model2.toLowerCase();
-
         arglist = arglist.concat("&model2=");
         arglist = arglist.concat(model2);
-
-        // alert("arglist: " + arglist);
-
         var variable2 = $("#var2").val();
         arglist = arglist.concat("&var2=");
         arglist = arglist.concat(variable2);
-
         var d3 = $("#data3").val();
         var model3 = d3.replace("/", "_");
         model3 = model3.toLowerCase();
-
         arglist = arglist.concat("&model3=");
         arglist = arglist.concat(model3);
-
-        // alert("arglist: " + arglist);
-
         var variable3 = $("#var3").val();
         arglist = arglist.concat("&var3=");
         arglist = arglist.concat(variable3);
-
-        // alert("arglist: " + arglist);
-
         var plev1 = $("#pres2").val();
         plev1 = parse_pres(plev1);
-
         if (plev1>0) {
-          // when variable is the 3D Ocean Salinity or Ocean Temperature
           if (variable2 == 'ot' || variable2 == 'os') {
-            plev1 = plev1 * 10000;  // convert from dbar on GUI
+            plev1 = plev1 * 10000;  
           } 
-          // when variable2 is 3D atmosphere var
           else {
-            plev1 = plev1 * 100;  // convert from hPa on GUI
+            plev1 = plev1 * 100;  
           }
         }
-
         arglist = arglist.concat("&env_var_plev1=");
         arglist = arglist.concat(plev1);
-
         var plev2 = $("#pres3").val();
         plev2 = parse_pres(plev2);
         if (plev2>0) {
-          // when variable is the 3D Ocean Salinity or Ocean Temperature
           if (variable3 == 'ot' || variable3 == 'os') {
-            plev2 = plev2 * 10000;  // convert from dbar on GUI
+            plev2 = plev2 * 10000;  
           } 
-          // when variable2 is 3D atmosphere var
           else {
-            plev2 = plev2 * 100;  // convert from hPa on GUI
+            plev2 = plev2 * 100;  
           }
         }
-
         arglist = arglist.concat("&env_var_plev2=");
         arglist = arglist.concat(plev2);
-
-        // alert("arglist: " + arglist);
-
         var binstate1 = document.getElementById('radioDef1').checked;
-
         var binMin1, binMax1, numBins1;
-
-        if (binstate1 == true) { // default
+        if (binstate1 == true) { 
           binMin1 = naValue;
           binMax1 = naValue;
           numBins1 = naValue;
         }
-        else { // customized
+        else { 
           binMin1 = $("#min1").val();
           binMax1 = $("#max1").val();
           numBins1 = $("#bins1").val();
         }
-
         arglist = arglist.concat("&bin_min1=");
         arglist = arglist.concat(binMin1);
         arglist = arglist.concat("&bin_max1=");
         arglist = arglist.concat(binMax1);
         arglist = arglist.concat("&bin_n1=");
         arglist = arglist.concat(numBins1);
-
         var binstate2 = document.getElementById('radioDef2').checked;
-
         var binMin2, binMax2, numBins2;
-
-        if (binstate2 == true) { // default
+        if (binstate2 == true) { 
           binMin2 = naValue;
           binMax2 = naValue;
           numBins2 = naValue;
         }
-        else { // customized
+        else { 
           binMin2 = $("#min2").val();
           binMax2 = $("#max2").val();
           numBins2 = $("#bins2").val();
         }
-
         arglist = arglist.concat("&bin_min2=");
         arglist = arglist.concat(binMin2);
         arglist = arglist.concat("&bin_max2=");
         arglist = arglist.concat(binMax2);
         arglist = arglist.concat("&bin_n2=");
         arglist = arglist.concat(numBins2);
-
-        // alert("arglist: " + arglist);
-
         var xstate = document.getElementById('radioXLin').checked;
         var xvalue;
-
         if (xstate == true)
           xvalue = 0;
         else
           xvalue = 1;
-
-        // alert("xvalue: " + xvalue);
-
         var ystate = document.getElementById('radioYLin').checked;
         var yvalue;
-
         if (ystate == true)
           yvalue = 0;
         else
           yvalue = 1;
-
-        // alert("yvalue: " + yvalue);
-
         var zstate = document.getElementById('radioZLin').checked;
         var zvalue;
-
         if (zstate == true)
           zvalue = 0;
         else
           zvalue = 1;
-
-        // alert("zvalue: " + zvalue);
-
         var dispOpt;
         dispOpt = xvalue*1 + yvalue*2 + zvalue*4;
-        // alert("dispOpt: " + dispOpt);
         var dispOptString = dispOpt.toString();
-
         arglist = arglist.concat("&displayOpt=");
         arglist = arglist.concat(dispOptString);
-
-        // alert("arglist: " + arglist);
-
-        // url = url + encodeURIComponent(arglist);
         url = url + encodeURI(arglist);
-        // url = url + arglist;
-        // alert("url: " + url);
-
-        var urlTimeBounds = "http://" + window.location.hostname + ":9002/svc/two_time_bounds?";
+        var urlTimeBounds = "http:
         var arglistTB = "";
         arglistTB = arglistTB.concat("serviceType=");
         arglistTB = arglistTB.concat("1");
@@ -961,8 +784,6 @@
         arglistTB = arglistTB.concat("&var2=");
         arglistTB = arglistTB.concat(variable2);
         urlTimeBounds = urlTimeBounds + encodeURI(arglistTB);
-        // alert("urlTimeBounds: " + urlTimeBounds);
-
         $.ajax({
             type: "GET",
             url: urlTimeBounds,
@@ -970,9 +791,7 @@
             data: null,
             success: function(data, textStatus, xhr) {
                 Response = data;
-                // alert("data: " + data);
                 if (data.success == false) {
-                    // alert(data.error);
                     Response = null;
                     var text = JSON.stringify(data, null, 4);
                     text = "Error in backend: <br>" + text; 
@@ -981,82 +800,56 @@
                     return;
                 }
                 var text = JSON.stringify(data, null, 4);
-                // alert("text: " + text);
-                // $("#Response").html("<pre>"+text+"</pre>");
-                // $("#Response").html(text);
-
                 var tb1 = data.time_bounds1;
                 var bds1 = String(tb1).split(",");
-                // alert("tb1: " + tb1);
-                // alert("bds1: " + bds1);
                 var lowerT1 = parseInt(bds1[0]);
-                // alert("inside ajax, lowerT1: " + lowerT1);
                 var upperT1 = parseInt(bds1[1]);
-                // alert("upperT1: " + upperT1);
-
                 var tb2 = data.time_bounds2;
                 var bds2 = String(tb2).split(",");
-                // alert("tb2: " + tb2);
-                // alert("bds2: " + bds2);
                 var lowerT2 = parseInt(bds2[0]);
-                // alert("inside ajax, lowerT2: " + lowerT2);
                 var upperT2 = parseInt(bds2[1]);
-                // alert("upperT2: " + upperT2);
-
                 var t0I = parseInt(t0);
                 var t1I = parseInt(t1);
-                // alert("t0: " + t0I);
-                // alert("t1: " + t1I);
-
                 var lowerT, upperT;
-                // compute the intersection of the two data bounds
-
-                if (lowerT1 == 0  || upperT1 == 0){ // no data-1
+                if (lowerT1 == 0  || upperT1 == 0){ 
                   alert("We do not have data for the data-1 source and variable configuration.");
                   return;
                 }
-                else if (lowerT2 == 0  || upperT2 == 0){ // no data-2
+                else if (lowerT2 == 0  || upperT2 == 0){ 
                   alert("We do not have data for the data-2 source and variable configuration.");
                   return;
                 }
-                else if (lowerT2 > upperT1 || lowerT1 > upperT2) { // no intersection
+                else if (lowerT2 > upperT1 || lowerT1 > upperT2) { 
                   alert("The two data sets/vars do not have a common time range.");
                   return;
                 }
-                else { // compute intersection
-                  if (lowerT1 > lowerT2) { // pick bigger lower time bound
+                else { 
+                  if (lowerT1 > lowerT2) { 
                     lowerT = lowerT1;
                   }
                   else {
                     lowerT = lowerT2;
                   }
-
-                  if (upperT1 > upperT2) { // pick smaller upper time bound
+                  if (upperT1 > upperT2) { 
                     upperT = upperT2;
                   }
                   else {
                     upperT = upperT1;
                   }
                 }
-                // alert("lowerT: " + lowerT);
-                // alert("upperT: " + upperT);
-
                 if (t0I < lowerT && t1I < lowerT ||
                     t0I > upperT && t1I > upperT) {
                   alert("We do not have data that span your time range. Try the range inside ["+lowerT+", "+upperT+"].");
                   return;
                 }
-
                 if (t0I < lowerT && t1I <= upperT) {
                   alert("Your start year-month is out of bound. It has to be in or later than " + lowerT +
                         ". We will use the range ["+lowerT+", "+t1I+"] for you.");
                 }
-
                 if (t1I > upperT && t0I >= lowerT) {
                   alert("Your end year-month is out of bound. It has to be in or earlier than " + upperT +
                         ". We will use the range ["+t0I+", "+upperT+"] for you.");
                 }
-
                 if (t0I < lowerT && t1I > upperT ) {
                   alert("Both of your start and end year-months are out of bounds. They have to be in or earlier than " + upperT +
                         ", and in or later than " + lowerT + ". We will use the range ["+lowerT+", "+upperT+"] for you.");
@@ -1065,15 +858,10 @@
             error: function(xhr, textStatus, errorThrown) {
 		$("#Response").html("error!");
 		$("#data_url").html("error!");
-                // alert("xhr.status: "+xhr.status);
-                // alert("error status: "+textStatus);
             },
             complete: function(xhr, textStatus) {
-                //alert("complete status: "+textStatus);
             }
         });
-
-
         $.ajax({
             type: "GET",
             url: url,
@@ -1081,51 +869,32 @@
             data: null,
             success: function(data, textStatus, xhr) {
                 Response = data;
-                // alert("data: " + data);
                 if (data.success == false) {
-                    // alert(data.error);
                     Response = null;
                     var text = JSON.stringify(data, null, 4);
                     text = "Error in backend: <br>" + text; 
-                    // $("#Response").html("<span style='color:red'>" + text + "</span>");
                     $("#Response").html(text);
                     $("#data_url").html(text);
                     return;
                 }
                 var text = JSON.stringify(data, null, 4);
-                // alert(text);
-                // $("#Response").html("<pre>"+text+"</pre>");
                 $("#Response").html(text);
-
                 var html = "<img src='"+data.url+"' width='820'/>";
-                // alert(html);
                 $("#Image").html(html);
-
-                // post dataUrl to textarea and enable download button
                 $("#data_url").html(data.dataUrl);
                 enable_download_button();
             },
             error: function(xhr, textStatus, errorThrown) {
                 $("#Response").html("error!");
                 $("#data_url").html("error!");
-                // alert("xhr.status: "+xhr.status);
-                // alert("error status: "+textStatus);
             },
             complete: function(xhr, textStatus) {
-                //alert("complete status: "+textStatus);
             }
         });
-
       });
-
     });
-    
   </script>
-}
-
-@main("Parameters of ConfId", scripts){
-	
-	@flash_message()   
+} @main("Parameters of ConfId", scripts){ @flash_message()
 <p>
 <div id="dataSourceP" style="display: none;">@parameters.getDataSourceP()</div>
 <div id="dataSourceE1" style="display: none;">@parameters.getDataSourceE1()</div>
@@ -1137,14 +906,11 @@
 <div id="pressureRange2" style="display: none;">@parameters.getPressureRange2()</div>
 <div id="env_var_plev1" style="display: none;">@parameters.getEnableVarPlev1()</div>
 <div id="env_var_plev2" style="display: none;">@parameters.getEnableVarPlev2()</div>
-
 <div id="startYearMonth" style="display: none;">@parameters.getStartYearMonth()</div>
 <div id="enChoose1" style="display: none;">@parameters.getCustomized1</div>
 <div id="enChoose2" style="display: none;">@parameters.getCustomized2</div>
-
 <div id="endYearMonth" style="display: none;">@parameters.getEndYearMonth()</div>
 <div id="selectMonths" style="display: none;">@parameters.getSelectMonths()</div>
-
 <div id="monthsPara" style="display: none;">@parameters.getMonth()</div>
 <div id="startLat" style="display: none;">@parameters.getStartLat()</div>
 <div id="endLat" style="display: none;">@parameters.getEndLat()</div>
@@ -1156,228 +922,213 @@
 <div id="binMin1" style="display: none;">@parameters.getBin_min1()</div>
 <div id="binMax1" style="display: none;">@parameters.getBin_max1()</div>
 <div id="binNum1" style="display: none;">@parameters.getBin_n1()</div>
-
 <div id="binMin2" style="display: none;">@parameters.getBin_min2()</div>
 <div id="binMax2" style="display: none;">@parameters.getBin_max2()</div>
 <div id="binNum2" style="display: none;">@parameters.getBin_n2()</div>
-
 <div id="executionPurpose" style="display: none;">@parameters.getExecutionPurpose()</div>
 <div id="image" style="display: none;">@parameters.getImage()</div>
 <div id="dataURL" style="display: none;">@parameters.getDataURL()</div>
 <div id="serviceResponseText" style="display: none;">@parameters.getServiceResponseText()</div>
-
-
 <table border="1">
-
-<tr>
-<td colspan="4">
-<center>
-<b>Service: Conditional Sampling with Two Variables</b><br><br>
-This service sorts one variable called sampled variable by the
-values of two variables called sampling variables and displays the
-averaged value of the sampled variable in color as a function of the
-bin value of the two sampling variables in X-Y axis. There are
-overlaid contours which show the number of samples in each of the 
-two sampling variable bin.<br><br> 
-</center>
-</td>
-</tr>
-
-<tr>
-<td colspan="2">
-<center>
-Physical Variable (sampled variable)
-</center>
-</td>
-<td colspan="2" rowspan="4">
-</td>
-</tr>
-
-<tr>
-<td>source:</td>
-<td><select name="data1", id="data1" onchange="put_var(1); time_range3()"></select></td>
-</tr>
-
-<tr>
-<td>variable name:</td><td><select name="var1", id="var1" onchange="select_var(1); time_range3()"> </select> </td>
-</tr>
-
-<td>
-atmosphere pressure range (hPa) <br> or ocean pressure range (dbar):
-</td>
-<td>
-<input id="pres1" value="@{parameters.getPressureRange1()+','+parameters.getPressureRange2()}" alt="pressure"/>
-</td>
-</tr>
-
-<tr>
-<td colspan="2">
-<center>
-Environmental Variable 1 (sampling variable)
-</center>
-</td>
-
-<td colspan="2" rowspan="6">
-</td>
-
-</tr>
-
-<tr>
-<td>source:</td>
-<td><select name="data2", id="data2" onchange="put_var(2); time_range3()"></select></td>
-</tr>
-
-<tr>
-<td>variable name:</td><td><select name="var2", id="var2" onchange="select_var(2); time_range3()"> </select> </td>
-</tr>
-
-<tr>
-<td>
-atmosphere pressure level (hPa) <br> or ocean pressure level (dbar):
-</td>
-<td>
-<input id="pres2" value="@parameters.getEnableVarPlev1()" alt="pressure"/>
-</td>
-</tr>
-
-<tr>
-<td colspan="2">
-sampling variable binning specification:
-<form>
-default: <input onclick="setDefault(1)" type="radio" name="default1" value="" id="radioDef1" checked>
-customized: <input onclick="setCustomized(1)" type="radio" name="default1" value="" id="radioCus1">
-</form>
-</td>
-</tr>
-
-<tr>
-<td colspan="2">
-<form> 
-Min: <input id="min1" value="@parameters.getBin_min1()" alt="" size=3/> 
-Max: <input id="max1" value="@parameters.getBin_max1()" alt="" size=3/>
-number of bins: <input id="bins1" value="@parameters.getBin_n1()" alt="" size=3/>
-</form> 
-</td>
-</tr>
-
-<tr>
-<td colspan="2">
-<center>
-Environmental Variable 2 (sampling variable)
-</center>
-</td>
-</tr>
-
-<tr>
-<td>source:</td>
-<td><select name="data3", id="data3" onchange="put_var(3); time_range3()"></select></td>
-</tr>
-
-<tr>
-<td>variable name:</td><td><select name="var3", id="var3" onchange="select_var(3); time_range3()"> </select> </td>
-</tr>
-
-<tr>
-<td>
-atmosphere pressure level (hPa) <br> or ocean pressure level (dbar):
-</td>
-<td>
-<input id="pres3" value="@parameters.getEnableVarPlev2()" alt="pressure"/>
-</td>
-</tr>
-
-<tr>
-<td colspan="2">
-sampling variable binning specification:
-<form>
-default: <input onclick="setDefault(2)" type="radio" name="default2" value="" id="radioDef2" checked>
-customized: <input onclick="setCustomized(2)" type="radio" name="default2" value="" id="radioCus2">
-</form>
-</td>
-</tr>
-
-<tr>
-<td colspan="2">
-<form> 
-Min: <input id="min2" value="@parameters.getBin_min2()" alt="" size=3/> 
-Max: <input id="max2" value="@parameters.getBin_max2()" alt="" size=3/>
-number of bins: <input id="bins2" value="@parameters.getBin_n2()" alt="" size=3/>
-</form> 
-</td>
-</tr>
-
-<tr>
-<td id=startYear>start year-month:</td><td> <input id="t0" value="@parameters.getStartYearMonth()" alt="start"/></td>
-<td id=endYear>end year-month: </td><td><input id="t1" value="@parameters.getEndYearMonth()" alt="end"/></td>
-</tr>
-
-<tr>
-<td id="monthSelect0"></td>
-<td id="monthSelect" colspan="3"></td>
-</tr>
-
-<tr>
-<td>start lat (deg):</td><td><input id="lat0" value="@parameters.getStartLat()"/></td>
-<td>end lat (deg):</td><td><input id="lat1" value="@parameters.getEndLat()"/></td>
-</tr>
-
-<tr>
-<td>start lon (deg):</td><td><input id="lon0" value="@parameters.getStartLon()"/></td>
-<td>end lon (deg):</td><td><input id="lon1" value="@parameters.getEndLon()"/></td>
-</tr>
-
-<tr>
-<td colspan="1" rowspan="3">
-display option:
-</td>
-<td colspan="3">
-<form>X-axis (sampling variable) scale: <input type="radio" name="scale1" value="linear" id="radioXLin" checked>linear
-<input type="radio" name="scale1" value="logarithmic" id="radioXLog">logarithmic
-</form>
-</td>
-</tr>
-
-<tr>
-<td colspan="3">
-<form>Y-axis (sampled variable or pressure) scale: <input type="radio" name="scale1" value="linear" id="radioYLin" checked>linear
-<input type="radio" name="scale1" value="logarithmic" id="radioYLog">logarithmic
-</form>
-</tr>
-
-<tr>
-<td colspan="3">
-<form>Z-axis (color) scale: <input type="radio" name="scale1" value="linear" id="radioZLin" checked>linear
-<input type="radio" name="scale1" value="logarithmic" id="radioZLog">logarithmic
-</form>
-</td>
-</tr>
-
-<tr>
-<td colspan="2" align="center"><input id="conditionalSamp" type="submit" value="            Get  Plot            " style="height:28px"/></td>
-<form>
-<td colspan="2" align="center"><input id="download_data" type="button" value="Download Data" style="height:28px"/>
-</td>
-</form>
-
-</tr>
-
-<tr>
-<td colspan="4">
-<div id="Image"><img src="@parameters.getImage()" width=680 /></div>
-</td>
-</tr>
-
-<tr>
-<td colspan="4" align="center">
-<textarea readonly id="data_url" cols="130" rows="2">@parameters.getDataURL()</textarea>
-</td>
-</tr>
-
-<tr>
-<td colspan="4" align="center">
-<textarea id="Response" cols="130" rows="6">@parameters.getServiceResponseText()</textarea>
-</td>
-</tr>
-
+	<tr>
+		<td colspan="4">
+			<center>
+				<b>Service: Conditional Sampling with Two Variables</b><br>
+				<br> This service sorts one variable called sampled variable by
+				the values of two variables called sampling variables and displays
+				the averaged value of the sampled variable in color as a function of
+				the bin value of the two sampling variables in X-Y axis. There are
+				overlaid contours which show the number of samples in each of the
+				two sampling variable bin.<br>
+				<br>
+			</center>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="2">
+			<center>Physical Variable (sampled variable)</center>
+		</td>
+		<td colspan="2" rowspan="4"></td>
+	</tr>
+	<tr>
+		<td>source:</td>
+		<td><select name="data1" , id="data1"
+			onchange="put_var(1); time_range3()"></select></td>
+	</tr>
+	<tr>
+		<td>variable name:</td>
+		<td><select name="var1" , id="var1"
+			onchange="select_var(1); time_range3()">
+		</select></td>
+	</tr>
+	<td>atmosphere pressure range (hPa) <br> or ocean pressure
+		range (dbar):
+	</td>
+	<td><input id="pres1"
+		value="@{parameters.getPressureRange1()+','+parameters.getPressureRange2()}"
+		alt="pressure" /></td>
+	</tr>
+	<tr>
+		<td colspan="2">
+			<center>Environmental Variable 1 (sampling variable)</center>
+		</td>
+		<td colspan="2" rowspan="6"></td>
+	</tr>
+	<tr>
+		<td>source:</td>
+		<td><select name="data2" , id="data2"
+			onchange="put_var(2); time_range3()"></select></td>
+	</tr>
+	<tr>
+		<td>variable name:</td>
+		<td><select name="var2" , id="var2"
+			onchange="select_var(2); time_range3()">
+		</select></td>
+	</tr>
+	<tr>
+		<td>atmosphere pressure level (hPa) <br> or ocean pressure
+			level (dbar):
+		</td>
+		<td><input id="pres2" value="@parameters.getEnableVarPlev1()"
+			alt="pressure" /></td>
+	</tr>
+	<tr>
+		<td colspan="2">sampling variable binning specification:
+			<form>
+				default: <input onclick="setDefault(1)" type="radio" name="default1"
+					value="" id="radioDef1" checked> customized: <input
+					onclick="setCustomized(1)" type="radio" name="default1" value=""
+					id="radioCus1">
+			</form>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="2">
+			<form>
+				Min: <input id="min1" value="@parameters.getBin_min1()" alt=""
+					size=3 /> Max: <input id="max1" value="@parameters.getBin_max1()"
+					alt="" size=3 /> number of bins: <input id="bins1"
+					value="@parameters.getBin_n1()" alt="" size=3 />
+			</form>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="2">
+			<center>Environmental Variable 2 (sampling variable)</center>
+		</td>
+	</tr>
+	<tr>
+		<td>source:</td>
+		<td><select name="data3" , id="data3"
+			onchange="put_var(3); time_range3()"></select></td>
+	</tr>
+	<tr>
+		<td>variable name:</td>
+		<td><select name="var3" , id="var3"
+			onchange="select_var(3); time_range3()">
+		</select></td>
+	</tr>
+	<tr>
+		<td>atmosphere pressure level (hPa) <br> or ocean pressure
+			level (dbar):
+		</td>
+		<td><input id="pres3" value="@parameters.getEnableVarPlev2()"
+			alt="pressure" /></td>
+	</tr>
+	<tr>
+		<td colspan="2">sampling variable binning specification:
+			<form>
+				default: <input onclick="setDefault(2)" type="radio" name="default2"
+					value="" id="radioDef2" checked> customized: <input
+					onclick="setCustomized(2)" type="radio" name="default2" value=""
+					id="radioCus2">
+			</form>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="2">
+			<form>
+				Min: <input id="min2" value="@parameters.getBin_min2()" alt=""
+					size=3 /> Max: <input id="max2" value="@parameters.getBin_max2()"
+					alt="" size=3 /> number of bins: <input id="bins2"
+					value="@parameters.getBin_n2()" alt="" size=3 />
+			</form>
+		</td>
+	</tr>
+	<tr>
+		<td id=startYear>start year-month:</td>
+		<td><input id="t0" value="@parameters.getStartYearMonth()"
+			alt="start" /></td>
+		<td id=endYear>end year-month:</td>
+		<td><input id="t1" value="@parameters.getEndYearMonth()"
+			alt="end" /></td>
+	</tr>
+	<tr>
+		<td id="monthSelect0"></td>
+		<td id="monthSelect" colspan="3"></td>
+	</tr>
+	<tr>
+		<td>start lat (deg):</td>
+		<td><input id="lat0" value="@parameters.getStartLat()" /></td>
+		<td>end lat (deg):</td>
+		<td><input id="lat1" value="@parameters.getEndLat()" /></td>
+	</tr>
+	<tr>
+		<td>start lon (deg):</td>
+		<td><input id="lon0" value="@parameters.getStartLon()" /></td>
+		<td>end lon (deg):</td>
+		<td><input id="lon1" value="@parameters.getEndLon()" /></td>
+	</tr>
+	<tr>
+		<td colspan="1" rowspan="3">display option:</td>
+		<td colspan="3">
+			<form>
+				X-axis (sampling variable) scale: <input type="radio" name="scale1"
+					value="linear" id="radioXLin" checked>linear <input
+					type="radio" name="scale1" value="logarithmic" id="radioXLog">logarithmic
+			</form>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="3">
+			<form>
+				Y-axis (sampled variable or pressure) scale: <input type="radio"
+					name="scale1" value="linear" id="radioYLin" checked>linear
+				<input type="radio" name="scale1" value="logarithmic" id="radioYLog">logarithmic
+			</form>
+	</tr>
+	<tr>
+		<td colspan="3">
+			<form>
+				Z-axis (color) scale: <input type="radio" name="scale1"
+					value="linear" id="radioZLin" checked>linear <input
+					type="radio" name="scale1" value="logarithmic" id="radioZLog">logarithmic
+			</form>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="2" align="center"><input id="conditionalSamp"
+			type="submit" value="            Get  Plot            "
+			style="height: 28px" /></td>
+		<form>
+			<td colspan="2" align="center"><input id="download_data"
+				type="button" value="Download Data" style="height: 28px" /></td>
+		</form>
+	</tr>
+	<tr>
+		<td colspan="4">
+			<div id="Image">
+				<img src="@parameters.getImage()" width=680 />
+			</div>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="4" align="center"><textarea readonly id="data_url"
+				cols="130" rows="2">@parameters.getDataURL()</textarea></td>
+	</tr>
+	<tr>
+		<td colspan="4" align="center"><textarea id="Response" cols="130"
+				rows="6">@parameters.getServiceResponseText()</textarea></td>
+	</tr>
 </table>
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/f22b3e32/app/views/climate/correlationMap.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/correlationMap.scala.html b/app/views/climate/correlationMap.scala.html
index a9f2793..ec00da9 100644
--- a/app/views/climate/correlationMap.scala.html
+++ b/app/views/climate/correlationMap.scala.html
@@ -1,31 +1,27 @@
-@(parameters: metadata.CorrelationMap)
-
-@import helper._
-
+@(parameters: metadata.CorrelationMap) @import helper._
 <link rel="stylesheet"
 	href='@routes.Assets.at("stylesheets/livefitler.css")'>
-	
 @scripts = {
-	<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
-	<script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
-	<script type="text/javascript" src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
-	<script type="text/javascript" src='https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js'></script>
+<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
+<script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
+<script type="text/javascript"
+	src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
+<script type="text/javascript"
+	src='https:
 	<script type="text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
-	<script type="text/javascript" src='@routes.Assets.at("javascripts/xmisc.js")'></script>
-	<script type="text/javascript" src='@routes.Assets.at("html/js2/dataList2.js")'></script>
-	<script type="text/javascript" src='@routes.Assets.at("html/js2/varList.js")'></script>
-	<script type="text/javascript" src='@routes.Assets.at("html/js2/common.js")'></script>
-	
-	<script type="text/javascript">
-
+<script type="text/javascript"
+	src='@routes.Assets.at("javascripts/xmisc.js")'></script>
+<script type="text/javascript"
+	src='@routes.Assets.at("html/js2/dataList2.js")'></script>
+<script type="text/javascript"
+	src='@routes.Assets.at("html/js2/varList.js")'></script>
+<script type="text/javascript"
+	src='@routes.Assets.at("html/js2/common.js")'></script>
+<script type="text/javascript">
 	var Response = null;
     var variable1 = "";
     var variable2 = "";
-
-
-    // called on load or reload
     window.onload = function() {
-    	
     	put_data(1);
     	changeDataSource1();
         put_data(2);
@@ -34,41 +30,28 @@
         changeVariableName1();
         put_var(2);
         changeVariableName2();
-       	
-        
         enable_download_button();
-  	  
-        
         $('#t0').val($('#startYearMonth').text());
         $('#t1').val($('#endYearMonth').text());
-        
         if($('#pressureLevel1').text() == "-9999"){
         	disable_pres1(1);
         }else{
         	$('#pres1').val($('#pressureLevel1').text());
         }
-        
         if($('#pressureLevel2').text() == "-9999"){
         	disable_pres1(2);
         }else{
         	$('#pres2').val($('#pressureLevel2').text());
         }
-
         $('#lat0').val($('#startLat').text());
         $('#lat1').val($('#endLat').text());
-
         $('#lon0').val($('#startLon').text());
         $('#lon1').val($('#endLon').text());
-
         $('#laggedTime').html($('#executionLaggedTime').text());
-        
         $('#purpose').html($('#executionPurpose').text());
         $('#data_url').html($('#dataURL').text());
         $('#Response').html($('#serviceResponseText').text());
-        
     }
-    
- // disable pressure level box for 2D var
     function disable_pres1(ID)
     {
       var x;
@@ -76,8 +59,6 @@
       x.value = "N/A";
       x.disabled=true;
     }
-
-    // enable pressure level box for 3D var
     function enable_pres1(ID)
     {
       var x;
@@ -85,12 +66,9 @@
       x.value = "500";
       x.disabled=false;
     }
-    
     function changeDataSource1() {
     	var dataSource = $('#dataSource1').text();
-
 	    var x = document.getElementById("data1");
-
 	    if(dataSource == "gfdl_esm2g" ){
      		x.options[0].selected=true;
      	}
@@ -167,10 +145,8 @@
      		x.options[24].selected=true;
      	}
     }
-    
     function changeDataSource2() {
     	var dataSource = $('#dataSource2').text();
-	    //dataSource = "NASA_QuikSCAT";
 	    var x = document.getElementById("data2");
 	    if(dataSource == "gfdl_esm2g" ){
      		x.options[0].selected=true;
@@ -208,7 +184,7 @@
      	else if(dataSource == "ukmo_hadgem2-a" ){
      		x.options[11].selected=true;
      	}
-     	else if(dataSource == "nasa_grace" ){ //////////////////////////////////
+     	else if(dataSource == "nasa_grace" ){
      		x.options[12].selected=true;
      	}
      	else if(dataSource == "nasa_modis" ){
@@ -248,61 +224,44 @@
      		x.options[24].selected=true;
      	}
     }
-	
-	    
-	    
     function changeVariableName1(){
         var var_string = $('#variableName1').text();
         var data_string = $('#dataSource1').text();
         data_string = data_string.replace("_", "/").toUpperCase();
-        
-      
         var varList2 = dataList[data_string][1];  
         var x = document.getElementById("var1");
-        
         for (var i=0; i<varList2.length; i++) {
       	  var k = varList2[i];
-      	  
             if (k == var_string) {
             	x.options[i].selected=true;
             	break;
             }
         }
     }
-    
     function changeVariableName2(){
         var var_string = $('#variableName2').text();
         var data_string = $('#dataSource2').text();
         data_string = data_string.replace("_", "/").toUpperCase();
-        
-      
         var varList2 = dataList[data_string][1];  
         var x = document.getElementById("var2");
-        
         for (var i=0; i<varList2.length; i++) {
       	  var k = varList2[i];
-      	  
             if (k == var_string) {
             	x.options[i].selected=true;
             	break;
             }
         }
     }
-        
     function disable_download_button()
     {
       var x=document.getElementById("download_data");
       x.disabled=true;
     }
-
-    // enable download data button
     function enable_download_button()
     {
       var x=document.getElementById("download_data");
       x.disabled=false;
     }
-
-    // disable pressure level box for 2D var
     function disable_pres1(ID)
     {
       var x;
@@ -310,8 +269,6 @@
       x.value = "N/A";
       x.disabled=true;
     }
-
-    // enable pressure level box for 3D var
     function enable_pres1(ID)
     {
       var x;
@@ -319,10 +276,8 @@
       x.value = "500";
       x.disabled=false;
     }
-
     function put_data(ID){
       var list1=document.getElementById("data"+ID);
-
       for(var key in dataList) {
         if (key.slice(0,5)==="group") {
           var og = document.createElement("OPTGROUP");
@@ -333,165 +288,102 @@
         }
       }
     }
-
     function put_var(ID) {
       var list1=document.getElementById("var"+ID);
       for (var i=list1.length-1; i>=0; i--) {
       list1.remove(i);
       }
-
       data_string =  document.getElementById("data"+ID).value;
       var varList2 = dataList[data_string][1];  
       for (var i=0; i<varList2.length; i++) {
         var k = varList2[i];
         list1.add(new Option(varList[k][0],k));
       }
-    
     }
-
-    // 
     function select_var1(ID)
     {
       var var_string = $("#var"+ID).val();
-
-      // alert("var_string: " + var_string)
-
       if (varList[var_string][2]===3) {
         enable_pres1(ID);
       } else {
         disable_pres1(ID);
       }
-
-      //alert("variable1: " + var_string);
-
       var var_string1 = $("#var"+1).val();
       var var_string2 = $("#var"+2).val();
       var data_string1 = $("#data"+1).val();
       var data_string2 = $("#data"+2).val();
-
       var sTime = Math.max( Number(dataList[data_string1][2][var_string1][0]),
                             Number(dataList[data_string2][2][var_string2][0]) );
       var eTime = Math.min( Number(dataList[data_string1][2][var_string1][1]),
                             Number(dataList[data_string2][2][var_string2][1]) );
-
       $("#startYear").html("start year-month: (earliest:" + sTime + ")");
       $("#endYear").html("end year-month: (latest:" + eTime + ")");
     }
-
     $(document).ready(function(){
-
       $("#download_data").click(function(event) {
         var durl = $("#data_url").val();
-        // alert(durl);
         window.location.assign(durl);
       });
-
-
       $("#correlationMap").click(function(event) {
-        // alert('****** inside correlationMap()!');
         Response = null;
-
-        // no data to download yet
         disable_download_button();
-
         $("#Response").html("Calculating ...");
         $("#data_url").html("Calculating ...");
         $("#Image").html("");
-
-        // sample url: http://cmacws.jpl.nasa.gov:8090/svc/scatterPlot2V?model1=ukmo_hadgem2-a&var1=ts&pres1=200&model2=ukmo_hadgem2-a&var2=clt&pres2=200&start_time=199001&end_time=199512&lon1=0&lon2=100&lat1=-29&lat2=29
-        // form url string
-        // var url = "http://cmacws.jpl.nasa.gov:8090/svc/scatterPlot2V?";
-        var url = "http://" + window.location.hostname + ":9002/svc/correlationMap?";
-        // alert("url: " + url);
-
+        var url = "http:
         var d1 = $("#data1").val();
         var model1 = d1.replace("/", "_");
         model1 = model1.toLowerCase();
-
         var arglist = "";
         arglist = arglist.concat("model1=");
         arglist = arglist.concat(model1);
-
-        // alert("arglist: " + arglist);
-
         var variable1 = $("#var1").val();
         arglist = arglist.concat("&var1=");
         arglist = arglist.concat(variable1);
-
-        // alert("arglist: " + arglist);
-
         var pres1 = $("#pres1").val();
         if (isNaN(Number(pres1))) { pres1 = "-9999"; }
         arglist = arglist.concat("&pres1=");
         arglist = arglist.concat(pres1);
-
         var d2 = $("#data2").val();
         var model2 = d2.replace("/", "_");
         model2 = model2.toLowerCase();
-
         arglist = arglist.concat("&model2=");
         arglist = arglist.concat(model2);
-
-        // alert("arglist: " + arglist);
-
         var variable2 = $("#var2").val();
         arglist = arglist.concat("&var2=");
         arglist = arglist.concat(variable2);
-
-        // alert("arglist: " + arglist);
-
         var pres2 = $("#pres2").val();
         if (isNaN(Number(pres2))) { pres2 = "-9999"; }
         arglist = arglist.concat("&pres2=");
         arglist = arglist.concat(pres2);
-
         var laggedTime = $("#laggedTime").val();
         arglist = arglist.concat("&laggedTime=");
         arglist = arglist.concat(laggedTime);
-
         var t0 = $("#t0").val();
         var t1 = $("#t1").val();
-
         t0 = t0.replace("-", "");
         t1 = t1.replace("-", "");
-
         arglist = arglist.concat("&start_time=");
         arglist = arglist.concat(t0);
-
         arglist = arglist.concat("&end_time=");
         arglist = arglist.concat(t1);
-
-        // alert("arglist: " + arglist);
-
         var lon0 = $("#lon0").val();
         var lon1 = $("#lon1").val();
         var lat0 = $("#lat0").val();
         var lat1 = $("#lat1").val();
-
         arglist = arglist.concat("&lon1=");
         arglist = arglist.concat(lon0);
-
         arglist = arglist.concat("&lon2=");
         arglist = arglist.concat(lon1);
-
         arglist = arglist.concat("&lat1=");
         arglist = arglist.concat(lat0);
-
         arglist = arglist.concat("&lat2=");
         arglist = arglist.concat(lat1);
-
-        // alert("arglist: " + arglist);
-
         var purpose = $("#purpose").val();
         arglist = arglist.concat("&purpose=");
         arglist = arglist.concat(purpose);
-
-        // url = url + encodeURIComponent(arglist);
         url = url + encodeURI(arglist);
-        // url = url + arglist;
-        // alert("url: " + url);
-
-        var urlTimeBounds = "http://" + window.location.hostname + ":9002/svc/two_time_bounds?";
+        var urlTimeBounds = "http:
         var arglistTB = "";
         arglistTB = arglistTB.concat("serviceType=");
         arglistTB = arglistTB.concat("2");
@@ -504,7 +396,6 @@
         arglistTB = arglistTB.concat("&var2=");
         arglistTB = arglistTB.concat(variable2);
         urlTimeBounds = urlTimeBounds + encodeURI(arglistTB);
-
         $.ajax({
             type: "GET",
             url: urlTimeBounds,
@@ -512,9 +403,7 @@
             data: null,
             success: function(data, textStatus, xhr) {
                 Response = data;
-                // alert("data: " + data);
                 if (data.success == false) {
-                    // alert(data.error);
                     Response = null;
                     var text = JSON.stringify(data, null, 4);
                     text = "Error in backend: <br>" + text; 
@@ -523,82 +412,57 @@
                     return;
                 }
                 var text = JSON.stringify(data, null, 4);
-                // alert("text: " + text);
-                // $("#Response").html("<pre>"+text+"</pre>");
-                // $("#Response").html(text);
-
                 var tb1 = data.time_bounds1;
                 var bds1 = String(tb1).split(",");
-                // alert("tb1: " + tb1);
-                // alert("bds1: " + bds1);
                 var lowerT1 = parseInt(bds1[0]);
-                // alert("inside ajax, lowerT1: " + lowerT1);
                 var upperT1 = parseInt(bds1[1]);
-                // alert("upperT1: " + upperT1);
-
                 var tb2 = data.time_bounds2;
                 var bds2 = String(tb2).split(",");
-                // alert("tb2: " + tb2);
-                // alert("bds2: " + bds2);
                 var lowerT2 = parseInt(bds2[0]);
-                // alert("inside ajax, lowerT2: " + lowerT2);
                 var upperT2 = parseInt(bds2[1]);
-                // alert("upperT2: " + upperT2);
-
                 var t0I = parseInt(t0);
                 var t1I = parseInt(t1);
-                // alert("t0: " + t0I);
-                // alert("t1: " + t1I);
-
                 var lowerT, upperT;
-                // compute the intersection of the two data bounds
-                if (lowerT1 == 0  || upperT1 == 0){ // no data-1
+                if (lowerT1 == 0  || upperT1 == 0){ 
                   alert("We do not have data for the data-1 source and variable configuration.");
                   alert(urlTimeBounds);
                   return;
                 }
-                else if (lowerT2 == 0  || upperT2 == 0){ // no data-2
+                else if (lowerT2 == 0  || upperT2 == 0){ 
                   alert("We do not have data for the data-2 source and variable configuration.");
                   return;
                 }
-                else if (lowerT2 > upperT1 || lowerT1 > upperT2) { // no intersection
+                else if (lowerT2 > upperT1 || lowerT1 > upperT2) { 
                   alert("The two data sets/vars do not have a common time range.");
                   return;
                 }
-                else { // compute intersection
-                  if (lowerT1 > lowerT2) { // pick bigger lower time bound
+                else { 
+                  if (lowerT1 > lowerT2) { 
                     lowerT = lowerT1;
                   }
                   else {
                     lowerT = lowerT2;
                   }
-
-                  if (upperT1 > upperT2) { // pick smaller upper time bound
+                  if (upperT1 > upperT2) { 
                     upperT = upperT2;
                   }
                   else {
                     upperT = upperT1;
                   }
                 }
-                // alert("lowerT: " + lowerT);
-                // alert("upperT: " + upperT);
-
                 if (t0I < lowerT && t1I < lowerT ||
                     t0I > upperT && t1I > upperT) {
                   alert("We do not have data that span your time range. Try the range inside ["+lowerT+", "+upperT+"].");
                   return;
                 }
-
                 if (t0I < lowerT && t1I <= upperT) {
                   alert("Your start year-month is out of bound. It has to be in or later than " + lowerT +
                         ". We will use the range ["+lowerT+", "+t1I+"] for you.");
                 }
-
                 if (t1I > upperT && t0I >= lowerT) {
                   alert("Your end year-month is out of bound. It has to be in or earlier than " + upperT +
                         ". We will use the range ["+t0I+", "+upperT+"] for you.");
                 }
-
                 if (t0I < lowerT && t1I > upperT ) {
                   alert("Both of your start and end year-months are out of bounds. They have to be in or earlier than " + upperT +
                         ", and in or later than " + lowerT + ". We will use the range ["+lowerT+", "+upperT+"] for you.");
@@ -607,15 +471,10 @@
             error: function(xhr, textStatus, errorThrown) {
 		$("#Response").html("error!");
 		$("#data_url").html("error!");
-                // alert("xhr.status: "+xhr.status);
-                // alert("error status: "+textStatus);
             },
             complete: function(xhr, textStatus) {
-                //alert("complete status: "+textStatus);
             }
         });
-
-
         $.ajax({
             type: "GET",
             url: url,
@@ -623,51 +482,34 @@
             data: null,
             success: function(data, textStatus, xhr) {
                 Response = data;
-                // alert("data: " + data);
-                // alert(url);
                 if (data.success == false) {
-                    // alert(data.error);
                     Response = null;
                     var text = JSON.stringify(data, null, 4);
-
                     if (text.indexOf("No Data") != -1) {
                       $("#Image").html("No Data");
                       $("#Response").html("No Data");
                       $("#data_url").html("No Data");
                       return;
                     }
-
                     text = "Error in backend: <br>" + text; 
-                    // $("#Response").html("<span style='color:red'>" + text + "</span>");
                     $("#Response").html(text);
                     $("#data_url").html(text);
-
                     return;
                 }
                 var text = JSON.stringify(data, null, 4);
-                // alert(text);
-                // $("#Response").html("<pre>"+text+"</pre>");
                 $("#Response").html(text);
-
                 var html = "<img src='" + data.url + "?" + new Date().getTime() + "' width='820'/>";
-                // alert(html);
                 $("#Image").html(html);
-
-                // post dataUrl to textarea and enable download button
                 $("#data_url").html(data.dataUrl);
                 enable_download_button();
             },
             error: function(xhr, textStatus, errorThrown) {
                 $("#Response").html("error!");
                 $("#data_url").html("error!");
-                // alert("xhr.status: "+xhr.status);
-                // alert("error status: "+textStatus);
             },
             complete: function(xhr, textStatus) {
-                //alert("complete status: "+textStatus);
             }
         });
-
       });
     });
   </script>
@@ -689,138 +531,115 @@
 <div id="executionPurpose" style="display: none;">@parameters.getExecutionPurpose()</div>
 <div id="dataURL" style="display: none;">@parameters.getDataURL()</div>
 <div id="serviceResponseText" style="display: none;">@parameters.getServiceResponseText()</div>
-
-
 <table border="1">
-
-<tr>
-<td colspan="4">
-<center>
-<b>Service: Time-Lagged Correlation Map of Two Variables</b><br><br>
-This service generates a time-lagged correlation map between two specified variables. 
-<br>The two variables can be either a two-dimensional variable or a slice of a three-dimensional variable at a specific pressure level. <br><br>
-</center>
-</td>
-</tr>
-
-<tr>
-<td colspan="2">
-<center>
-data1[t-lag]
-</center>
-</td>
-
-<td colspan="2">
-<center>
-data2[t]
-</center>
-</td>
-</tr>
-
-<tr>
-<td>source:</td>
-<td><select name="data1", id="data1" onchange="put_var(1); select_var1(1)">
-</select></td>
-
-<td>source:</td>
-<td><select name="data2", id="data2" onchange="put_var(2); select_var1(2)">
-</select></td>
-
-</tr>
-
-<tr>
-
-<td>variable name:</td><td><select name="var1", id="var1" onchange="select_var1(1)">
-</select>
-</td>
-
-<td>variable name:</td><td><select name="var2", id="var2" onchange="select_var1(2)">
-</select>
-
-</td>
-
-</tr>
-
-<tr>
-
-<td>
-atmosphere pressure level (hPa) <br> or ocean pressure level (dbar)
-</td>
-<td>
-<input id="pres1" value="@parameters.getPressureLevel1()" alt="pressure"/>
-</td>
-
-<td>
-atmosphere pressure level (hPa) <br> or ocean pressure level (dbar)
-</td>
-<td>
-<input id="pres2" value="@parameters.getPressureLevel2()" alt="pressure"/>
-</td>
-
-</tr>
-
-<tr>
-</tr>
-
-<tr>
-<td id=startYear>start year-month:</td><td><input id="t0" value="@parameters.getStartYear()" alt="start"/></td>
-<td id=endYear>end year-month:</td><td><input id="t1" value="@parameters.getEndYear()" alt="end"/></td>
-</tr>
-
-
-<tr>
-<td>start lat (deg):</td><td><input id="lat0" value="@parameters.getStartLat()"/></td>
-<td>end lat (deg):</td><td><input id="lat1" value="@parameters.getEndLat()"/></td>
-</tr>
-
-<tr>
-<td>start lon (deg):</td><td><input id="lon0" value="@parameters.getStartLon()"/></td>
-<td>end lon (deg):</td><td><input id="lon1" value="@parameters.getEndLon()"/></td>
-</tr>
-
-<tr>  
-<td></td>
-<td colspan="2"><center>lag (month):<input id="laggedTime" value="@parameters.getLaggedTime()"/></center></td><td></td></tr>
-</tr>
-
-<tr>
-<td colspan="1">
-Execution purpose
-</td>
-<td colspan="3">
-<form>
-<textarea name="purpose" id="purpose" rows="4" cols="50">@parameters.getExecutionPurpose()</textarea>
-</form>
-</td>
-</tr>
-<tr>
-
-<tr>
-<td colspan="2" align="center"><input id="correlationMap" type="submit" value="            Run Again            " style="height:28px"/></td>
-<form>
-<td colspan="2" align="center"><input id="download_data" type="button" value="Download Data" style="height:28px"/>
-</td>
-</form>
-
-</tr>
-
-<tr>
-<td colspan="4">
-<div id="Image"><img src="@parameters.getImage()" width=680 /></div>
-</td>
-</tr>
-
-<tr>
-<td colspan="4" align="center">
-<textarea readonly id="data_url" cols="130" rows="2">@parameters.getDataURL()</textarea>
-</td>
-</tr>
-
-<tr>
-<td colspan="4" align="center">
-<textarea id="Response" cols="130" rows="6">@parameters.getServiceResponseText()</textarea>
-</td>
-</tr>
-
+	<tr>
+		<td colspan="4">
+			<center>
+				<b>Service: Time-Lagged Correlation Map of Two Variables</b><br>
+				<br> This service generates a time-lagged correlation map
+				between two specified variables. <br>The two variables can be
+				either a two-dimensional variable or a slice of a three-dimensional
+				variable at a specific pressure level. <br> <br>
+			</center>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="2">
+			<center>data1[t-lag]</center>
+		</td>
+		<td colspan="2">
+			<center>data2[t]</center>
+		</td>
+	</tr>
+	<tr>
+		<td>source:</td>
+		<td><select name="data1" , id="data1"
+			onchange="put_var(1); select_var1(1)">
+		</select></td>
+		<td>source:</td>
+		<td><select name="data2" , id="data2"
+			onchange="put_var(2); select_var1(2)">
+		</select></td>
+	</tr>
+	<tr>
+		<td>variable name:</td>
+		<td><select name="var1" , id="var1" onchange="select_var1(1)"></select></td>
+		<td>variable name:</td>
+		<td><select name="var2" , id="var2" onchange="select_var1(2)"></select></td>
+	</tr>
+	<tr>
+		<td>atmosphere pressure level (hPa) <br> or ocean pressure
+			level (dbar)
+		</td>
+		<td><input id="pres1" value="@parameters.getPressureLevel1()"
+			alt="pressure" /></td>
+		<td>atmosphere pressure level (hPa) <br> or ocean pressure
+			level (dbar)
+		</td>
+		<td><input id="pres2" value="@parameters.getPressureLevel2()"
+			alt="pressure" /></td>
+	</tr>
+	<tr>
+	</tr>
+	<tr>
+		<td id=startYear>start year-month:</td>
+		<td><input id="t0" value="@parameters.getStartYear()" alt="start" /></td>
+		<td id=endYear>end year-month:</td>
+		<td><input id="t1" value="@parameters.getEndYear()" alt="end" /></td>
+	</tr>
+	<tr>
+		<td>start lat (deg):</td>
+		<td><input id="lat0" value="@parameters.getStartLat()" /></td>
+		<td>end lat (deg):</td>
+		<td><input id="lat1" value="@parameters.getEndLat()" /></td>
+	</tr>
+	<tr>
+		<td>start lon (deg):</td>
+		<td><input id="lon0" value="@parameters.getStartLon()" /></td>
+		<td>end lon (deg):</td>
+		<td><input id="lon1" value="@parameters.getEndLon()" /></td>
+	</tr>
+	<tr>
+		<td></td>
+		<td colspan="2"><center>
+				lag (month):<input id="laggedTime"
+					value="@parameters.getLaggedTime()" />
+			</center></td>
+		<td></td>
+	</tr>
+	</tr>
+	<tr>
+		<td colspan="1">Execution purpose</td>
+		<td colspan="3">
+			<form>
+				<textarea name="purpose" id="purpose" rows="4" cols="50">@parameters.getExecutionPurpose()</textarea>
+			</form>
+		</td>
+	</tr>
+	<tr>
+	<tr>
+		<td colspan="2" align="center"><input id="correlationMap"
+			type="submit" value="            Run Again            "
+			style="height: 28px" /></td>
+		<form>
+			<td colspan="2" align="center"><input id="download_data"
+				type="button" value="Download Data" style="height: 28px" /></td>
+		</form>
+	</tr>
+	<tr>
+		<td colspan="4">
+			<div id="Image">
+				<img src="@parameters.getImage()" width=680 />
+			</div>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="4" align="center"><textarea readonly id="data_url"
+				cols="130" rows="2">@parameters.getDataURL()</textarea></td>
+	</tr>
+	<tr>
+		<td colspan="4" align="center"><textarea id="Response" cols="130"
+				rows="6">@parameters.getServiceResponseText()</textarea></td>
+	</tr>
 </table>
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/f22b3e32/app/views/climate/regridAndDownload.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/regridAndDownload.scala.html b/app/views/climate/regridAndDownload.scala.html
index e14f746..32ab4d8 100644
--- a/app/views/climate/regridAndDownload.scala.html
+++ b/app/views/climate/regridAndDownload.scala.html
@@ -1,72 +1,52 @@
-@(parameters: metadata.RegridAndDownload) 
-@import helper._
-
+@(parameters: metadata.RegridAndDownload) @import helper._
 <link rel="stylesheet"
 	href='@routes.Assets.at("stylesheets/livefitler.css")'>
-
 @scripts = {
-
 <script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
 <script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
 <script type="text/javascript"
 	src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
+<script type="text/javascript" src="https:
+<script type="
+	text/javascript"
+	src='@routes.Assets.at("javascripts/json2.js")'></script>
 <script type="text/javascript"
-	src="https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js"></script>
+	src='@routes.Assets.at("jhtml/js/xmisc.js")'></script>
 <script type="text/javascript"
-	src='@routes.Assets.at("javascripts/json2.js")'></script>
-<script type="text/javascript" src='@routes.Assets.at("jhtml/js/xmisc.js")'></script>
-<script type="text/javascript" src='@routes.Assets.at("html/js2/varList.js")'></script>
-<script type="text/javascript" src='@routes.Assets.at("html/js2/dataList2.js")'></script>
-<script type="text/javascript" src='@routes.Assets.at("html/js2/common.js")'></script>
-
+	src='@routes.Assets.at("html/js2/varList.js")'></script>
+<script type="text/javascript"
+	src='@routes.Assets.at("html/js2/dataList2.js")'></script>
+<script type="text/javascript"
+	src='@routes.Assets.at("html/js2/common.js")'></script>
 <script type="text/javascript">
-
-    
     var Response = null;
     var variable = "";
- 
-    // called on load or reload
     window.onload = function() {
-
     	put_data(1);
     	changeDataSource();
         put_var(1);
         changeVariableName();
-      
       enable_download_button();
-
       $('#t0').val($('#startYearMonth').text());
       $('#t1').val($('#endYearMonth').text());
-      
       if($('#pressureLevel').text() == "-999999"){
       	disable_pres1(1);
       }else{
       	$('#pres1').val($('#pressureLevel').text());
       }
-
       $('#lat0').val($('#startLat').text());
       $('#lat1').val($('#endLat').text());
       $('#dlat').val($('#deltaLat').text());
-
       $('#lon0').val($('#startLon').text());
       $('#lon1').val($('#endLon').text());
       $('#dlon').val($('#deltaLon').text());
-
       $('#purpose').html($('#executionPurpose').text());
-      
-      
       $('#data_url').html($('#dataURL').text());
       $('#Response').html($('#serviceResponseText').text());
-      
     }
- 
-
-
  function changeDataSource() {
 	    var dataSource = $('#dataSource').text();
-	    //dataSource = "NASA_QuikSCAT";
 	    var x = document.getElementById("data1");
-	    // if(dataSource == "NASA_AIRS" ){
 	    if(dataSource == "gfdl_esm2g" ){
      		x.options[0].selected=true;
      	}
@@ -142,121 +122,31 @@
      	else if(dataSource == "ecmwf_interim" ){
      		x.options[24].selected=true;
      	}
-      // }
       }
-
 function changeVariableName(){
       var var_string = $('#variableName').text();
       var data_string = $('#dataSource').text();
       data_string = data_string.replace("_", "/").toUpperCase();
-      
-    
       var varList2 = dataList[data_string][1];  
       var x = document.getElementById("var1");
-      
       for (var i=0; i<varList2.length; i++) {
     	  var k = varList2[i];
-    	  
           if (k == var_string) {
           	x.options[i].selected=true;
           	break;
           }
       }
-      /*
-      if (var_string == "clt")
-   		x.options[1].selected=true;
-      else if (var_string == "ts")
-      	x.options[2].selected=true;
-      else if (var_string == "tos")
-      	x.options[3].selected=true;
-      else if (var_string == "pr")
-      	x.options[0].selected=true;
-      else if (var_string == "uas")
-      	x.options[4].selected=true;
-      else if (var_string == "vas")
-      	x.options[5].selected=true;
-      else if (var_string == "sfcWind")
-      	x.options[6].selected=true;
-      else if (var_string == "zos")
-      	x.options[7].selected=true;
-      else if (var_string == "lai")
-      	x.options[8].selected=true;
-      else if (var_string == "zl")
-      	x.options[9].selected=true;
-      else if (var_string == "zo")
-      	x.options[10].selected=true;
-      else if (var_string == "ohc700")
-      	x.options[11].selected=true;
-      else if (var_string == "ohc2000")
-      	x.options[12].selected=true;
-      else if (var_string == "rlds")
-      	x.options[13].selected=true;
-      else if (var_string == "rsds")
-      	x.options[14].selected=true;
-      else if (var_string == "rlus")
-      	x.options[15].selected=true;
-      else if (var_string == "rsus")
-      	x.options[16].selected=true;
-      else if (var_string == "rldscs")
-      	x.options[17].selected=true;
-      else if (var_string == "rsdscs")
-      	x.options[18].selected=true;
-      else if (var_string == "rsuscs")
-      	x.options[19].selected=true;
-      else if (var_string == "rsdt")
-      	x.options[20].selected=true;
-      
-      else if (var_string == "rlut")
-      	x.options[21].selected=true;
-      else if (var_string == "rsut")
-       	x.options[22].selected=true;
-      else if (var_string == "rlutcs")
-       	x.options[23].selected=true;
-      else if (var_string == "rsutcs")
-      	x.options[24].selected=true;     
-      else if (var_string == "ta")
-      	x.options[25].selected=true;
-      else if (var_string == "hus")
-      	x.options[26].selected=true;
-      else if (var_string == "cli")
-      	x.options[27].selected=true;
-      else if (var_string == "clw")
-      	x.options[28].selected=true;
-      else if (var_string == "ot")
-      	x.options[29].selected=true;
-      else if (var_string == "os")
-       	x.options[30].selected=true;
-      else if (var_string == "wap")
-       	x.options[31].selected=true;
-      else if (var_string == "hur")
-       	x.options[32].selected=true;
-      */
     }
-
-// function changePres() {
-//       // var dataSource = $('#data1').text();
-//       //dataSource = "NASA_QuikSCAT";
-//       var x = document.getElementById("pres1");
-//       x.value = "sss";
-//       // if(dataSource == "NASA_AIRS" ){
-//         // x.options[1].selected=true;
-//       // }
-//       }
-
 function disable_download_button()
     {
       var x=document.getElementById("download_data");
       x.disabled=true;
     }
-
-    // enable download data button
     function enable_download_button()
     {
       var x=document.getElementById("download_data");
       x.disabled=false;
     }
-
-    // disable pressure level box for 2D var
     function disable_pres1(ID)
     {
       var x;
@@ -264,19 +154,14 @@ function disable_download_button()
       x.value = "N/A";
       x.disabled=true;
     }
-
-    // enable pressure level box for 3D var
     function enable_pres1(ID)
     {
       var x;
       x=document.getElementById("pres"+ID);
-      //x.value = "500";
       x.disabled=false;
     }
-
     function put_data(ID){
       var list1=document.getElementById("data"+ID);
-
       for(var key in dataList) {
         if (key.slice(0,5)==="group") {
           var og = document.createElement("OPTGROUP");
@@ -287,13 +172,11 @@ function disable_download_button()
         }
       }
     }
-
     function put_var(ID) {
       var list1=document.getElementById("var"+ID);
       for (var i=list1.length-1; i>=0; i--) {
       list1.remove(i);
       }
-
       data_string =  document.getElementById("data"+ID).value;
       var varList2 = dataList[data_string][1];  
       for (var i=0; i<varList2.length; i++) {
@@ -301,90 +184,48 @@ function disable_download_button()
         list1.add(new Option(varList[k][0],k));
       }
     }
-
-    // 
     function select_var1(ID)
     {
       var var_string;
       var_string = $("#var"+ID).val();
-      
       variable = var_string;
-      // alert("var_string: " + var_string)
-
       if (varList[var_string][2]==3) {
         enable_pres1(ID);
       } else {
         disable_pres1(ID);
       }
-
-      //alert("variable1: " + var_string);
     }
-
     $(document).ready(function(){
-/*
-      $("a").click(function(event){
-        alert("As you can see, the link no longer took you to jquery.com");
-        event.preventDefault();
-      });
-*/
-
       $("#download_data").click(function(event) {
         var durl = $("#data_url").val();
-        // alert(durl);
         window.location.assign(durl);
       });
-
-
       $("#action1").click(function(event) {
-        // alert('****** inside scatterPlot2V()!');
         Response = null;
-
-        // no data to download yet
         disable_download_button();
-
         $("#Response").html("Calculating ...");
         $("#data_url").html("Calculating ...");
-
-        // sample url: http://cmacws.jpl.nasa.gov:8090/svc/scatterPlot2V?model1=ukmo_hadgem2-a&var1=ts&pres1=200&model2=ukmo_hadgem2-a&var2=clt&pres2=200&start_time=199001&end_time=199512&lon1=0&lon2=100&lat1=-29&lat2=29
-        // form url string
-        // var url = "http://cmacws.jpl.nasa.gov:8090/svc/scatterPlot2V?";
-        var url = "http://" + window.location.hostname + ":9002/svc/regridAndDownload?";
-        // alert("url: " + url);
-
+        var url = "http:
         var d1 = $("#data1").val();
         var model1 = d1.replace("/", "_");
         model1 = model1.toLowerCase();
-
         var arglist = "";
         arglist = arglist.concat("model=");
         arglist = arglist.concat(model1);
-
-        // alert("arglist: " + arglist);
-
         var v1 = $("#var1").val();
         arglist = arglist.concat("&var=");
         arglist = arglist.concat(v1);
-
-        // alert("arglist: " + arglist);
-
         var pres1 = $("#pres1").val();
         arglist = arglist.concat("&plev=");
         arglist = arglist.concat(pres1);
-
         var t0 = $("#t0").val();
         var t1 = $("#t1").val();
-
         t0 = t0.replace("-", "");
         t1 = t1.replace("-", "");
-
         arglist = arglist.concat("&start_time=");
         arglist = arglist.concat(t0);
-
         arglist = arglist.concat("&end_time=");
         arglist = arglist.concat(t1);
-
-        // alert("arglist: " + arglist);
-
         var lon0 = $("#lon0").val();
         var lon1 = $("#lon1").val();
         var dlon = $("#dlon").val();
@@ -392,35 +233,22 @@ function disable_download_button()
         var lat1 = $("#lat1").val();
         var dlat = $("#dlat").val();
         var purpose = $("#purpose").val();
-
         arglist = arglist.concat("&lon1=");
         arglist = arglist.concat(lon0);
-
         arglist = arglist.concat("&lon2=");
         arglist = arglist.concat(lon1);
-
         arglist = arglist.concat("&dlon=");
         arglist = arglist.concat(dlon);
-
         arglist = arglist.concat("&lat1=");
         arglist = arglist.concat(lat0);
-
         arglist = arglist.concat("&lat2=");
         arglist = arglist.concat(lat1);
-
         arglist = arglist.concat("&dlat=");
         arglist = arglist.concat(dlat);
-
         arglist = arglist.concat("&purpose=");
         arglist = arglist.concat(purpose);
-        // alert("arglist: " + arglist);
-
-        // url = url + encodeURIComponent(arglist);
         url = url + encodeURI(arglist);
-        // url = url + arglist;
-        // alert("url: " + url);
-
-        var urlTimeBounds = "http://" + window.location.hostname + ":9002/svc/time_bounds?"; 
+        var urlTimeBounds = "http:
         var arglistTB = "";
         arglistTB = arglistTB.concat("serviceType=");
         arglistTB = arglistTB.concat("1");
@@ -429,8 +257,6 @@ function disable_download_button()
         arglistTB = arglistTB.concat("&var=");
         arglistTB = arglistTB.concat(variable);
         urlTimeBounds = urlTimeBounds + encodeURI(arglistTB);
-        // alert("urlTimeBounds: " + urlTimeBounds);
-
         $.ajax({
             type: "GET",
             url: urlTimeBounds,
@@ -438,9 +264,7 @@ function disable_download_button()
             data: null,
             success: function(data, textStatus, xhr) {
                 Response = data;
-                // alert("data: " + data);
                 if (data.success == false) {
-                    // alert(data.error);
                     Response = null;
                     var text = JSON.stringify(data, null, 4);
                     text = "Error in backend: <br>" + text; 
@@ -449,44 +273,29 @@ function disable_download_button()
                     return;
                 }
                 var text = JSON.stringify(data, null, 4);
-                // alert("text: " + text);
-                // $("#Response").html("<pre>"+text+"</pre>");
-                // $("#Response").html(text);
-
                 var tb = data.time_bounds;
                 var bds = String(tb).split(",");
-                // alert("tb: " + tb);
-                // alert("bds: " + bds);
                 var lowerT = parseInt(bds[0]);
                 var upperT = parseInt(bds[1]);
-                // alert("lowerT: " + lowerT);
-                // alert("upperT: " + upperT);
                 var t0I = parseInt(t0);
                 var t1I = parseInt(t1);
-                // alert("t0: " + t0I);
-                // alert("t1: " + t1I);
-
                 if ( lowerT == 0 && upperT ==0 ) {
                   alert("We do not have data for this source and variable configuration.");
                   return;
                 }
-
                 if (t0I < lowerT && t1I < lowerT ||
                     t0I > upperT && t1I > upperT) {
                   alert("We do not have data that span your time range. Try the range inside ["+lowerT+", "+upperT+"].");
                   return;
                 }
-
                 if (t0I < lowerT && t1I <= upperT) {
                   alert("Your start year-month is out of bound. It has to be in or later than " + lowerT +
                         ". We will use the range ["+lowerT+", "+t1I+"] for you.");
                 }
-
                 if (t1I > upperT && t0I >= lowerT) {
                   alert("Your end year-month is out of bound. It has to be in or earlier than " + upperT +
                         ". We will use the range ["+t0I+", "+upperT+"] for you.");
                 }
-
                 if (t0I < lowerT && t1I > upperT ) {
                   alert("Both of your start and end year-months are out of bounds. They have to be in or earlier than " + upperT +
                         ", and in or later than " + lowerT + ". We will use the range ["+lowerT+", "+upperT+"] for you.");
@@ -495,14 +304,10 @@ function disable_download_button()
             error: function(xhr, textStatus, errorThrown) {
 		$("#Response").html("error!");
 		$("#data_url").html("error!");
-                // alert("xhr.status: "+xhr.status);
-                // alert("error status: "+textStatus);
             },
             complete: function(xhr, textStatus) {
-                //alert("complete status: "+textStatus);
             }
         });
-
         $.ajax({
             type: "GET",
             url: url,
@@ -510,49 +315,33 @@ function disable_download_button()
             data: null,
             success: function(data, textStatus, xhr) {
                 Response = data;
-                // alert("data: " + data);
                 if (data.success == false) {
-                    // alert(data.error);
                     Response = null;
                     var text = JSON.stringify(data, null, 4);
-
                     if (text.indexOf("No Data") != -1) {
                       $("#Response").html("No Data");
                       $("#data_url").html("No Data");
                       return;
                     }
-
                     text = "Error in backend: <br>" + text; 
-                    // $("#Response").html("<span style='color:red'>" + text + "</span>");
                     $("#Response").html(text);
                     $("#data_url").html(text);
-
                     return;
                 }
                 var text = JSON.stringify(data, null, 4);
-                // alert(text);
-                // $("#Response").html("<pre>"+text+"</pre>");
                 $("#Response").html(text);
-
-                // post dataUrl to textarea and enable download button
                 $("#data_url").html(data.dataUrl);
                 enable_download_button();
             },
             error: function(xhr, textStatus, errorThrown) {
                 $("#Response").html("error!");
                 $("#data_url").html("error!");
-                // alert("xhr.status: "+xhr.status);
-                // alert("error status: "+textStatus);
             },
             complete: function(xhr, textStatus) {
-                //alert("complete status: "+textStatus);
             }
         });
-
       });
-
     });
-    
   </script>
 } @main("Parameters of ConfId", scripts){ @flash_message()
 <p>
@@ -570,15 +359,7 @@ function disable_download_button()
 <div id="executionPurpose" style="display: none;">@parameters.getExecutionPurpose()</div>
 <div id="dataURL" style="display: none;">@parameters.getDataURL()</div>
 <div id="serviceResponseText" style="display: none;">@parameters.getServiceResponseText()</div>
-
 <table border="1" width="800" align="center">
-
-
-
-
-
-
-
 	<tr>
 		<td colspan="4">
 			<center>
@@ -589,25 +370,18 @@ function disable_download_button()
 			</center>
 		</td>
 	</tr>
-
 	<tr>
 		<td>data source:</td>
 		<td><select name="data1" id="data1" onchange="put_var(1)">
 		</select></td>
-
 		<td>variable name:</td>
 		<td><select name="var1" id="var1" onchange="select_var1(1)">
 		</select></td>
 	</tr>
-
 	<tr>
-		<td colspan=4>atmosphere pressure level (hPa), or ocean pressure level (dbar)
-			<!--
-			<input id=pres1 size=50>
-			--> 
-			<input list="plev1" id="pres1" size="50"
-			value="@parameters.getPressureLevel()"> 
-			<datalist id="plev1">
+		<td colspan=4>atmosphere pressure level (hPa), or ocean pressure
+			level (dbar) <input list="plev1" id="pres1" size="50"
+			value="@parameters.getPressureLevel()"> <datalist id="plev1">
 				<option value="100000,80000,50000,30000,20000,10000"></option>
 				<option value="100000,30000,10000"></option>
 				<option value="100000,10000"></option>
@@ -615,16 +389,13 @@ function disable_download_button()
 			</datalist>
 		</td>
 	</tr>
-
 	<tr>
 		<td>start year-month: <input id="t0"
-			value="@parameters.getStartYearMonth()" alt="start" size="10"/></td>
+			value="@parameters.getStartYearMonth()" alt="start" size="10" /></td>
 		<td>end year-month: <input id="t1"
-			value="@parameters.getEndYearMonth()" alt="end" size="10"/></td>
+			value="@parameters.getEndYearMonth()" alt="end" size="10" /></td>
 		<td colspan=2></td>
 	</tr>
-
-
 	<tr>
 		<td width="25%">start lat (deg): <input size=5 id="lat0"
 			value="@parameters.getStartLat()" /></td>
@@ -634,7 +405,6 @@ function disable_download_button()
 			value="@parameters.getDeltaLat()" /></td>
 		<td></td>
 	</tr>
-
 	<tr>
 		<td width="25%">start lon (deg): <input size=5 id="lon0"
 			value="@parameters.getStartLon()" /></td>
@@ -659,18 +429,14 @@ function disable_download_button()
 			<td colspan="2" align="center"><input id="download_data"
 				type="button" value="Download Data" style="height: 28px" /></td>
 		</form>
-
 	</tr>
-
 	<tr>
 		<td colspan="4" align="center"><textarea readonly id="data_url"
 				cols="130" rows="2">@parameters.getDataURL()</textarea></td>
 	</tr>
-
 	<tr>
 		<td colspan="4" align="center"><textarea id="Response" cols="130"
 				rows="6">@parameters.getServiceResponseText()</textarea></td>
 	</tr>
-
 </table>
 }



[25/50] [abbrv] incubator-cmda git commit: Merge branch 'master' of https://github.com/cmusv-sc/ApacheCMDA-Frontend

Posted by xi...@apache.org.
Merge branch 'master' of https://github.com/cmusv-sc/ApacheCMDA-Frontend


Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/b4a4455c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/b4a4455c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/b4a4455c

Branch: refs/heads/master
Commit: b4a4455c61a42f441c9e5a71f3c4df7219145063
Parents: d61616a a88e332
Author: cat1021 <lo...@gmail.com>
Authored: Thu Sep 3 17:04:15 2015 -0700
Committer: cat1021 <lo...@gmail.com>
Committed: Thu Sep 3 17:04:15 2015 -0700

----------------------------------------------------------------------
 app/controllers/ClimateServiceController.java   |    2 +-
 ...rencePlotTwoTimeAveragedVariables.scala.html | 1357 ------------------
 .../climate/TwoDVariableZonelMean.scala.html    |   15 +-
 ...rencePlotTwoTimeAveragedVariables.scala.html | 1357 ++++++++++++++++++
 .../climate/threeDVariableTwoDSlice.scala.html  |   15 +-
 .../climate/threeDVariableZonalMean.scala.html  |   15 +-
 app/views/climate/twoDVariableMap.scala.html    |   12 +-
 .../climate/twoDVariableTimeSeries.scala.html   |   26 +-
 8 files changed, 1406 insertions(+), 1393 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/b4a4455c/app/views/climate/differencePlotTwoTimeAveragedVariables.scala.html
----------------------------------------------------------------------
diff --cc app/views/climate/differencePlotTwoTimeAveragedVariables.scala.html
index 0000000,0a64039..07a327d
mode 000000,100644..100644
--- a/app/views/climate/differencePlotTwoTimeAveragedVariables.scala.html
+++ b/app/views/climate/differencePlotTwoTimeAveragedVariables.scala.html
@@@ -1,0 -1,1357 +1,1357 @@@
+ @(parameters: metadata.DiffPlotTwoTimeAveragedVar) @import helper._
+ <link rel="stylesheet"
+ 	href='@routes.Assets.at("stylesheets/livefitler.css")'>
+ @scripts = {
+ <script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
+ <script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
+ <script type="text/javascript"
+ 	src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
 -<script type="text/javascript" src="https:
++<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js"></script>
+ 	<script type="
+ 	text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
+ <script type="text/javascript"
+ 	src='@routes.Assets.at("javascripts/xmisc.js")'></script>
+ <script type="text/javascript">
+ 	var Response = null;
+     var variable1 = "";
+     var variable2 = "";
+     window.onload = function() {
+ 	    changeDataSource();
+ 	    select_data1(1);
+ 	    changeDataSource1();
+ 	    select_data1(2);
+ 	    changeVariableName();
+ 	    select_var1(1);
+ 	    changeVariableName1();
+ 	    select_var1(2);
+ 	    var imageUrl = $('#image').text();
+ 	    $('#purpose').html($('#executionPurpose').text());
+ 	    $('#Image').html('<img src="'+imageUrl+'" width=680 />');
+ 	    $('#data_url').html($('#dataURL').text());
+ 	    $('#Response').html($('serviceResponseText').text());
+     }
+     function changeVariableName1(){
+ 	    var var_string = $('#variableName2').text();
+ 	    var x=document.getElementById("var2");
+ 	    if (var_string == "clt")
+ 	    x.options[1].selected=true;
+ 	    else if (var_string == "ts")
+ 	    x.options[2].selected=true;
+ 	    else if (var_string == "tos")
+ 	    x.options[3].selected=true;
+ 	    else if (var_string == "pr")
+ 	    x.options[0].selected=true;
+ 	    else if (var_string == "uas")
+ 	    x.options[4].selected=true;
+ 	    else if (var_string == "vas")
+ 	    x.options[5].selected=true;
+ 	    else if (var_string == "sfcWind")
+ 	    x.options[6].selected=true;
+ 	    else if (var_string == "zos")
+ 	    x.options[7].selected=true;
+ 	    else if (var_string == "lai")
+ 	    x.options[8].selected=true;
+ 	    else if (var_string == "zl")
+ 	    x.options[9].selected=true;
+ 	    else if (var_string == "zo")
+ 	    x.options[10].selected=true;
+ 	    else if (var_string == "ohc700")
+ 	    x.options[11].selected=true;
+ 	    else if (var_string == "ohc2000")
+ 	    x.options[12].selected=true;
+ 	    else if (var_string == "rlds")
+ 	    x.options[13].selected=true;
+ 	    else if (var_string == "rsds")
+ 	    x.options[14].selected=true;
+ 	    else if (var_string == "rlus")
+ 	    x.options[15].selected=true;
+ 	    else if (var_string == "rsus")
+ 	    x.options[16].selected=true;
+ 	    else if (var_string == "rldscs")
+ 	    x.options[17].selected=true;
+ 	    else if (var_string == "rsdscs")
+ 	    x.options[18].selected=true;
+ 	    else if (var_string == "rsuscs")
+ 	    x.options[19].selected=true;
+ 	    else if (var_string == "rsdt")
+ 	    x.options[20].selected=true;
+ 	    else if (var_string == "rlutcs")
+ 	    x.options[21].selected=true;
+ 	    else if (var_string == "rlut")
+ 	    x.options[22].selected=true;
+ 	    else if (var_string == "rsutcs")
+ 	    x.options[23].selected=true;
+ 	    else if (var_string == "rsut")
+ 	    x.options[24].selected=true;
+ 	}
+     function changeVariableName(){
+ 	    var var_string = $('#variableName1').text();
+ 	    var x=document.getElementById("var1");
+ 	    if (var_string == "clt")
+ 	    x.options[1].selected=true;
+ 	    else if (var_string == "ts")
+ 	    x.options[2].selected=true;
+ 	    else if (var_string == "tos")
+ 	    x.options[3].selected=true;
+ 	    else if (var_string == "pr")
+ 	    x.options[0].selected=true;
+ 	    else if (var_string == "uas")
+ 	    x.options[4].selected=true;
+ 	    else if (var_string == "vas")
+ 	    x.options[5].selected=true;
+ 	    else if (var_string == "sfcWind")
+ 	    x.options[6].selected=true;
+ 	    else if (var_string == "zos")
+ 	    x.options[7].selected=true;
+ 	    else if (var_string == "lai")
+ 	    x.options[8].selected=true;
+ 	    else if (var_string == "zl")
+ 	    x.options[9].selected=true;
+ 	    else if (var_string == "zo")
+ 	    x.options[10].selected=true;
+ 	    else if (var_string == "ohc700")
+ 	    x.options[11].selected=true;
+ 	    else if (var_string == "ohc2000")
+ 	    x.options[12].selected=true;
+ 	    else if (var_string == "rlds")
+ 	    x.options[13].selected=true;
+ 	    else if (var_string == "rsds")
+ 	    x.options[14].selected=true;
+ 	    else if (var_string == "rlus")
+ 	    x.options[15].selected=true;
+ 	    else if (var_string == "rsus")
+ 	    x.options[16].selected=true;
+ 	    else if (var_string == "rldscs")
+ 	    x.options[17].selected=true;
+ 	    else if (var_string == "rsdscs")
+ 	    x.options[18].selected=true;
+ 	    else if (var_string == "rsuscs")
+ 	    x.options[19].selected=true;
+ 	    else if (var_string == "rsdt")
+ 	    x.options[20].selected=true;
+ 	    else if (var_string == "rlutcs")
+ 	    x.options[21].selected=true;
+ 	    else if (var_string == "rlut")
+ 	    x.options[22].selected=true;
+ 	    else if (var_string == "rsutcs")
+ 	    x.options[23].selected=true;
+ 	    else if (var_string == "rsut")
+ 	    x.options[24].selected=true;
+     }
+     function changeDataSource1(){
+ 	    var dataSource = $('#source2').text();
+ 	    dataSource = dataSource.toUpperCase();
+ 	    var x = document.getElementById("data2");
+ 	    if(dataSource == "NASA_MODIS" ){
+ 	    x.options[13].selected=true;
+ 	    }
+ 	    else if(dataSource == "NASA_AMSRE" ){
+ 	    x.options[14].selected=true;
+ 	    }
+ 	    else if(dataSource == "NASA_TRMM" ){
+ 	    x.options[15].selected=true;
+ 	    }
+ 	    else if(dataSource == "NASA_GPCP" ){
+ 	    x.options[16].selected=true;
+ 	    }
+ 	    else if(dataSource == "NASA_QUIKSCAT" ){
+ 	    x.options[17].selected=true;
+ 	    }
+ 	    else if(dataSource == "NASA_AVISO" ){
+ 	    x.options[18].selected=true;
+ 	    }
+ 	    else if(dataSource == "NASA_GRACE" ){
+ 	    x.options[19].selected=true;
+ 	    }
+ 	    else if(dataSource == "NOAA_NODC" ){
+ 	    x.options[20].selected=true;
+ 	    }
+ 	    else if(dataSource == "NASA_CERES" ){
+ 	    x.options[21].selected=true;
+ 	    }
+ 	    else if(dataSource == "NASA_AIRS" ){
+ 	    x.options[22].selected=true;
+ 	    }
+ 	    else if(dataSource == "NASA_MLS" ){
+ 	    x.options[23].selected=true;
+ 	    }
+ 	    else if(dataSource == "NASA_ARGO" ){
+ 	    x.options[24].selected=true;
+ 	    }
+ 	    else if(dataSource == "CCCMA_CANESM2" ){
+ 	    x.options[0].selected=true;
+ 	    }
+ 	    else if(dataSource == "GFDL_ESM2G" ){
+ 	    x.options[1].selected=true;
+ 	    }
+ 	    else if(dataSource == "GISS_E2-H" ){
+ 	    x.options[2].selected=true;
+ 	    }
+ 	    else if(dataSource == "GISS_E2-R" ){
+ 	    x.options[3].selected=true;
+ 	    }
+ 	    else if(dataSource == "NCAR_CAM5" ){
+ 	    x.options[4].selected=true;
+ 	    }
+ 	    else if(dataSource == "NCC_NORESM" ){
+ 	    x.options[5].selected=true;
+ 	    }
+ 	    else if(dataSource == "UKMO_HADGEM2-ES" ){
+ 	    x.options[6].selected=true;
+ 	    }
+ 	    else if(dataSource == "CCCMA_CANAM4" ){
+ 	    x.options[7].selected=true;
+ 	    }
+ 	    else if(dataSource == "CSIRO_MK3.6" ){
+ 	    x.options[8].selected=true;
+ 	    }
+ 	    else if(dataSource == "GFDL_CM3" ){
+ 	    x.options[9].selected=true;
+ 	    }
+ 	    else if(dataSource == "IPSL_CM5A-LR" ){
+ 	    x.options[10].selected=true;
+ 	    }
+ 	    else if(dataSource == "MIROC_MIROC5" ){
+ 	    x.options[11].selected=true;
+ 	    }
+ 	    else if(dataSource == "UKMO_HADGEM2-A" ){
+ 	    x.options[12].selected=true;
+ 	    }
+ 	    else if(dataSource == "ECMWF_INTERIM" ){
+ 	    x.options[25].selected=true;
+ 	    }
+     }
+     function changeDataSource(){
+ 	    var dataSource = $('#source1').text();
+ 	    dataSource = dataSource.toUpperCase();
+ 	    var x = document.getElementById("data1");
+ 	    if(dataSource == "NASA_MODIS" ){
+ 	    x.options[13].selected=true;
+ 	    }
+ 	    else if(dataSource == "NASA_AMSRE" ){
+ 	    x.options[14].selected=true;
+ 	    }
+ 	    else if(dataSource == "NASA_TRMM" ){
+ 	    x.options[15].selected=true;
+ 	    }
+ 	    else if(dataSource == "NASA_GPCP" ){
+ 	    x.options[16].selected=true;
+ 	    }
+ 	    else if(dataSource == "NASA_QUIKSCAT" ){
+ 	    x.options[17].selected=true;
+ 	    }
+ 	    else if(dataSource == "NASA_AVISO" ){
+ 	    x.options[18].selected=true;
+ 	    }
+ 	    else if(dataSource == "NASA_GRACE" ){
+ 	    x.options[19].selected=true;
+ 	    }
+ 	    else if(dataSource == "NOAA_NODC" ){
+ 	    x.options[20].selected=true;
+ 	    }
+ 	    else if(dataSource == "NASA_CERES" ){
+ 	    x.options[21].selected=true;
+ 	    }
+ 	    else if(dataSource == "NASA_AIRS" ){
+ 	    x.options[22].selected=true;
+ 	    }
+ 	    else if(dataSource == "NASA_MLS" ){
+ 	    x.options[23].selected=true;
+ 	    }
+ 	    else if(dataSource == "NASA_ARGO" ){
+ 	    x.options[24].selected=true;
+ 	    }
+ 	    else if(dataSource == "CCCMA_CANESM2" ){
+ 	    x.options[0].selected=true;
+ 	    }
+ 	    else if(dataSource == "GFDL_ESM2G" ){
+ 	    x.options[1].selected=true;
+ 	    }
+ 	    else if(dataSource == "GISS_E2-H" ){
+ 	    x.options[2].selected=true;
+ 	    }
+ 	    else if(dataSource == "GISS_E2-R" ){
+ 	    x.options[3].selected=true;
+ 	    }
+ 	    else if(dataSource == "NCAR_CAM5" ){
+ 	    x.options[4].selected=true;
+ 	    }
+ 	    else if(dataSource == "NCC_NORESM" ){
+ 	    x.options[5].selected=true;
+ 	    }
+ 	    else if(dataSource == "UKMO_HADGEM2-ES" ){
+ 	    x.options[6].selected=true;
+ 	    }
+ 	    else if(dataSource == "CCCMA_CANAM4" ){
+ 	    x.options[7].selected=true;
+ 	    }
+ 	    else if(dataSource == "CSIRO_MK3.6" ){
+ 	    x.options[8].selected=true;
+ 	    }
+ 	    else if(dataSource == "GFDL_CM3" ){
+ 	    x.options[9].selected=true;
+ 	    }
+ 	    else if(dataSource == "IPSL_CM5A-LR" ){
+ 	    x.options[10].selected=true;
+ 	    }
+ 	    else if(dataSource == "MIROC_MIROC5" ){
+ 	    x.options[11].selected=true;
+ 	    }
+ 	    else if(dataSource == "UKMO_HADGEM2-A" ){
+ 	    x.options[12].selected=true;
+ 	    }
+ 	    else if(dataSource == "ECMWF_INTERIM" ){
+ 	    x.options[25].selected=true;
+ 	    }
+     }
+     function enable_download_button()
+     {
+       var x=document.getElementById("download_data");
+       x.disabled=false;
+     }
+     function unset_vars1(ID)
+     {
+       var x;
+       if (ID == 1) {
+         x=document.getElementById("var1");
+       }
+       else if (ID == 2) {
+         x=document.getElementById("var2");
+       }
+       x.options[0].disabled=true;
+       x.options[1].disabled=true;
+       x.options[2].disabled=true;
+       x.options[3].disabled=true;
+       x.options[4].disabled=true;
+       x.options[5].disabled=true;
+       x.options[6].disabled=true;
+       x.options[7].disabled=true;
+       x.options[8].disabled=true;
+       x.options[9].disabled=true;
+       x.options[10].disabled=true;
+       x.options[11].disabled=true;
+       x.options[12].disabled=true;
+       x.options[13].disabled=true;
+       x.options[14].disabled=true;
+       x.options[15].disabled=true;
+       x.options[16].disabled=true;
+       x.options[17].disabled=true;
+       x.options[18].disabled=true;
+       x.options[19].disabled=true;
+       x.options[20].disabled=true;
+       x.options[21].disabled=true;
+       x.options[22].disabled=true;
+       x.options[23].disabled=true;
+       x.options[24].disabled=true;
+       x.options[25].disabled=true;
+       x.options[26].disabled=true;
+       x.options[27].disabled=true;
+       x.options[28].disabled=true;
+       x.options[29].disabled=true;
+       x.options[30].disabled=true;
+       x.options[31].disabled=true;
+       x.options[32].disabled=true;
+     }
+     function disable_pres1(ID)
+     {
+       var x;
+       if (ID == 1) {
+         x=document.getElementById("pres1");
+       }
+       else if (ID == 2) {
+         x=document.getElementById("pres2");
+       }
+       x.value = "N/A";
+       x.disabled=true;
+     }
+     function enable_pres1(ID)
+     {
+       var x;
+       if (ID == 1) {
+         x=document.getElementById("pres1");
+       }
+       else if (ID == 2) {
+         x=document.getElementById("pres2");
+       }
+       x.value = "500";
+       x.disabled=false;
+     }
+     function select_var1(ID)
+     {
+       var var_string;
+       if (ID == 1) {
+         var_string = $("#var1").val();
+       }
+       else if (ID == 2) {
+         var_string = $("#var2").val();
+     }
+     disable_download_button();  
+     if (var_string == "Total Cloud Fraction") { 
+       if (ID == 1) {
+         variable1 = "clt";  
+       }
+       else if (ID == 2) {
+         variable2 = "clt";  
+       }
+       disable_pres1(ID);
+     }
+      else if (var_string == "Surface Temperature") {
+        if (ID == 1) {
+          variable1 = "ts";  
+        }
+        else if (ID == 2) {
+          variable2 = "ts";  
+        }
+        disable_pres1(ID);
+      }
+      else if (var_string == "Sea Surface Temperature") { 
+        if (ID == 1) {
+          variable1 = "tos";  
+        }
+        else if (ID == 2) {
+          variable2 = "tos";  
+        }
+        disable_pres1(ID);
+      }
+      else if (var_string == "Precipitation Flux") { 
+        if (ID == 1) {
+          variable1 = "pr";  
+        }
+        else if (ID == 2) {
+          variable2 = "pr";  
+        }
+        disable_pres1(ID);
+      }
+      else if (var_string == "Eastward Near-Surface Wind") { 
+        if (ID == 1) {
+          variable1 = "uas";  
+        }
+        else if (ID == 2) {
+          variable2 = "uas";  
+        }
+        disable_pres1(ID);
+      }
+      else if (var_string == "Northward Near-Surface Wind") {  
+        if (ID == 1) {
+          variable1 = "vas";  
+        }
+        else if (ID == 2) {
+          variable2 = "vas";  
+        }
+        disable_pres1(ID);
+      }
+      else if (var_string == "Near-Surface Wind Speed") { 
+        if (ID == 1) {
+          variable1 = "sfcWind";  
+        }
+        else if (ID == 2) {
+          variable2 = "sfcWind";  
+        }
+        disable_pres1(ID);
+      }
+      else if (var_string == "Sea Surface Height") { 
+        if (ID == 1) {
+          variable1 = "zos";  
+        }
+        else if (ID == 2) {
+          variable2 = "zos";  
+        }
+        disable_pres1(ID);
+      }
+      else if (var_string == "Leaf Area Index") { 
+        if (ID == 1) {
+          variable1 = "lai";  
+        }
+        else if (ID == 2) {
+          variable2 = "lai";  
+        }
+        disable_pres1(ID);
+      }
+      else if (var_string == "Equivalent Water Height Over Land") {
+        if (ID == 1) {
+          variable1 = "zl";  
+        }
+        else if (ID == 2) {
+          variable2 = "zl";  
+        }
+        disable_pres1(ID);
+      }
+      else if (var_string == "Equivalent Water Height Over Ocean") {
+        if (ID == 1) {
+          variable1 = "zo";
+        }
+        else if (ID == 2) {
+          variable2 = "zo";
+        }
+        disable_pres1(ID);
+      }
+      else if (var_string == "Ocean Heat Content Anomaly within 700 m Depth") {
+        if (ID == 1) {
+          variable1 = "ohc700";
+        }
+        else if (ID == 2) {
+          variable2 = "ohc700";
+        }
+        disable_pres1(ID);
+      }
+      else if (var_string == "Ocean Heat Content Anomaly within 2000 m Depth") {
+        if (ID == 1) {
+          variable1 = "ohc2000";
+        }
+        else if (ID == 2) {
+          variable2 = "ohc2000";
+        }
+        disable_pres1(ID);
+      }
+      else if (var_string == "Surface Downwelling Longwave Radiation") {
+        if (ID == 1) {
+          variable1 = "rlds";
+        }
+        else if (ID == 2) {
+          variable2 = "rlds";
+        }
+        disable_pres1(ID);
+      }
+      else if (var_string == "Surface Downwelling Shortwave Radiation") {
+        if (ID == 1) {
+          variable1 = "rsds";
+        }
+        else if (ID == 2) {
+          variable2 = "rsds";
+        }
+        disable_pres1(ID);
+      }
+      else if (var_string == "Surface Upwelling Longwave Radiation") {
+        if (ID == 1) {
+          variable1 = "rlus";
+        }
+        else if (ID == 2) {
+          variable2 = "rlus";
+        }
+        disable_pres1(ID);
+      }
+      else if (var_string == "Surface Upwelling Shortwave Radiation") {
+        if (ID == 1) {
+          variable1 = "rsus";
+        }
+        else if (ID == 2) {
+          variable2 = "rsus";
+        }
+        disable_pres1(ID);
+      }
+      else if (var_string == "Surface Downwelling Clear-Sky Longwave Radiation") {
+        if (ID == 1) {
+          variable1 = "rldscs";
+        }
+        else if (ID == 2) {
+          variable2 = "rldscs";
+        }
+        disable_pres1(ID);
+      }
+      else if (var_string == "Surface Downwelling Clear-Sky Shortwave Radiation") {
+        if (ID == 1) {
+          variable1 = "rsdscs";
+        }
+        else if (ID == 2) {
+          variable2 = "rsdscs";
+        }
+        disable_pres1(ID);
+      }
+      else if (var_string == "Surface Upwelling Clear-Sky Shortwave Radiation") {
+        if (ID == 1) {
+          variable1 = "rsuscs";
+        }
+        else if (ID == 2) {
+          variable2 = "rsuscs";
+        }
+        disable_pres1(ID);
+      }
+      else if (var_string == "TOA Incident Shortwave Radiation") {
+        if (ID == 1) {
+          variable1 = "rsdt";
+        }
+        else if (ID == 2) {
+          variable2 = "rsdt";
+        }
+        disable_pres1(ID);
+      }
+      else if (var_string == "TOA Outgoing Clear-Sky Longwave Radiation") {
+        if (ID == 1) {
+          variable1 = "rlutcs";
+        }
+        else if (ID == 2) {
+          variable2 = "rlutcs";
+        }
+        disable_pres1(ID);
+      }
+      else if (var_string == "TOA Outgoing Longwave Radiation") {
+        if (ID == 1) {
+          variable1 = "rlut";
+        }
+        else if (ID == 2) {
+          variable2 = "rlut";
+        }
+        disable_pres1(ID);
+      }
+      else if (var_string == "TOA Outgoing Clear-Sky Shortwave Radiation") {
+        if (ID == 1) {
+          variable1 = "rsutcs";
+        }
+        else if (ID == 2) {
+          variable2 = "rsutcs";
+        }
+        disable_pres1(ID);
+      }
+      else if (var_string == "TOA Outgoing Shortwave Radiation") {
+        if (ID == 1) {
+          variable1 = "rsut";
+        }
+        else if (ID == 2) {
+          variable2 = "rsut";
+        }
+        disable_pres1(ID);
+      }
+      else if (var_string == "Air Temperature") {
+        if (ID == 1) {
+          variable1 = "ta";
+        }
+        else if (ID == 2) {
+          variable2 = "ta";
+        }
+        enable_pres1(ID);
+      }
+      else if (var_string == "Specific Humidity") {
+        if (ID == 1) {
+          variable1 = "hus";
+        }
+        else if (ID == 2) {
+          variable2 = "hus";
+        }
+        enable_pres1(ID);
+      }
+      else if (var_string == "Cloud Ice Water Content") {
+        if (ID == 1) {
+          variable1 = "cli";
+        }
+        else if (ID == 2) {
+          variable2 = "cli";
+        }
+        enable_pres1(ID);
+      }
+      else if (var_string == "Cloud Liquid Water Content") {
+        if (ID == 1) {
+          variable1 = "clw";
+        }
+        else if (ID == 2) {
+          variable2 = "clw";
+        }
+        enable_pres1(ID);
+      }
+      else if (var_string == "Ocean Temperature") {
+        if (ID == 1) {
+          variable1 = "ot";
+        }
+        else if (ID == 2) {
+          variable2 = "ot";
+        }
+        enable_pres1(ID);
+      }
+      else if (var_string == "Ocean Salinity") {
+        if (ID == 1) {
+          variable1 = "os";
+        }
+        else if (ID == 2) {
+          variable2 = "os";
+        }
+        enable_pres1(ID);
+      }
+      else if (var_string == "Vertical Wind Velocity") {
+        if (ID == 1) {
+          variable1 = "wap";
+        }
+        else if (ID == 2) {
+          variable2 = "wap";
+        }
+        enable_pres1(ID);
+      }
+      else if (var_string == "Relative Humidity") {
+        if (ID == 1) {
+          variable1 = "hur";
+        }
+        else if (ID == 2) {
+          variable2 = "hur";
+        }
+        enable_pres1(ID);
+      }
+     }
+     function select_data1(ID)
+     {
+       var data_string;
+       var x;
+       if (ID == 1) {
+         data_string = $("#data1").val();
+         x = document.getElementById("var1");
+       }
+       else if (ID == 2) {
+         data_string = $("#data2").val();
+         x = document.getElementById("var2");
+       }
+       disable_download_button();
+       if (data_string == "NASA/AMSRE") {
+         unset_vars1(ID); 
+         x.options[3].selected=true;
+         disable_pres1(ID); 
+         x.options[3].disabled=false;
+       }
+       else if (data_string == "NASA/MODIS") {
+         unset_vars1(ID);
+         x.options[1].selected=true;
+         disable_pres1(ID); 
+         x.options[1].disabled=false;
+         x.options[8].disabled=false;
+       }
+       else if (data_string == "NASA/TRMM") {
+         unset_vars1(ID);
+         x.options[0].selected=true;
+         disable_pres1(ID); 
+         x.options[0].disabled=false;
+       }
+       else if (data_string == "NASA/GPCP") {
+         unset_vars1(ID);
+         x.options[0].selected=true;
+         disable_pres1(ID); 
+         x.options[0].disabled=false;
+       }
+       else if (data_string == "NASA/QuikSCAT") {
+         unset_vars1(ID);
+         x.options[4].selected=true;
+         disable_pres1(ID); 
+         x.options[4].disabled=false;
+         x.options[5].disabled=false;
+         x.options[6].disabled=false;
+       }
+       else if (data_string == "NASA/AVISO") {
+         unset_vars1(ID);
+         x.options[7].selected=true;
+         disable_pres1(ID); 
+         x.options[7].disabled=false;
+       }
+       else if (data_string == "NASA/GRACE") {
+         unset_vars1(ID);
+         x.options[9].selected=true;
+         disable_pres1(ID); 
+         x.options[9].disabled=false;
+         x.options[10].disabled=false;
+       }
+       else if (data_string == "NOAA/NODC") {
+         unset_vars1(ID);
+         x.options[11].selected=true;
+         disable_pres1(ID); 
+         x.options[11].disabled=false;
+         x.options[12].disabled=false;
+       }
+       else if (data_string == "NASA/CERES") {
+         unset_vars1(ID);
+         x.options[13].selected=true;
+         disable_pres1(ID); 
+         x.options[13].disabled=false;
+         x.options[14].disabled=false;
+         x.options[15].disabled=false;
+         x.options[16].disabled=false;
+         x.options[17].disabled=false;
+         x.options[18].disabled=false;
+         x.options[19].disabled=false;
+         x.options[20].disabled=false;
+         x.options[21].disabled=false;
+         x.options[22].disabled=false;
+         x.options[23].disabled=false;
+         x.options[24].disabled=false;
+       }
+       else if (data_string == "NASA/AIRS") {
+         unset_vars1(ID);
+         x.options[25].selected=true;
+         enable_pres1(ID); 
+         x.options[25].disabled=false;
+         x.options[26].disabled=false;
+       }
+       else if (data_string == "NASA/MLS") {
+         unset_vars1(ID);
+         x.options[25].selected=true;
+         enable_pres1(ID); 
+         x.options[25].disabled=false;
+         x.options[26].disabled=false;
+       }
+       else if (data_string == "ARGO/ARGO") {
+         unset_vars1(ID);
+         x.options[29].selected=true;
+         enable_pres1(ID); 
+         x.options[29].disabled=false;
+         x.options[30].disabled=false;
+       }
+       else if (data_string == "CCCMA/CANAM4") {
+         unset_vars1(ID);
+         x.options[0].selected=true;
+         disable_pres1(ID); 
+         x.options[0].disabled=false;
+         x.options[1].disabled=false;
+         x.options[2].disabled=false;
+         x.options[4].disabled=false;
+         x.options[5].disabled=false;
+         x.options[6].disabled=false;
+         x.options[13].disabled=false;
+         x.options[14].disabled=false;
+         x.options[15].disabled=false;
+         x.options[16].disabled=false;
+         x.options[17].disabled=false;
+         x.options[18].disabled=false;
+         x.options[19].disabled=false;
+         x.options[20].disabled=false;
+         x.options[21].disabled=false;
+         x.options[22].disabled=false;
+         x.options[23].disabled=false;
+         x.options[24].disabled=false;
+         x.options[25].disabled=false;
+         x.options[26].disabled=false;
+         x.options[27].disabled=false;
+         x.options[28].disabled=false;
+       }
+       else if (data_string == "CSIRO/MK3.6") {
+         unset_vars1(ID);
+         x.options[0].selected=true;
+         disable_pres1(ID); 
+         x.options[0].disabled=false;
+         x.options[1].disabled=false;
+         x.options[2].disabled=false;
+         x.options[4].disabled=false;
+         x.options[5].disabled=false;
+         x.options[6].disabled=false;
+         x.options[13].disabled=false;
+         x.options[14].disabled=false;
+         x.options[15].disabled=false;
+         x.options[16].disabled=false;
+         x.options[17].disabled=false;
+         x.options[18].disabled=false;
+         x.options[19].disabled=false;
+         x.options[20].disabled=false;
+         x.options[21].disabled=false;
+         x.options[22].disabled=false;
+         x.options[23].disabled=false;
+         x.options[24].disabled=false;
+         x.options[25].disabled=false;
+         x.options[26].disabled=false;
+         x.options[27].disabled=false;
+         x.options[28].disabled=false;
+         x.options[31].disabled=false;
+         x.options[32].disabled=false;
+       }
+       else if (data_string == "NCAR/CAM5") {
+         unset_vars1(ID);
+         x.options[0].selected=true;
+         disable_pres1(ID); 
+         x.options[0].disabled=false;
+         x.options[1].disabled=false;
+         x.options[2].disabled=false;
+         x.options[3].disabled=false;
+         x.options[4].disabled=false;
+         x.options[5].disabled=false;
+         x.options[6].disabled=false;
+         x.options[7].disabled=false;
+         x.options[8].disabled=false;
+         x.options[14].disabled=false;
+         x.options[15].disabled=false;
+         x.options[16].disabled=false;
+         x.options[17].disabled=false;
+         x.options[18].disabled=false;
+         x.options[19].disabled=false;
+         x.options[20].disabled=false;
+         x.options[21].disabled=false;
+         x.options[22].disabled=false;
+         x.options[23].disabled=false;
+         x.options[24].disabled=false;
+         x.options[25].disabled=false;
+         x.options[26].disabled=false;
+         x.options[27].disabled=false;
+         x.options[28].disabled=false;
+         x.options[31].disabled=false;
+         x.options[32].disabled=false;
+       }
+       else if (data_string == "CCCMA/CANESM2" || data_string == "GFDL/ESM2G" ||
+                data_string == "GISS/E2-H" || data_string == "GISS/E2-R" ||
+                data_string == "NCC/NORESM" ||
+                data_string == "UKMO/HadGEM2-ES" ||
+                data_string == "GFDL/CM3" || data_string == "IPSL/CM5A-LR" ||
+                data_string == "MIROC/MIROC5" || data_string == "UKMO/HadGEM2-A"
+               ) {
+         unset_vars1(ID);
+         x.options[0].selected=true;
+         disable_pres1(ID); 
+         x.options[0].disabled=false;
+         x.options[1].disabled=false;
+         x.options[2].disabled=false;
+         x.options[3].disabled=false;
+         x.options[4].disabled=false;
+         x.options[5].disabled=false;
+         x.options[6].disabled=false;
+         x.options[7].disabled=false;
+         x.options[8].disabled=false;
+         x.options[13].disabled=false;
+         x.options[14].disabled=false;
+         x.options[15].disabled=false;
+         x.options[16].disabled=false;
+         x.options[17].disabled=false;
+         x.options[18].disabled=false;
+         x.options[19].disabled=false;
+         x.options[20].disabled=false;
+         x.options[21].disabled=false;
+         x.options[22].disabled=false;
+         x.options[23].disabled=false;
+         x.options[24].disabled=false;
+         x.options[25].disabled=false;
+         x.options[26].disabled=false;
+         x.options[27].disabled=false;
+         x.options[28].disabled=false;
+         x.options[31].disabled=false;
+         x.options[32].disabled=false;
+       }
+       else if (data_string == "ECMWF/interim") {
+         unset_vars1(ID);
+         x.options[3].selected=true;
+         disable_pres1(ID); 
+         x.options[3].disabled=false;
+         x.options[31].disabled=false;
+         x.options[32].disabled=false;
+       }
+       select_var1(ID);
+     }
+     $(document).ready(function(){
+     $("#download_data").click(function(event) {
+       var durl = $("#data_url").val();
+       window.location.assign(durl);
+     });
+       $("#scatterPlot2V").click(function(event) {
+         Response = null;
+         disable_download_button();
+         $("#Response").html("Calculating ...");
+         $("#data_url").html("Calculating ...");
+         $("#Image").html("");
 -        var url = "http:
++        var url = "http://" + window.location.hostname + ":9002/svc/diffPlot2V?";
+         var d1 = $("#data1").val();
+         var model1 = d1.replace("/", "_");
+         model1 = model1.toLowerCase();
+         var arglist = "";
+         arglist = arglist.concat("model1=");
+         arglist = arglist.concat(model1);
+         var v1 = $("#var1").val();
+         arglist = arglist.concat("&var1=");
+         arglist = arglist.concat(variable1);
+         var pres1 = $("#pres1").val();
+         arglist = arglist.concat("&pres1=");
+         arglist = arglist.concat(pres1);
+         var d2 = $("#data2").val();
+         var model2 = d2.replace("/", "_");
+         model2 = model2.toLowerCase();
+         arglist = arglist.concat("&model2=");
+         arglist = arglist.concat(model2);
+         var v2 = $("#var2").val();
+         arglist = arglist.concat("&var2=");
+         arglist = arglist.concat(variable2);
+         var pres2 = $("#pres2").val();
+         arglist = arglist.concat("&pres2=");
+         arglist = arglist.concat(pres2);
+         var t0 = $("#t0").val();
+         var t1 = $("#t1").val();
+         t0 = t0.replace("-", "");
+         t1 = t1.replace("-", "");
+         arglist = arglist.concat("&start_time=");
+         arglist = arglist.concat(t0);
+         arglist = arglist.concat("&end_time=");
+         arglist = arglist.concat(t1);
+         var lon0 = $("#lon0").val();
+         var lon1 = $("#lon1").val();
+         var lat0 = $("#lat0").val();
+         var lat1 = $("#lat1").val();
+         arglist = arglist.concat("&lon1=");
+         arglist = arglist.concat(lon0);
+         arglist = arglist.concat("&lon2=");
+         arglist = arglist.concat(lon1);
+         arglist = arglist.concat("&lat1=");
+         arglist = arglist.concat(lat0);
+         arglist = arglist.concat("&lat2=");
+         arglist = arglist.concat(lat1);
+         var purpose = $("#purpose").val();
+         arglist = arglist.concat("&purpose=");
+         arglist = arglist.concat(purpose);
+         url = url + encodeURI(arglist);
 -        var urlTimeBounds = "http:
++        var urlTimeBounds = "http://" + window.location.hostname + ":9002/svc/two_time_bounds?";
+         var arglistTB = "";
+         arglistTB = arglistTB.concat("serviceType=");
+         arglistTB = arglistTB.concat("2");
+         arglistTB = arglistTB.concat("&source1=");
+         arglistTB = arglistTB.concat(d1);
+         arglistTB = arglistTB.concat("&var1=");
+         arglistTB = arglistTB.concat(variable1);
+         arglistTB = arglistTB.concat("&source2=");
+         arglistTB = arglistTB.concat(d2);
+         arglistTB = arglistTB.concat("&var2=");
+         arglistTB = arglistTB.concat(variable2);
+         urlTimeBounds = urlTimeBounds + encodeURI(arglistTB);
+         $.ajax({
+             type: "GET",
+             url: urlTimeBounds,
+             dataType: "json",
+             data: null,
+             success: function(data, textStatus, xhr) {
+                 Response = data;
+                 if (data.success == false) {
+                     Response = null;
+                     var text = JSON.stringify(data, null, 4);
+                     text = "Error in backend: <br>" + text; 
+                     $("#Response").html(text);
+                     $("#data_url").html(text);
+                     return;
+                 }
+                 var text = JSON.stringify(data, null, 4);
+                 var tb1 = data.time_bounds1;
+                 var bds1 = String(tb1).split(",");
+                 var lowerT1 = parseInt(bds1[0]);
+                 var upperT1 = parseInt(bds1[1]);
+                 var tb2 = data.time_bounds2;
+                 var bds2 = String(tb2).split(",");
+                 var lowerT2 = parseInt(bds2[0]);
+                 var upperT2 = parseInt(bds2[1]);
+                 var t0I = parseInt(t0);
+                 var t1I = parseInt(t1);
+                 var lowerT, upperT;
+                 if (lowerT1 == 0  || upperT1 == 0){ 
+                   alert("We do not have data for the data-1 source and variable configuration.");
+                   return;
+                 }
+                 else if (lowerT2 == 0  || upperT2 == 0){ 
+                   alert("We do not have data for the data-2 source and variable configuration.");
+                   return;
+                 }
+                 else if (lowerT2 > upperT1 || lowerT1 > upperT2) { 
+                   alert("The two data sets/vars do not have a common time range.");
+                   return;
+                 }
+                 else { 
+                   if (lowerT1 > lowerT2) { 
+                     lowerT = lowerT1;
+                   }
+                   else {
+                     lowerT = lowerT2;
+                   }
+                   if (upperT1 > upperT2) { 
+                     upperT = upperT2;
+                   }
+                   else {
+                     upperT = upperT1;
+                   }
+                 }
+                 if (t0I < lowerT && t1I < lowerT ||
+                     t0I > upperT && t1I > upperT) {
+                   alert("We do not have data that span your time range. Try the range inside ["+lowerT+", "+upperT+"].");
+                   return;
+                 }
+                 if (t0I < lowerT && t1I <= upperT) {
+                   alert("Your start year-month is out of bound. It has to be in or later than " + lowerT +
+                         ". We will use the range ["+lowerT+", "+t1I+"] for you.");
+                 }
+                 if (t1I > upperT && t0I >= lowerT) {
+                   alert("Your end year-month is out of bound. It has to be in or earlier than " + upperT +
+                         ". We will use the range ["+t0I+", "+upperT+"] for you.");
+                 }
+                 if (t0I < lowerT && t1I > upperT ) {
+                   alert("Both of your start and end year-months are out of bounds. They have to be in or earlier than " + upperT +
+                         ", and in or later than " + lowerT + ". We will use the range ["+lowerT+", "+upperT+"] for you.");
+                 }
+             },
+             error: function(xhr, textStatus, errorThrown) {
+ 		$("#Response").html("error!");
+ 		$("#data_url").html("error!");
+             },
+             complete: function(xhr, textStatus) {
+             }
+         });
+         $.ajax({
+             type: "GET",
+             url: url,
+             dataType: "json",
+             data: null,
+             success: function(data, textStatus, xhr) {
+                 Response = data;
+                 if (data.success == false) {
+                     Response = null;
+                     var text = JSON.stringify(data, null, 4);
+                     text = "Error in backend: <br>" + text; 
+                     $("#Response").html(text);
+                     $("#data_url").html(text);
+                     return;
+                 }
+                 var text = JSON.stringify(data, null, 4);
+                 $("#Response").html(text);
+                 var html = "<img src='"+data.url+"' width='820'/>";
+                 $("#Image").html(html);
+                 $("#data_url").html(data.dataUrl);
+                 enable_download_button();
+             },
+             error: function(xhr, textStatus, errorThrown) {
+                 $("#Response").html("error!");
+                 $("#data_url").html("error!");
+             },
+             complete: function(xhr, textStatus) {
+             }
+         });
+       });
+     });
+   </script>
+ } @main("Parameters of ConfId", scripts){ @flash_message()
+ <p>
+ <div id="source1" style="display: none;">@parameters.getSource1()</div>
+ <div id="variableName1" style="display: none;">@parameters.getVaribaleName1()</div>
+ <div id="pressureLevel1" style="display: none;">@parameters.getPressureLevel1()</div>
+ <div id="startYearMonth" style="display: none;">@parameters.getStartYear()</div>
+ <div id="startLat" style="display: none;">@parameters.getStartLat()</div>
+ <div id="startLon" style="display: none;">@parameters.getStartLon()</div>
+ <div id="source2" style="display: none;">@parameters.getSource2()</div>
+ <div id="variableName2" style="display: none;">@parameters.getVaribaleName2()</div>
+ <div id="pressureLevel2" style="display: none;">@parameters.getPressureLevel2()</div>
+ <div id="endYearMonth" style="display: none;">@parameters.getEndYear()</div>
+ <div id="endLat" style="display: none;">@parameters.getEndLat()</div>
+ <div id="endLon" style="display: none;">@parameters.getEndLon()</div>
+ <div id="executionPurpose" style="display: none;">@parameters.getExecutionPurpose()</div>
+ <div id="image" style="display: none;">@parameters.getImage()</div>
+ <div id="dataURL" style="display: none;">@parameters.getDataUrl()</div>
+ <div id="serviceResponseText" style="display: none;">@parameters.getServiceResponse()</div>
+ <table border="1">
+ 	<tr>
+ 		<td colspan="4">
+ 			<center>
+ 				<b>Service: Difference Plot of Two Time Averaged Variables</b><br>
+ 				<br> This service calculates the differences between two
+ 				specified variables and displays the lat-lon maps of the two
+ 				variables and their differences. <br>
+ 				<br>
+ 			</center>
+ 		</td>
+ 	</tr>
+ 	<tr>
+ 		<td colspan="2">
+ 			<center>data 1</center>
+ 		</td>
+ 		<td colspan="2">
+ 			<center>data 2</center>
+ 		</td>
+ 	</tr>
+ 	<tr>
+ 		<td>source:</td>
+ 		<td><select name="data1" , id="data1" onchange="select_data1(1)">
+ 				<optgroup label="Model: Historical">
+ 					<option>CCCMA/CANESM2</option>
+ 					<option>GFDL/ESM2G</option>
+ 					<option>GISS/E2-H</option>
+ 					<option>GISS/E2-R</option>
+ 					<option>NCAR/CAM5</option>
+ 					<option>NCC/NORESM</option>
+ 					<option>UKMO/HadGEM2-ES</option>
+ 				</optgroup>
+ 				<optgroup label="Model: AMIP">
+ 					<option>CCCMA/CANAM4</option>
+ 					<option>CSIRO/MK3.6</option>
+ 					<option>GFDL/CM3</option>
+ 					<option>IPSL/CM5A-LR</option>
+ 					<option>MIROC/MIROC5</option>
+ 					<option>UKMO/HadGEM2-A</option>
+ 				</optgroup>
+ 				<optgroup label="Observation">
+ 					<option>NASA/MODIS</option>
+ 					<option>NASA/AMSRE</option>
+ 					<option>NASA/TRMM</option>
+ 					<option>NASA/GPCP</option>
+ 					<option>NASA/QuikSCAT</option>
+ 					<option>NASA/AVISO</option>
+ 					<option>NASA/GRACE</option>
+ 					<option>NOAA/NODC</option>
+ 					<option>NASA/CERES</option>
+ 					<option>NASA/AIRS</option>
+ 					<option>NASA/MLS</option>
+ 					<option>ARGO/ARGO</option>
+ 				</optgroup>
+ 				<optgroup label="Reanalysis">
+ 					<option>ECMWF/interim</option>
+ 				</optgroup>
+ 		</select></td>
+ 		<td>source:</td>
+ 		<td><select name="data2" , id="data2" onchange="select_data1(2)">
+ 				<optgroup label="Model: Historical">
+ 					<option>CCCMA/CANESM2</option>
+ 					<option>GFDL/ESM2G</option>
+ 					<option>GISS/E2-H</option>
+ 					<option>GISS/E2-R</option>
+ 					<option>NCAR/CAM5</option>
+ 					<option>NCC/NORESM</option>
+ 					<option>UKMO/HadGEM2-ES</option>
+ 				</optgroup>
+ 				<optgroup label="Model: AMIP">
+ 					<option>CCCMA/CANAM4</option>
+ 					<option>CSIRO/MK3.6</option>
+ 					<option>GFDL/CM3</option>
+ 					<option>IPSL/CM5A-LR</option>
+ 					<option>MIROC/MIROC5</option>
+ 					<option>UKMO/HadGEM2-A</option>
+ 				</optgroup>
+ 				<optgroup label="Observation">
+ 					<option>NASA/MODIS</option>
+ 					<option>NASA/AMSRE</option>
+ 					<option>NASA/TRMM</option>
+ 					<option>NASA/GPCP</option>
+ 					<option>NASA/QuikSCAT</option>
+ 					<option>NASA/AVISO</option>
+ 					<option>NASA/GRACE</option>
+ 					<option>NOAA/NODC</option>
+ 					<option>NASA/CERES</option>
+ 					<option>NASA/AIRS</option>
+ 					<option>NASA/MLS</option>
+ 					<option>ARGO/ARGO</option>
+ 				</optgroup>
+ 				<optgroup label="Reanalysis">
+ 					<option>ECMWF/interim</option>
+ 				</optgroup>
+ 		</select></td>
+ 	</tr>
+ 	<tr>
+ 		<td>variable name:</td>
+ 		<td><select name="var1" , id="var1" onchange="select_var1(1)">
+ 				<option>Precipitation Flux</option>
+ 				<option>Total Cloud Fraction</option>
+ 				<option>Surface Temperature</option>
+ 				<option>Sea Surface Temperature</option>
+ 				<option>Eastward Near-Surface Wind</option>
+ 				<option>Northward Near-Surface Wind</option>
+ 				<option>Near-Surface Wind Speed</option>
+ 				<option>Sea Surface Height</option>
+ 				<option>Leaf Area Index</option>
+ 				<option>Equivalent Water Height Over Land</option>
+ 				<option>Equivalent Water Height Over Ocean</option>
+ 				<option>Ocean Heat Content Anomaly within 700 m Depth</option>
+ 				<option>Ocean Heat Content Anomaly within 2000 m Depth</option>
+ 				<option>Surface Downwelling Longwave Radiation</option>
+ 				<option>Surface Downwelling Shortwave Radiation</option>
+ 				<option>Surface Upwelling Longwave Radiation</option>
+ 				<option>Surface Upwelling Shortwave Radiation</option>
+ 				<option>Surface Downwelling Clear-Sky Longwave Radiation</option>
+ 				<option>Surface Downwelling Clear-Sky Shortwave Radiation</option>
+ 				<option>Surface Upwelling Clear-Sky Shortwave Radiation</option>
+ 				<option>TOA Incident Shortwave Radiation</option>
+ 				<option>TOA Outgoing Longwave Radiation</option>
+ 				<option>TOA Outgoing Shortwave Radiation</option>
+ 				<option>TOA Outgoing Clear-Sky Longwave Radiation</option>
+ 				<option>TOA Outgoing Clear-Sky Shortwave Radiation</option>
+ 				<option>Air Temperature</option>
+ 				<option>Specific Humidity</option>
+ 				<option>Cloud Ice Water Content</option>
+ 				<option>Cloud Liquid Water Content</option>
+ 				<option>Ocean Temperature</option>
+ 				<option>Ocean Salinity</option>
+ 				<option>Vertical Wind Velocity</option>
+ 				<option>Relative Humidity</option>
+ 		</select></td>
+ 		<td>variable name:</td>
+ 		<td><select name="var2" , id="var2" onchange="select_var1(2)">
+ 				<option>Precipitation Flux</option>
+ 				<option>Total Cloud Fraction</option>
+ 				<option>Surface Temperature</option>
+ 				<option>Sea Surface Temperature</option>
+ 				<option>Eastward Near-Surface Wind</option>
+ 				<option>Northward Near-Surface Wind</option>
+ 				<option>Near-Surface Wind Speed</option>
+ 				<option>Sea Surface Height</option>
+ 				<option>Leaf Area Index</option>
+ 				<option>Equivalent Water Height Over Land</option>
+ 				<option>Equivalent Water Height Over Ocean</option>
+ 				<option>Ocean Heat Content Anomaly within 700 m Depth</option>
+ 				<option>Ocean Heat Content Anomaly within 2000 m Depth</option>
+ 				<option>Surface Downwelling Longwave Radiation</option>
+ 				<option>Surface Downwelling Shortwave Radiation</option>
+ 				<option>Surface Upwelling Longwave Radiation</option>
+ 				<option>Surface Upwelling Shortwave Radiation</option>
+ 				<option>Surface Downwelling Clear-Sky Longwave Radiation</option>
+ 				<option>Surface Downwelling Clear-Sky Shortwave Radiation</option>
+ 				<option>Surface Upwelling Clear-Sky Shortwave Radiation</option>
+ 				<option>TOA Incident Shortwave Radiation</option>
+ 				<option>TOA Outgoing Longwave Radiation</option>
+ 				<option>TOA Outgoing Shortwave Radiation</option>
+ 				<option>TOA Outgoing Clear-Sky Longwave Radiation</option>
+ 				<option>TOA Outgoing Clear-Sky Shortwave Radiation</option>
+ 				<option>Air Temperature</option>
+ 				<option>Specific Humidity</option>
+ 				<option>Cloud Ice Water Content</option>
+ 				<option>Cloud Liquid Water Content</option>
+ 				<option>Ocean Temperature</option>
+ 				<option>Ocean Salinity</option>
+ 				<option>Vertical Wind Velocity</option>
+ 				<option>Relative Humidity</option>
+ 		</select></td>
+ 	</tr>
+ 	<tr>
+ 		<td>atmosphere pressure level (hPa) <br> or ocean pressure
+ 			level (dbar)
+ 		</td>
+ 		<td><input id="pres1" value="500" alt="pressure" /></td>
+ 		<td>atmosphere pressure level (hPa) <br> or ocean pressure
+ 			level (dbar)
+ 		</td>
+ 		<td><input id="pres2" value="500" alt="pressure" /></td>
+ 	</tr>
+ 	<tr>
+ 	</tr>
+ 	<tr>
+ 		<td>start year-month:</td>
+ 		<td><input id="t0" value=@parameters.getStartYear() alt="start" /></td>
+ 		<td>end year-month:</td>
+ 		<td><input id="t1" value=@parameters.getEndYear() alt="end" /></td>
+ 	</tr>
+ 	<tr>
+ 		<td>start lat (deg):</td>
+ 		<td><input id="lat0" value=@parameters.getStartLat()></td>
+ 		<td>end lat (deg):</td>
+ 		<td><input id="lat1" value=@parameters.getEndLat()></td>
+ 	</tr>
+ 	<tr>
+ 		<td>start lon (deg):</td>
+ 		<td><input id="lon0" value=@parameters.getStartLon()></td>
+ 		<td>end lon (deg):</td>
+ 		<td><input id="lon1" value=@parameters.getEndLon()></td>
+ 	</tr>
+ 	<tr>
+ 		<td colspan="1">Execution purpose</td>
+ 		<td colspan="3">
+ 			<form>
+ 				<textarea name="purpose" id="purpose" rows="4" cols="50"> </textarea>
+ 			</form>
+ 		</td>
+ 	</tr>
+ 	<tr>
+ 		<td colspan="2" align="center"><input id="scatterPlot2V"
+ 			type="submit" value="            Run  Again            "
+ 			style="height: 28px" /></td>
+ 		<form>
+ 			<td colspan="2" align="center"><input id="download_data"
+ 				type="button" value="Download Data" style="height: 28px" /></td>
+ 		</form>
+ 	</tr>
+ 	<tr>
+ 		<td colspan="4">
+ 			<div id="Image">Image Here</div>
+ 		</td>
+ 	</tr>
+ 	<tr>
+ 		<td colspan="4" align="center"><textarea readonly id="data_url"
+ 				cols="89" rows="2">Data URL Here</textarea></td>
+ 	</tr>
+ 	<tr>
+ 		<td colspan="4" align="center"><textarea id="Response" cols="89"
+ 				rows="6">Service Response Text Here</textarea></td>
+ 	</tr>
+ </table>
+ }


[02/50] [abbrv] incubator-cmda git commit: Delete src package

Posted by xi...@apache.org.
Delete src package

Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/011075b9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/011075b9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/011075b9

Branch: refs/heads/master
Commit: 011075b9d0093f6ecadc2b675a9851a3b522b708
Parents: 6a15e2c
Author: mingqi830 <mq...@andrew.cmu.edu>
Authored: Wed Sep 2 14:59:51 2015 -0700
Committer: mingqi830 <mq...@andrew.cmu.edu>
Committed: Wed Sep 2 14:59:51 2015 -0700

----------------------------------------------------------------------
 public/src/conditionalSampling2Var/__init__.py  |   0
 public/src/conditionalSampling2Var/__init__.pyc | Bin 164 -> 0 bytes
 .../conditionalSampling2Var/binBoundarySpec.m   |  19 -
 .../call_conditionalSampling2Var.py             | 119 ---
 .../call_conditionalSampling2Var.pyc            | Bin 4199 -> 0 bytes
 .../displayConditionalSampling2Var.m            | 301 ------
 ...rtedBy_ncar_cam5_hus_and_ncc_noresm_hus.jpeg | Bin 118196 -> 0 bytes
 ...ortedBy_gfdl_esm2g_pr_and_gfdl_esm2g_pr.jpeg | Bin 93009 -> 0 bytes
 .../src/conditionalSampling2Var/octaveWrapper   | 112 ---
 public/src/conditionalSampling2Var/testScript   |  12 -
 public/src/correlationMap/__init__.py           |   0
 public/src/correlationMap/__init__.pyc          | Bin 155 -> 0 bytes
 .../src/correlationMap/call_correlationMap.py   | 128 ---
 .../src/correlationMap/call_correlationMap.pyc  | Bin 3470 -> 0 bytes
 public/src/correlationMap/pythonWrapper         | 909 -------------------
 public/src/correlationMap/wrapper               |   4 -
 public/src/regridAndDownload/__init__.py        |   0
 public/src/regridAndDownload/__init__.pyc       | Bin 158 -> 0 bytes
 .../regridAndDownload/call_regridAndDownload.py |  99 --
 .../call_regridAndDownload.pyc                  | Bin 3297 -> 0 bytes
 public/src/regridAndDownload/octaveWrapper      | 106 ---
 .../src/regridAndDownload/regridAndDownload.m   |  28 -
 public/src/regridAndDownload/testScript         |   7 -
 23 files changed, 1844 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/011075b9/public/src/conditionalSampling2Var/__init__.py
----------------------------------------------------------------------
diff --git a/public/src/conditionalSampling2Var/__init__.py b/public/src/conditionalSampling2Var/__init__.py
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/011075b9/public/src/conditionalSampling2Var/__init__.pyc
----------------------------------------------------------------------
diff --git a/public/src/conditionalSampling2Var/__init__.pyc b/public/src/conditionalSampling2Var/__init__.pyc
deleted file mode 100644
index 48fce15..0000000
Binary files a/public/src/conditionalSampling2Var/__init__.pyc and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/011075b9/public/src/conditionalSampling2Var/binBoundarySpec.m
----------------------------------------------------------------------
diff --git a/public/src/conditionalSampling2Var/binBoundarySpec.m b/public/src/conditionalSampling2Var/binBoundarySpec.m
deleted file mode 100644
index a4173ee..0000000
--- a/public/src/conditionalSampling2Var/binBoundarySpec.m
+++ /dev/null
@@ -1,19 +0,0 @@
-function binB = binBoundarySpec(binB)
-%
-% This function generates a set of bin boundary values
-%
-%
-% Assuming the last element specifying the number of nBins
-nBin = length(binB);
-
-if nBin > 3 && nBin == binB(end) + 2
-  binB = binB(1:(nBin-1));
-elseif nBin == 3
-  if binB(3) <= 0
-    binB = [];
-  else
-    binB = linspace(binB(1), binB(2), binB(3)+1);
-  end
-else
-  error('*** Inconsistent data for bin boundary value specification!!!');
-end

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/011075b9/public/src/conditionalSampling2Var/call_conditionalSampling2Var.py
----------------------------------------------------------------------
diff --git a/public/src/conditionalSampling2Var/call_conditionalSampling2Var.py b/public/src/conditionalSampling2Var/call_conditionalSampling2Var.py
deleted file mode 100644
index 7688d96..0000000
--- a/public/src/conditionalSampling2Var/call_conditionalSampling2Var.py
+++ /dev/null
@@ -1,119 +0,0 @@
-# call_threeDimZonalMean2Var.py
-import string
-import subprocess
-import os
-from os.path import basename
-
-if __name__ == '__main__':
-  import sys
-  sys.path.append('../time_bounds')
-  from getTimeBounds import correctTimeBounds2
-else:
-  from svc.src.time_bounds.getTimeBounds import correctTimeBounds2
-
-class call_conditionalSampling2Var:
-    def __init__(self, data_source, var, start_time, end_time, lon1, lon2, lat1, lat2, pres1, pres2, months,
-                 env_var_source1, env_var1, bin_min1, bin_max1, bin_n1, env_var_plev1,
-                 env_var_source2, env_var2, bin_min2, bin_max2, bin_n2, env_var_plev2, output_dir, displayOpt):
-        self.data_source = data_source		# for e.g. "NCAR_cam5" or "nasa_airs", etc
-        self.var = var				# CMIP5 variable names, e.g. 'ta', 'hus', 'clt'
-        self.lon1 = lon1			# longitude range, min, units = deg
-        self.lon2 = lon2			# longitude range, max, units = deg
-        self.lat1 = lat1			# latitude range, min, units = deg
-        self.lat2 = lat2			# latitude range, max, units = deg
-        self.pres1 = pres1			# pressure level 1 for pressure range 
-        self.pres2 = pres2			# pressure level 2 for pressure range 
-        self.months = months			# month index to specify season, e.g. 6,7,8 for boreal summer
-        self.env_var_source1 = env_var_source1	# first large scale environmental variable data source, e.g. "NCAR_cam5"
-        self.env_var1 = env_var1		# first large scale environmental variable CMIP5 name, e.g. 'ts', 'tos'
-        self.bin_min1 = bin_min1		# min value of bin boundary for sorting first large scale env var
-        self.bin_max1 = bin_max1		# max value of bin boundary for sorting first large scale env var
-        self.bin_n1 = bin_n1			# number of bins to be used for the first large scale variable
-        self.env_var_plev1 = env_var_plev1	# pressure level for env var if it is 3-d
-        self.env_var_source2 = env_var_source2	# first large scale environmental variable data source, e.g. "NCAR_cam5"
-        self.env_var2 = env_var2		# first large scale environmental variable CMIP5 name, e.g. 'ts', 'tos'
-        self.bin_min2 = bin_min2		# min value of bin boundary for sorting first large scale env var
-        self.bin_max2 = bin_max2		# max value of bin boundary for sorting first large scale env var
-        self.bin_n2 = bin_n2			# number of bins to be used for the first large scale variable
-        self.env_var_plev2 = env_var_plev2	# pressure level for env var if it is 3-d
-        self.output_dir = output_dir		# output directory for figure and data file
-        self.displayOpt = displayOpt		# display option, if in binary, the last 3 bits = [z y x]
-        availableTimeBnds1 = correctTimeBounds2('2', data_source.replace("_", "/"), var, env_var_source1.replace("_", "/"), env_var1, start_time, end_time)
-        availableTimeBnds2 = correctTimeBounds2('2', data_source.replace("_", "/"), var, env_var_source2.replace("_", "/"), env_var2, start_time, end_time)
-        self.start_time = str(max(int(availableTimeBnds1[0]), int(availableTimeBnds2[0])));
-        self.end_time = str(min(int(availableTimeBnds1[1]), int(availableTimeBnds2[1])));
-						# z = map scale, y = vertical axis, x = horizontal axis
-						# 1 = log, 0 = lin
-
-    def displayConditionalSampling2Var(self):
-
-        inputs = self.data_source + ' ' + self.var + ' ' + self.start_time + ' ' + self.end_time + ' ' + \
-                 self.lon1 + ',' + self.lon2 + ' ' + self.lat1 + ',' + self.lat2 + ' ' + \
-                 self.pres1 + ',' + self.pres2 + ' ' + self.months + ' ' + \
-                 self.env_var_source1 + ' ' + self.env_var1 + ' ' + \
-                 self.bin_min1 + ',' + self.bin_max1 + ',' + self.bin_n1 + ' ' +  self.env_var_plev1 + ' ' + \
-                 self.env_var_source2 + ' ' + self.env_var2 + ' ' + \
-                 self.bin_min2 + ',' + self.bin_max2 + ',' + self.bin_n2 + ' ' +  self.env_var_plev2 + ' ' + self.output_dir + ' ' + self.displayOpt
-        print 'inputs: ', inputs
-        command = './octaveWrapper ' +  inputs
-        cmd = command.split(' ')
-        cmdstring = string.join(cmd, ' ')
-        print 'cmdstring: ', cmdstring
-
-        if self.start_time == '0' or self.end_time == '0':
-          return ('No Data', '', '')
-
-        try:
-          proc=subprocess.Popen(cmd, cwd='.', stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True)
-          # wait for the process to finish
-          stdout_value, stderr_value = proc.communicate()
-          print 'stdout_value: ', stdout_value
-          print 'stderr_value: ', stderr_value
-
-          if stderr_value.find('error:') >= 0:
-             return (stderr_value, '', '')
-
-          fst = 'figFile: '
-          l1 = len(fst)
-          ### print 'l1: ', l1
-          image_filename = ''
-
-          fst2 = 'dataFile: '
-          l2 = len(fst2)
-          ### print 'l2: ', l2
-          data_filename = ''
-
-          lines = stdout_value.split('\n')
-          for line in lines:
-            ### print '*****: ', line
-            if line.find('figFile: ') >= 0:
-              print '***** line: ', line
-              image_filename = line[l1:]
-
-            if line.find('dataFile: ') >= 0:
-              print '***** line: ', line
-              data_filename = line[l2:]
-
-          print 'image_filename: ', image_filename
-          print 'data_filename: ', data_filename
-          return (stdout_value, image_filename, data_filename)
-        except OSError, e:
-          err_mesg = 'The subprocess "%s" returns with an error: %s.' % (cmdstring, e)
-          return (err_mesg, '', '')
-
-
-if __name__ == '__main__':
-    #./octaveWrapper giss_e2-r clw 200101 200212 '0 360' '-90 90' '20000 90000' '1,2,3,4,5,6,7,8,9,10,11,12' 'giss_e2-r' tos '294,295,296,297,298, 299, 300, 301, 302, 303, 304, 305' '' '/tmp/'
-    # c1 = call_conditionalSampling('cccma_canesm2', 'ts', '200101', '200212', '0', '360', '-90', '90', '', '', '5,6,7,8', 'cccma_canesm2', 'tos', '294','305','20', '',  './', '0')
-    ### c1 = call_conditionalSampling('giss_e2-r', 'clw', '200101', '200212', '0', '360', '-30', '30', '20000', '90000', '5,6,7,8', 'giss_e2-r', 'tos', '294','305','20', '-1',  './', '6')
-
-    c1 = call_conditionalSampling2Var('ncc_noresm', 'cli', '200001', '200202', '0', '360', '-60', '60', '20000', '25000', '3,4,5', 'ncc_noresm', 'tos', '290','303','13', '-999999', 'ncc_noresm', 'wap', '-0.06', '0.06', '6', '50000',  './', '0')
-
-    mesg = c1.displayConditionalSampling2Var()
-    print 'mesg: ', mesg
-
-
-### ./octaveWrapper giss_e2-r cli 200001 200202 0,360 -30,30 20000,90000 3,4,5 giss_e2-r ta 294,305,20 200 /home/svc/cmac/trunk/services/svc/svc/static/conditionalSampling/70ba451132c303980b8195252cf26364 3
-### causes division by zero and index out of bounds errors
-
-

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/011075b9/public/src/conditionalSampling2Var/call_conditionalSampling2Var.pyc
----------------------------------------------------------------------
diff --git a/public/src/conditionalSampling2Var/call_conditionalSampling2Var.pyc b/public/src/conditionalSampling2Var/call_conditionalSampling2Var.pyc
deleted file mode 100644
index 5a85e30..0000000
Binary files a/public/src/conditionalSampling2Var/call_conditionalSampling2Var.pyc and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/011075b9/public/src/conditionalSampling2Var/displayConditionalSampling2Var.m
----------------------------------------------------------------------
diff --git a/public/src/conditionalSampling2Var/displayConditionalSampling2Var.m b/public/src/conditionalSampling2Var/displayConditionalSampling2Var.m
deleted file mode 100644
index cb312ed..0000000
--- a/public/src/conditionalSampling2Var/displayConditionalSampling2Var.m
+++ /dev/null
@@ -1,301 +0,0 @@
-function status = displayConditionalSampling2Var (dataFile, varName, startTime, stopTime, lonRange, latRange, monthIdx, plevRange, largeScaleDataFile1, largeScaleVarName1, largeScaleValueBinB1, largeScalePlev1, largeScaleDataFile2, largeScaleVarName2, largeScaleValueBinB2, largeScalePlev2, outputFile, figFile, displayOpt)
-%
-% This function extracts relevant data from the data file list according
-% the specified temporal range [startTime, stopTime]
-%
-% Input:
-%   dataFile	-- a list of relevant data files
-%   figFile	-- the name of the output file for storing the figure to be displayed
-%   varName	-- the physical variable of interest, or to be displayed, CMIP5 variable name used in netcdf file
-%   startTime	-- the start time of the temporal window over which the climatology is computed, string 'yyyymm'
-%   stopTime	-- the stop time of the temporal window over which the climatology is computed, string 'yyyymm'
-%   lonRnage	-- longitude boundary specification, expect [min, max] (deg)
-%   latRnage	-- latitude boundary specification, expect [min, max] (deg)
-%   monthIdx	-- specify months within a year, which is useful for computing climatology for a specific season.
-%   plevRange	-- presssure level range in units of (Pa)
-%   largeScaleDataFile	-- a list of relevant large scale data files
-%   largeScaleVarName	-- CMIP5 name for the large scale variable
-%   largeScaleValueBinB	-- bin boundary specification, either as a vector of bin boundaries or [min,max,nBin]
-%   largeScalePlev	-- pressure level for the large scale variable, e.g. vertical velocity at 50000Pa
-%   outputFile	-- a data file for storing plotting data in netcdf format
-%   displayOpt	-- flags to specify display scale, linear vs logarithmic, 3-bits, in the order (z,y,x), 0=lin, 1=log, 
-%
-% Output:
-%   status	-- a status flag, 0 = okay, -1 something is not right
-%
-% Author: Chengxing Zhai
-%
-% Revision history:
-%   2013/09/30:	Initial version, cz
-%
-status = -1;
-
-if nargin < 19
-  displayOpt = 0;
-end
-
-% Need to read out first the data to be sorted
-nMonths = numberOfMonths(startTime, stopTime);
-monthList = monthListWithin(startTime, stopTime, monthIdx);
-
-printf('number of month = %d\n', nMonths);
-
-monthlyData = [];
-
-% Let us first assume the same grid
-% We now sort the large scale variable aaccording to the bin
-% sorted data mean and stddev for each bin
-v_sorted_m = [];
-v2_sorted_m = [];
-v_sorted_std = [];
-
-dataIsTwoDim = false;
-
-nFiles = length(dataFile);
-printf('number of files = %d\n', nFiles);
-v = [];
-lon = [];
-lat = [];
-
-file_start_time = {};
-file_stop_time = {};
-
-for fileI = 1:nFiles
-  thisFile = dataFile{fileI};
-
-  if isempty(v_sorted_m)
-    lon = ncread(thisFile, 'lon');
-    lat = ncread(thisFile, 'lat');
-
-    [lon, lat, lonIdx, latIdx] = subIdxLonAndLat(lon, lat, lonRange, latRange);
-    nLon = length(lon);
-    nLat = length(lat);
-
-    largeScaleVarData = cell(2,1);
-
-    % This loads the large scale variabe data
-    largeScaleVarData{1} = readAndRegridTwoDimData(largeScaleDataFile1, largeScaleVarName1, startTime, stopTime, lon, lat, largeScalePlev1);
-    largeScaleVarData{2} = readAndRegridTwoDimData(largeScaleDataFile2, largeScaleVarName2, startTime, stopTime, lon, lat, largeScalePlev2);
-
-    nBinB = [length(largeScaleValueBinB1), length(largeScaleValueBinB2)];
-    largeScaleValueBinB = {largeScaleValueBinB1, largeScaleValueBinB2};
-    for ii = 1:2
-      if nBinB(ii) <= 0
-        largeScaleValueBinB{ii} = generateBinB(largeScaleVarData{ii}.data(:), 20);
-      elseif nBinB(ii) == 1
-        largeScaleValueBinB{ii} = generateBinB(largeScaleVarData{ii}.data(:), largeScaleValueBinB{1});
-      elseif nBinB(ii) == 2
-        largeScaleValueBinB{ii} = linspace(largeScaleValueBinB{ii}(1), largeScaleValueBin{ii}(2), 10 + 1);
-      elseif nBinB(ii) == 3
-        if largeScaleValueBin{ii}(3) <= 0
-          largeScaleValueBinB{ii} = generateBinB(largeScaleVarData{ii}.data(:), 20);  
-        else
-          largeScaleValueBinB{ii} = linspace(largeScaleValueBinB{ii}(1), largeScaleValueBin{ii}(2), largeScaleValueBin{ii}(3) + 1);
-        end
-      end
-      nBinB(ii) = length(largeScaleValueBinB{ii});
-    end
-    nBins = nBinB - 1;
-
-    n_sorted = zeros(nBins);
-
-    [idxArrayForEachBin, binCenterValues, nSamples] = generateIdxForBins2(largeScaleValueBinB, largeScaleVarData);
-
-    if isempty(plevRange)
-      dataIsTwoDim = true;
-      nP = 1;
-    elseif max(plevRange) <= 0
-      dataIsTwoDim = true;
-      nP = 1;
-    else
-      dataIsTwoDim = false;
-      plev = readPressureLevels(thisFile, 'plev');
-      if length(plevRange) == 1
-        [mV, mIdx] = min(abs(plevRange - plev));
-      else
-        mIdx = find(plev >= min(plevRange) & plev <= max(plevRange));
-      end
-      plev = plev(mIdx);
-      nP = length(plev);
-    end
-
-    long_name = ncreadatt(thisFile, varName, 'long_name');
-
-    v_sorted_m = zeros(nBins, 'single');
-    v2_sorted_m = zeros(nBins, 'single');
-    v_sorted_std = zeros(nBins, 'single');
-    n_sorted_valid = zeros(nBins, 'single');
-  end
-
-  v = ncreadVar(thisFile, varName);
-
-  v_units = ncreadatt(thisFile, varName, 'units');
-
-  [startTime_thisFile, stopTime_thisFile] = parseDateInFileName(dataFile{fileI});
-
-  file_start_time{fileI} = startTime_thisFile;
-  file_stop_time{fileI} = stopTime_thisFile;
-
-  monthIdx1 = numberOfMonths(startTime, startTime_thisFile);
-  monthIdx2 = numberOfMonths(startTime, stopTime_thisFile);
-
-  if dataIsTwoDim 
-    nMonths_thisFile = size(v,3);
-  else
-    nMonths_thisFile = size(v,4);
-  end
-
-  idx2Data_start = 1;
-  idx2Data_stop = nMonths_thisFile;
-
-  if monthIdx1 <= 1
-    idx2Data_start = 1 + (1 - monthIdx1);
-    monthIdx1 = 1;
-  end
-
-  if monthIdx2 >= nMonths
-    idx2Data_stop = idx2Data_stop - (monthIdx2 - nMonths);
-    monthIdx2 = nMonths;
-  end
-  monthListThisFile = find(monthList >= monthIdx1 & monthList <= monthIdx2);
-  nMonthInThisFile = length(monthListThisFile);
-
-  timeIdx = idx2Data_start:idx2Data_stop;
-  for monthI = 1:nMonthInThisFile
-    thisMonth = monthListThisFile(monthI);
-    if dataIsTwoDim
-      thisTwoDimSlice = v(lonIdx, latIdx, timeIdx(monthI));
-    else
-      thisTwoDimSlice = meanExcludeNaN(v(lonIdx, latIdx, mIdx, timeIdx(monthI)), 3); % average over relevant levels
-    end
-    for binI1 = 1:nBins(1)
-      for binI2 = 1:nBins(2)
-        idx_thisBin = idxArrayForEachBin{binI1, binI2};
-        idx_in_thisFile = mod(idx_thisBin(find(idx_thisBin > (thisMonth-1)*nLat*nLon & idx_thisBin <= thisMonth*nLat*nLon))-1, nLat*nLon) + 1;
-
-        dataInThisBin = thisTwoDimSlice(idx_in_thisFile);
-        dataValidIdx = find(isfinite(dataInThisBin));
-        n_sorted_valid(binI1,binI2) = n_sorted_valid(binI1,binI2) + length(dataValidIdx);
-        v_sorted_m(binI1, binI2) = v_sorted_m(binI1, binI2) + sum(dataInThisBin(dataValidIdx));
-        v2_sorted_m(binI1, binI2) = v2_sorted_m(binI1, binI2) + sum(dataInThisBin(dataValidIdx).^2);
-      end
-    end
-  end
-  clear v;
-end
-
-v_sorted_m = v_sorted_m ./ n_sorted_valid;
-v2_sorted_m = v2_sorted_m ./ n_sorted_valid;
-v_sorted_std = sqrt((v2_sorted_m - v_sorted_m.^2) ./ (n_sorted_valid - 1));
-
-% We now determine the relevant time range used for this climatology calculation
-[real_startTime, real_stopTime] = findRealTimeRange(file_start_time, file_stop_time, startTime, stopTime);
-
-[x_opt, y_opt, z_opt] = decodeDisplayOpt(displayOpt);
-titleStr = [long_name ', sorted by ' largeScaleVarData{1}.name ' and ' largeScaleVarData{2}.name ', ' date2Str(startTime, '/') '-' date2Str(stopTime, '/')];
-
-for ii = 1:2
-if isfield(largeScaleVarData{ii}, 'plev')
-  labelStr{ii} = [largeScaleVarData{ii}.name ' at ' num2str(round(mean(largeScaleVarData{ii}.plev)/100)) 'hPa (' largeScaleVarData{ii}.units ')' ]
-else
-  labelStr{ii} = [largeScaleVarData{ii}.name '(' largeScaleVarData{ii}.units ')' ];
-end
-end
-
-figure;
-
-if z_opt
-  z = log10(v_sorted_m' + 1e-4*(max(v_sorted_m(:)))); % to have dynamic range of 10^4
-else
-  z = v_sorted_m';
-end
-
-if y_opt
-  y = log10(binCenterValues{2});
-else
-  y = binCenterValues{2};
-end
-
-if x_opt
-  x = log10(binCenterValues{1});
-else
-  x = binCenterValues{1};
-end
-
-[z_valid, y_valid, x_valid] = subsetValidData(z, y, x);
-
-gFilter = gaussianFilter(3, 1);
-
-badDataFrac = sum(sum(~isfinite(z_valid)))/length(z_valid(:));
-if badDataFrac > 0.2
-  imagesc(x_valid, -y_valid, z_valid);
-  hold on;
-  [c2, h2] = contour(interpGrid(x_valid, 2), interpGrid(-y_valid,2), filter2(gFilter, interp2(n_sorted_valid,2)'));
-  caxis([min(z_valid(:)), max(z_valid(:))]);
-  set(gca, 'yticklabel', num2str(-get(gca, 'ytick')'));
-else
-  if badDataFrac < 0.02
-    if badDataFrac < 0.005
-      gFilter = gaussianFilter(5, 1.5);
-    end
-    contourf(interpGrid(x_valid, 2), interpGrid(y_valid,2), filter2(gFilter, interp2(z_valid, 2)), 15, 'linecolor', 'none');
-  else
-    contourf(interpGrid(x_valid, 2), interpGrid(y_valid,2), interp2(z_valid, 2), 15, 'linecolor', 'none');
-  end
-  hold on;
-  [c2, h2] = contour(interpGrid(x_valid, 2), interpGrid(y_valid,2), filter2(gFilter, interp2(n_sorted_valid,2)'));
-end
-set(h2, 'linecolor', [1, 0.0, 0.2], 'linewidth', 1);
-set(h2, 'levellistmode', 'manual');
-l_list = round(get(h2, 'levellist')/10)*10;
-set(h2, 'levellistmode', 'manual');
-set(h2, 'levellist', l_list);
-clabel(c2, h2, l_list(1:2:end), 'fontsize', 12, 'fontweight', 'bold', 'color', [0, 0, 0], 'rotation', 0);
-set(h2,'ShowText','on','TextStep',get(h2,'LevelStep')*2)
-
-if ~isempty(find(isnan(v_sorted_m(:))))
-  cmap = colormap();
-  cmap(1,:) = [1,1,1];
-  colormap(cmap);
-end
-grid on;
-set(gca, 'fontweight', 'bold');
-if y_opt
-  set(gca, 'yticklabel', num2str(10.^(currYTick)));
-end
-ylabel(labelStr{2});
-if x_opt
-  currXTick = get(gca, 'xtick')';
-  set(gca, 'xticklabel', num2str(10.^(currXTick))); % 
-end
-xlabel(labelStr{1});
-  
-cb = colorbar('southoutside');
-if z_opt
-  set(cb, 'xticklabel', num2str(10.^(get(cb, 'xtick')'),3));
-end
-set(get(cb,'xlabel'), 'string', [long_name '(' v_units ')'], 'FontSize', 16);
-
-title(titleStr, 'fontsize', 13, 'fontweight', 'bold');
-print(gcf, figFile, '-djpeg');
-% adding title for color bar
-
-if strcmp(largeScaleVarName1, largeScaleVarName2)
-  data.dimNames = {[largeScaleVarName1 'Bin1'], [largeScaleVarName2 'Bin2']};
-else
-  data.dimNames = {[largeScaleVarName1 'Bin'], [largeScaleVarName2 'Bin']};
-end
-data.nDim = 2;
-data.dimSize = nBins;
-data.dimVars = binCenterValues;
-data.var = v_sorted_m;
-data.varName = varName;
-data.dimVarUnits = {largeScaleVarData{1}.v_units, largeScaleVarData{2}.v_units};
-data.varUnits = v_units;
-data.varLongName = long_name;
-
-status = 0;
-
-if ~isempty(outputFile);
-  status = storeDataInNetCDF(data, outputFile);
-end

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/011075b9/public/src/conditionalSampling2Var/gfdl_esm2g_hus_200401_200412_Annual_sortedBy_ncar_cam5_hus_and_ncc_noresm_hus.jpeg
----------------------------------------------------------------------
diff --git a/public/src/conditionalSampling2Var/gfdl_esm2g_hus_200401_200412_Annual_sortedBy_ncar_cam5_hus_and_ncc_noresm_hus.jpeg b/public/src/conditionalSampling2Var/gfdl_esm2g_hus_200401_200412_Annual_sortedBy_ncar_cam5_hus_and_ncc_noresm_hus.jpeg
deleted file mode 100644
index 8f077a3..0000000
Binary files a/public/src/conditionalSampling2Var/gfdl_esm2g_hus_200401_200412_Annual_sortedBy_ncar_cam5_hus_and_ncc_noresm_hus.jpeg and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/011075b9/public/src/conditionalSampling2Var/gfdl_esm2g_pr_200401_200412_Annual_sortedBy_gfdl_esm2g_pr_and_gfdl_esm2g_pr.jpeg
----------------------------------------------------------------------
diff --git a/public/src/conditionalSampling2Var/gfdl_esm2g_pr_200401_200412_Annual_sortedBy_gfdl_esm2g_pr_and_gfdl_esm2g_pr.jpeg b/public/src/conditionalSampling2Var/gfdl_esm2g_pr_200401_200412_Annual_sortedBy_gfdl_esm2g_pr_and_gfdl_esm2g_pr.jpeg
deleted file mode 100644
index 95f5317..0000000
Binary files a/public/src/conditionalSampling2Var/gfdl_esm2g_pr_200401_200412_Annual_sortedBy_gfdl_esm2g_pr_and_gfdl_esm2g_pr.jpeg and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/011075b9/public/src/conditionalSampling2Var/octaveWrapper
----------------------------------------------------------------------
diff --git a/public/src/conditionalSampling2Var/octaveWrapper b/public/src/conditionalSampling2Var/octaveWrapper
deleted file mode 100644
index 9e47564..0000000
--- a/public/src/conditionalSampling2Var/octaveWrapper
+++ /dev/null
@@ -1,112 +0,0 @@
-#!/usr/bin/octave -q
-addpath([pwd()  '/../util/']);
-
-pkg load netcdf;
-
-arg_list = argv();
-printf ("program name: %s\n", program_name());
-
-narg = length(arg_list);
-
-if narg < 13
-  error('Insufficient argument, need specifications of the variable and environmental variables for conditional sampling: model or observation variable name!'); 
-end
-
-% Specify the data source name, in format "modelCenter_modelName" for a GCM or "dataCenter_instrument" for observational data
-sourceName = lower(arg_list{1});
-varName = arg_list{2};
-
-% Specify the temporal range, start/stop time in format "yyyymm"
-startTimeStr = arg_list{3};
-startTime = struct('year', str2num(startTimeStr(1:4)), 'month', str2num(startTimeStr(5:6)));
-
-stopTimeStr = arg_list{4};
-stopTime = struct('year', str2num(stopTimeStr(1:4)), 'month', str2num(stopTimeStr(5:6)));
-
-% Regional boundaries: longitude and latitude boundaries
-lonRange = str2num(arg_list{5});
-latRange = str2num(arg_list{6});
-
-% pressure range for 3-d variable, using empty or negative values for 2-d variables
-plevRange = str2num(arg_list{7});
-
-% using month index within a year to select a season
-monthIdx = str2num(arg_list{8});
-
-% Source name for the first large scale environmental variable used for conditional sampling
-% in format "modelCenter_modelName"  for models and "dataCenter_instrumentName" for observational data
-largeScaleSourceName1 = lower(arg_list{9});
-
-% first large scale variable name as specified by the CMIP5 standard output document.
-% e.g. tos for SST, omega500 for up draft etct
-largeScaleVarName1 = lower(arg_list{10});
-
-% Boundary values of bins for sorting the first large scale variable, expected to
-% be monotonically increasing
-largeScaleValueBinB1 = str2num(arg_list{11});
-
-disp(largeScaleValueBinB1);
-largeScaleValueBinB1 = binBoundarySpec(largeScaleValueBinB1);
-
-% Pressure level for the large scale variable, the longitude and latitude regions are asssumed to be the same as the physical
-% variable under study.
-% using empty or negative values for 2-d variables
-% Note that the longitude, latitude, and time are the same for both the large scale variable
-% and the physical quantity to be conditionally sampled.
-
-largeScalePlev1 = str2num(arg_list{12});
-
-% Source name for the second large scale environmental variable used for conditional sampling
-% in format "modelCenter_modelName"  for models and "dataCenter_instrumentName" for observational data
-largeScaleSourceName2 = lower(arg_list{13});
-
-% second large scale variable name as specified by the CMIP5 standard output document.
-% e.g. tos for SST, omega500 for up draft etct
-largeScaleVarName2 = lower(arg_list{14});
-% Boundary values of bins for sorting the large scale variable, expected to
-% be monotonically increasing
-largeScaleValueBinB2 = str2num(arg_list{15});
-largeScaleValueBinB2 = binBoundarySpec(largeScaleValueBinB2);
-
-% Pressure level for the large scale variable, the longitude and latitude regions are asssumed to be the same as the physical
-% variable under study.
-% using empty or negative values for 2-d variables
-% Note that the longitude, latitude, and time are the same for both the large scale variable
-% and the physical quantity to be conditionally sampled.
-
-largeScalePlev2 = str2num(arg_list{16});
-
-% Output directory name, required by the program.
-output_dir = arg_list{17};
-
-% display option added to determine whether to use a linear or log scales in display
-% Here we encoded 3-bit information: z_bit, y_bit, x_bit
-% x-axis scale: x_bit = 0 (linear), 1 (log)
-% y-axis scale: y_bit = 0 (linear), 1 (log)
-% z-axis scale: z_bit = 0 (linear), 1 (log), it is for the physical quantity value, so
-% for a map, this represents the colormap scale.
-% So displayOpt = 6 = 110 (in binary) => z_bit = 1, y_bit = 1, x_bit = 0;
-% So displayOpt = 3 = 011 (in binary) => z_bit = 0, y_bit = 1, x_bit = 0;
-displayOpt = str2num(arg_list{18});
-
-% Printing the argument list
-for ii = 1:18
-printf("%d. %s\n", ii, arg_list{ii});
-end
-
-dataFileFullPath = getDataFilePaths(sourceName, varName, startTime, stopTime);
-largeScaleDataFileFullPath1 = getDataFilePaths(largeScaleSourceName1, largeScaleVarName1, startTime, stopTime);
-largeScaleDataFileFullPath2 = getDataFilePaths(largeScaleSourceName2, largeScaleVarName2, startTime, stopTime);
-
-figFile = [sourceName '_' varName '_' date2Str(startTime) '_' date2Str(stopTime) '_' seasonStr(monthIdx) '_sortedBy_' largeScaleSourceName1 '_' largeScaleVarName1 '_and_' largeScaleSourceName2 '_' largeScaleVarName2 '.jpeg'];
-dataFile = [sourceName '_' varName '_' date2Str(startTime) '_' date2Str(stopTime) '_' seasonStr(monthIdx) '_sortedBy_' largeScaleSourceName1 '_' largeScaleVarName1 '_and_' largeScaleSourceName2 '_' largeScaleVarName2 '.nc']
-
-figFilePath = [output_dir '/' figFile];
-dataFilePath = [output_dir '/' dataFile]; 
-printf("figFile: %s\n", figFile)
-printf("figFilePath: %s\n", figFilePath)
-printf("dataFile: %s\n", dataFile)
-printf("dataFilePath: %s\n", dataFilePath)
-
-status = -1;
-displayConditionalSampling2Var(dataFileFullPath, varName, startTime, stopTime, lonRange, latRange, monthIdx, plevRange,  largeScaleDataFileFullPath1, largeScaleVarName1, largeScaleValueBinB1, largeScalePlev1, largeScaleDataFileFullPath2, largeScaleVarName2, largeScaleValueBinB2, largeScalePlev2, dataFilePath, figFile, displayOpt);

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/011075b9/public/src/conditionalSampling2Var/testScript
----------------------------------------------------------------------
diff --git a/public/src/conditionalSampling2Var/testScript b/public/src/conditionalSampling2Var/testScript
deleted file mode 100644
index 5e56885..0000000
--- a/public/src/conditionalSampling2Var/testScript
+++ /dev/null
@@ -1,12 +0,0 @@
-#./octaveWrapper giss_e2-r cli 200101 200212 '0 360' '-90 90' '20000 90000' '1,2,3,4,5,6,7,8,9,10,11,12' 'giss_e2-r' tos '294,295,296,297,298, 299, 300, 301, 302, 303, 304, 305' '' '/tmp/' 6
-#./octaveWrapper giss_e2-r clw 200101 200212 '0 360' '-90 90' '20000 90000' '1,2,3,4,5,6,7,8,9,10,11,12' 'giss_e2-r' tos '294,295,296,297,298, 299, 300, 301, 302, 303, 304, 305' '' '/tmp/' 6
-#./octaveWrapper giss_e2-r clw 200101 200212 '0 360' '-90 90' '20000 90000' '1,2,3,4,5,6,7,8,9,10,11,12' 'giss_e2-r' tos '294,295,296,297,298, 299, 300, 301, 302, 303, 304, 305' '' '/tmp/'
-#./octaveWrapper ncc_noresm clw 200101 200212 '0 360' '-90 90' '20000 90000' '1,2,3,4,5,6,7,8,9,10,11,12' 'giss_e2-r' tos '294,295,296,297,298, 299, 300, 301, 302, 303, 304, 305' '' '/tmp/'
-#./octaveWrapper cccma_canesm2 cli 200101 200212 '0 360' '-90 90' '20000 90000' '1,2,3,4,5,6,7,8,9,10,11,12' 'cccma_canesm2' tos '294,295,296,297,298, 299, 300, 301, 302, 303, 304, 305' '' '/tmp/' 0
-#./octaveWrapper cccma_canesm2 cli 200101 200212 '0 360' '-90 90' '20000 90000' '1,2,3,4,5,6,7,8,9,10,11,12' 'cccma_canesm2' tos '294,295,296,297,298, 299, 300, 301, 302, 303, 304, 305' '' '/tmp/' 2
-#./octaveWrapper cccma_canesm2 clw 200101 200212 '0 360' '-90 90' '20000 90000' '1,2,3,4,5,6,7,8,9,10,11,12' 'cccma_canesm2' tos '294,295,296,297,298, 299, 300, 301, 302, 303, 304, 305' '' '/tmp/'
-#./octaveWrapper cccma_canesm2 ts 200101 200212 '0 360' '-90 90' '' '1,2,3,4,5,6,7,8,9,10,11,12' 'cccma_canesm2' tos '294,295,296,297,298, 299, 300, 301, 302, 303, 304, 305' '' '/tmp/' 7
-#./octaveWrapper cccma_canesm2 ts 200101 200212 '0 360' '-90 90' '' '1,2,3,4,5,6,7,8,9,10,11,12' 'cccma_canesm2' tos '294,295,296,297,298, 299, 300, 301, 302, 303, 304, 305' '' '/tmp/' 0
-#./octaveWrapper ncc_noresm cli 200101 200212 '0 360' '-90 90' '20000' '1,2,3,4,5,6,7,8,9,10,11,12' 'ncc_noresm' tos '290,303,13' '' 'ncc_noresm' 'wap' '-0.06, 0.06,6' '50000' '/tmp/' 0
-./octaveWrapper ncc_noresm cli 200101 200212 '0 360' '-60 60' '20000' '1,2,3,4,5,6,7,8,9,10,11,12' 'ncc_noresm' tos '-999999,-999999,-999999' '-999999' 'ncc_noresm' 'wap' '-0.05,0.05,5' '50000' '/tmp/' 0
-#./octaveWrapper ncc_noresm pr 200101 200312 '0 360' '-60 60' '-999999' '1,2,3,4,5,6,7,8,9,10,11,12' 'ncc_noresm' tos '280, 300, 6' '-999999' 'ncc_noresm' 'hur' '0.,100,6' '75000' '/tmp/' 0

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/011075b9/public/src/correlationMap/__init__.py
----------------------------------------------------------------------
diff --git a/public/src/correlationMap/__init__.py b/public/src/correlationMap/__init__.py
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/011075b9/public/src/correlationMap/__init__.pyc
----------------------------------------------------------------------
diff --git a/public/src/correlationMap/__init__.pyc b/public/src/correlationMap/__init__.pyc
deleted file mode 100644
index 481f776..0000000
Binary files a/public/src/correlationMap/__init__.pyc and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/011075b9/public/src/correlationMap/call_correlationMap.py
----------------------------------------------------------------------
diff --git a/public/src/correlationMap/call_correlationMap.py b/public/src/correlationMap/call_correlationMap.py
deleted file mode 100644
index 0696cb8..0000000
--- a/public/src/correlationMap/call_correlationMap.py
+++ /dev/null
@@ -1,128 +0,0 @@
-# call_correlationMap.py
-import string
-import subprocess
-import os
-from os.path import basename
-
-if __name__ == '__main__':
-  import sys
-  sys.path.append('../time_bounds')
-  from getTimeBounds import correctTimeBounds2
-else:
-  from svc.src.time_bounds.getTimeBounds import correctTimeBounds2
-
-class call_correlationMap:
-    def __init__(self, 
-model1, var1, pres1,
-model2, var2, pres2,
-laggedTime, start_time, end_time, lonS, lonE, latS, latE, 
-#months, 
-output_dir):
-
-        self.model1 = model1
-        self.var1 = var1
-        self.pres1 = pres1
-        self.model2 = model2
-        self.var2 = var2
-        self.pres2 = pres2
-        self.laggedTime = laggedTime
-        self.start_time = start_time
-        self.end_time = end_time
-        self.lon1 = lonS
-        self.lon2 = lonE
-        self.lat1 = latS
-        self.lat2 = latE
-        #self.months = months
-
-        self.output_dir = output_dir
-
-        availableTimeBnds = correctTimeBounds2('2', 
-          model1.replace("_", "/"), var1, model2.replace("_", "/"), 
-          var2, start_time, end_time)
-        self.start_time = availableTimeBnds[0]
-        self.end_time = availableTimeBnds[1]
-
-    def display(self):
-
-        ### print 'current dir: ', os.getcwd()
-        # inputs: model name, variable name, start-year-mon, end-year-mon, 'start lon, end lon', 'start lat, end lat', 'mon list'
-        # example: ./octaveWrapper ukmo_hadgem2-a ts 199001 199512 '0,100' '-29,29' '4,5,6,10,12'
-                 #'%g'%self.lon1 + ',' + '%g'%self.lon2 + ' ' + '%g'%self.lat1 + ',' + '%g'%self.lat2 + ' ' + \
-        inputs = \
-                 self.model1 + ' ' + self.var1 + ' ' + self.pres1 + ' ' + \
-                 self.model2 + ' ' + self.var2 + ' ' + self.pres2 + ' ' + \
-                 str(self.laggedTime) + ' ' + \
-                 self.start_time + ' ' + self.end_time + ' ' + \
-                 self.lon1 + ',' + self.lon2 + ' ' + self.lat1 + ',' + self.lat2 + ' ' + \
-                 self.output_dir
-                 #self.months + ' '  + \
-
-        print 'inputs: ', inputs
-        command = './wrapper ' +  inputs
-        cmd = command.split(' ')
-        cmdstring = string.join(cmd, ' ')
-        print 'cmdstring: ', cmdstring
-
-        if self.start_time == '0' or self.end_time == '0':
-          return ('No Data', '', '')
-
-        try:
-          proc=subprocess.Popen(cmd, cwd='.', stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True)
-          # wait for the process to finish
-          stdout_value, stderr_value = proc.communicate()
-          print 'stdout_value: ', stdout_value
-          print 'stderr_value: ', stderr_value
-
-          if stderr_value.find('error:') >= 0:
-             return (stderr_value, '')
-
-          fst = 'figFile: '
-          l1 = len(fst)
-          ### print 'l1: ', l1
-          image_filename = ''
-
-          fst2 = 'dataFile: '
-          l2 = len(fst2)
-          ### print 'l2: ', l2
-          data_filename = ''
-
-          lines = stdout_value.split('\n')
-          for line in lines:
-            ### print '*****: ', line
-            if line.find('figFile: ') >= 0:
-              print '***** line: ', line
-              image_filename = line[l1:]
-
-            if line.find('dataFile: ') >= 0:
-              print '***** line: ', line
-              data_filename = line[l2:]
-
-          image_filename = os.path.basename(image_filename)
-          print 'image_filename: ', image_filename
-          data_filename = os.path.basename(data_filename)
-          print 'data_filename: ', data_filename
-          return (stdout_value, image_filename, data_filename)
-        except OSError, e:
-          err_mesg = 'The subprocess "%s" returns with an error: %s.' % (cmdstring, e)
-          return (err_mesg, '', '')
-
-
-if __name__ == '__main__':
-
-    c1 = call_scatterPlot2V(\
-         'ukmo_hadgem2-a', 'ts', '200', 'ukmo_hadgem2-a', 'clt', '200', '5', '199001', '199512', '0', '100', '-29', '29', \
-         '/home/svc/cmac/trunk/services/svc/svc/static/scatterPlot2V')
-
-    mesg = c1.display()
-    print 'mesg: ', mesg
-
-
-    """
-    c1 = call_scatterPlot2V(\
-         'ukmo_hadgem2-a', 'ts', '200', 'ukmo_hadgem2-a', 'clt', '200', '199001', '199512', '0', '100', '-29', '29', 500, \
-         '/home/svc/cmac/trunk/services/svc/svc/static/diffPlot2V', 1)
-
-    mesg = c1.display()
-    print 'mesg: ', mesg
-    """
-

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/011075b9/public/src/correlationMap/call_correlationMap.pyc
----------------------------------------------------------------------
diff --git a/public/src/correlationMap/call_correlationMap.pyc b/public/src/correlationMap/call_correlationMap.pyc
deleted file mode 100644
index 10ccf41..0000000
Binary files a/public/src/correlationMap/call_correlationMap.pyc and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/011075b9/public/src/correlationMap/pythonWrapper
----------------------------------------------------------------------
diff --git a/public/src/correlationMap/pythonWrapper b/public/src/correlationMap/pythonWrapper
deleted file mode 100644
index 98be319..0000000
--- a/public/src/correlationMap/pythonWrapper
+++ /dev/null
@@ -1,909 +0,0 @@
-#!/home/svc/install/epd/bin/python
-'''
-execfile('/home/bytang/projects/cmac/trunk/services/svc/svc/src/randomForest/pythonWrapper')
-
-import os 
-os.chdir('/home/svc/cmac/trunk/services/svc/svc/src/correlationMap')
-execfile('pythonWrapper')
-
-
-'''
-HOME='/home/svc'
-
-cr = {
-#                              1  2   3  4
-#
-'import_':              1,   # 0  1   1  0
-# parameters_
-# def_change_labels:     # not working
-# def_getRootDir():
-# def_extractNC(desFn):
-# def_clipEnd(x, w, percL, percR):
-# class_SUBSET_REGION():
-  # def_noDataExit()
-  # def_getFileName2
-  # def_getFileName
-  # def_getUnits(self):
-  # def_subsetting():
-  # def_loadFile
-  # def_corr #
-  # def_saveData(self):
-'init_class':           1,   # 1  1
-'command_arg':          1,   # 1  1
-'plot__':               1,   # 1  1
-'':        0,   # 1  1
-'':        0,   # 1  1
-}
-
-#if cr['']       == 1:
-#if cr['']       == 1:
-
-# 1 -- 
-# 
-
-if cr['import_']       == 1:
-  import os, sys,  time
-  import tempfile
-  #import math
-  import glob
-  import re
-
-  import numpy as np      
-  from netCDF4 import Dataset
-  import netCDF4 as nC4
-  sys.path.insert(0, '../util')
-  import NC_btang_v4 as NC1
-
-  import matplotlib 
-  matplotlib.use('Agg')  
-  import matplotlib.pylab as Mat
-  Mat.ioff()
-  from mpl_toolkits.basemap import Basemap
-
-t00 = time.time()
-
-# parameters_
-num2month = {
-1: 'JAN',
-2: 'FEB',
-3: 'MAR',
-4: 'APR',
-5: 'MAY',
-6: 'JUN',
-7: 'JUL',
-8: 'AUG',
-9: 'SEP',
-10: 'OCT',
-11: 'NOV',
-12: 'DEC',
-}
-
-modelCenter = [
-'cccma',
-'csiro',
-'gfdl',
-'giss',
-'ipsl',
-'miroc',
-'ncar',
-'ncc',
-'ukmo',
-]
-
-obsCenter = [
-'nasa',
-'noaa',
-'argo',
-]
-
-oceanVar = [
-'ot',
-'os',
-]
-
-var3d = [
-'ta',
-'hus',
-'clw',
-'cli',
-'ot',
-'os',
-]
-
-regridVar = [
-'cli',
-'clw',
-]
-
-# def_change_labels(ax):
-def change_labels(ax):
-  x1 = Mat.getp(ax, 'xticklabels')
-  #x1 = Mat.getp(ax.xaxis, 'ticklabels') # not working
-  x1New = []
-  for i in range(len(x1)):
-    t1 = Mat.getp(x1[i], 'text')
-    print t1
-    if not t1: 
-      t2 = ''
-    elif t1[0]==u'\u2212':
-      t2 = str(t1[1:]) + 'W'
-    elif t1[0]==u'0':
-      t2 = str(t1)
-    else:
-      t2 = str(t1) + 'E'
-    x1New.append(t2)
-  #
-  x1 = Mat.getp(ax, 'yticklabels')
-
-  y1New = []
-  for i in range(len(x1)):
-    t1 = Mat.getp(x1[i], 'text')
-    if not t1: 
-      t2 = ''
-    elif t1[0]==u'\u2212':
-      t2 = str(t1[1:]) + 'S'
-    elif t1[0]==u'0':
-      t2 = str(t1)
-    else:
-      t2 = str(t1) + 'N'
-    y1New.append(t2)
-  Mat.setp(ax, xticklabels=x1New, yticklabels=y1New)
-  return x1New, y1New
-
-# def_getRootDir():
-def getRootDir():
-  # use data.cfg to set the data root dir.
-
-  # assuming the cwd is in src/*
-  configFile = '../../../data.cfg'
-
-  # if not, use 'trunk' to figure it out  
-  #if not os.path.isfile(configFile):
-  if 1:
-    cwd = os.getcwd()
-    ind1 = cwd.find('trunk')
-    if ind1>-1:
-      cmacDir = cwd[:ind1]
-      configFile = cmacDir + '/trunk/services/svc/data.cfg'
-
-    if not os.path.isfile(configFile):
-      print 'failed to find data.cfg.'
-      return None 
-    
-  try:
-    temp1 = open(configFile).read() 
-    if temp1[-1]=='\n':
-      temp1 = temp1[:-1]
-    if temp1[-1]=='/':
-      temp1 = temp1[:-1]
-    if os.path.isdir(temp1):
-      dataDir = temp1 + '/cmip5' 
-      #a.dataDir = temp1  # should change to this when data.cfg is without 'cmip5'
-      return dataDir, cmacDir
-        
-  except:
-    print 'failed to read data.cfg.'
-    return None
-
-  print 'failed to get data.cfg.'
-  return None
-
-# def_extractNC(desFn):
-p1 = re.compile("S_FILENAME += *\'(.+\.nc)\'")
-def extractNC(desFn):
-  lines = open(desFn).read()
-  # S_FILENAME    = '/mnt/r1i1p1_plevRegridded_198412-200511.nc'
-
-  m1 = p1.search(lines)
-  return m1.groups()[0]
-
-# def_clipEnd(x, w, percL, percR):
-def clipEnd(x, w, percL, percR):
-  indS = np.argsort(x)
-  x1 = x[indS]
-  w1 = w[indS]
-  sum1 = np.cumsum(w1)
-  threshL = sum1[-1]*percL
-  threshR = sum1[-1]*(1.0 - percR)
-  indL = max( np.searchsorted(sum1, threshL) - 1, 0 )
-  indR = min( np.searchsorted(sum1, threshR) + 1, len(x) )
- 
-  return x1[indL], x1[indR]
-
-# class_SUBSET_REGION():
-class SUBSET_REGION():
-  #== def___init__
-  def __init__(self):
-    self.dataDir, self.cmacDir = getRootDir()
-    if self.dataDir is None:
-      sys.exit(1)
-
-    self.scatterDir = '%s/trunk/services/svc/svc/src/scatterPlot2V'%self.cmacDir
-
-    ### self.ferretCmd = '/home/bytang/install/bin/ferret' 
-    # /mnt/xvdf/data/
-    if self.dataDir.find('xvdf')>-1:
-      self.ferretCmd = '/home/sflops/install/bin/ferret'
-    else:
-      self.ferretCmd = '/home/svc/install/bin/ferret' 
-
-    self.clipL = 0.02
-    self.clipR = 0.02
-
-    self.ferretMem = 100
-    self.isDiffPlot = 0
-
-    #self.dataDir = '/mnt/hgfs/cmacws/data1/data/cmip5'
-    ### self.desDir = '/home/bytang/projects/cmac/des/original'
-    #self.desDir = '/home/svc/cmac/des/original'
-
-    # zzzz
-    #self.desDir = '/home/bytang/projects/cmac/tmp/des'  # for Benyang's testing
-    self.desDir = os.path.split(self.dataDir)[0] + '/des'  # for deployment
-    #self.desDir = '%s/des'%self.scatterDir  # ad hoc fix for summer school
-
-    if 0:
-      self.lon1S = -10.5
-      self.lon1E = 20.3
-      #self.dLon = 1.0
-
-    if 0:
-      self.lon1S = -180.0
-      self.lon1E = 180.0
-      #self.dLon = 1.0
-  
-    if 0:
-      self.lat1S = -70.1
-      self.lat1E = -20.9
-      #self.dLat = 1.0
-
-    if 1:
-      self.lon1S = -180.0
-      self.lon1E = 180.0
-
-    if 1:
-      self.lat1S = -80.0
-      self.lat1E =  80.0
-
-#
-    if 1:
-      self.nVar = 2
-      self.center = []
-      self.model = []
-      self.varName = []
-      self.pres = []
-
-    if 0:
-      self.center.append('gfdl')
-      self.model.append('cm3')
-      self.varName.append('ts')
-      self.pres.append(200*100)
-
-    if 0:
-      self.center.append('gfdl')
-      self.model.append('cm3')
-      self.varName.append('ts')
-      self.pres.append(200*100)
-
-    if 1:
-      self.center.append('gfdl')
-      self.model.append('esm2g')
-      self.varName.append('lai')
-      self.pres.append(200*100)
-
-    if 1:
-      self.center.append('gfdl')
-      self.model.append('esm2g')
-      self.varName.append('zos')
-      self.pres.append(200*100)
-
-    self.laggedTime = 1
-    self.yearS = 2004
-    self.yearE = 2004
-
-    self.monthS = 1
-    self.monthE = 12
-
-    self.dayS = 15
-    self.dayE = 15
-
-    self.nSample = 500
-
-    self.outDir = '.'
-  
-    self.noData = None
-
-  #== def_derived
-  def derived(self):
-    pass
-
-  # def_noDataExit()
-  def noDataExit(self, msg):
-    print "No Data !!!"
-    print msg
-    sys.exit(1)
-
-  # not used. Use the des file instead.
-  # def_getFileName(self, center, model, varName):
-  def getFileName(self, center, model, varName):
-    # the original is just for model
-    if center in modelCenter:
-      if varName in regridVar:
-        dir0 = '%s/%s/%s/regridded'%(self.dataDir, center, model)
-      else:
-        dir0 = '%s/%s/%s/original'%(self.dataDir, center, model)
- 
-    else:
-      dir0 = '%s/%s/%s'%(self.dataDir, center, model)
-
-    desDir = self.desDir
-
-    filesNc = glob.glob('%s/%s_*.nc'%(dir0, varName))
-    desFn = '%s/%s_%s_%s.des'%(desDir, center, model, varName)
-    filesDes = glob.glob(desFn)
-    if 1:
-      print dir0
-      print 'filesNc, filesDes:'
-      print center, model, varName
-      print filesNc
-      print filesDes
-
-    # yyyy
-    if len(filesNc)==0:
-      self.noDataExit('no *.nc file.')
-
-    if len(filesDes)>1:
-      print 'more than 1 des files:'
-      for f in filesDes:
-        print f
-
-      self.noDataExit('more than 1 *.des files.')
-      return None
-
-    if len(filesNc)>1 and len(filesDes)==1:
-      return filesDes[0], filesNc[0]
-
-    if len(filesNc)>1 and len(filesDes)==0:
-      try:
-        temp1 = '/home/bytang/bin/mine/mkdes2 --f90 --des %s %s/%s_*.nc'%(desFn, dir0, varName)
-        print temp1
-        os.system(temp1)
-        files2a = glob.glob(desFn)
-        return files2a[0], filesNc[0]
-      except:
-        self.noDataExit('failed to generate the des file.')
-      
-    if len(filesNc)==1:
-      return filesNc[0], filesNc[0]
- 
-    return None
-
-  # def_getFileName2(self, center, model, varName):
-  def getFileName2(self, center, model, varName):
-    dir0 = '%s/%s_%s'%(self.desDir, center, model)
-    fileNc = glob.glob('%s/%s.nc'%(dir0, varName))
-    #print '%s/%s.nc'%(dir0, varName)
-    if len(fileNc)>0:
-      return fileNc[0], fileNc[0] 
-
-    else:
-      #print '%s/%s.des'%(dir0, varName)
-      fileDes = glob.glob('%s/%s.des'%(dir0, varName))
-
-      if len(fileDes)==0:
-        return None
-
-      # def_extractNC(desFn):
-      return fileDes[0], extractNC(fileDes[0])
-
-  # def_getUnits(self):
-  def getUnits(self):
-    self.units = []
-    for iVar in range(self.nVar):
-      nc1 = Dataset(self.inFileNc[iVar], 'r')
-      data = nc1.variables[self.varName[iVar]]
-      self.units.append(data.units)
-      nc1.close()
-
-  # def_subsetting():
-  def subsetting(self, ncFile1, varName1, ncFile2=None, varName2='DATA1', 
-         varNameOut='DATA1', interp='', dim=4, lev=-1, isAve=0):
-
-    try:
-      temp1 = os.path.isfile(ncFile1)
-    except:
-      print 'Subsetting failed; file not there: %s'%(ncFile1)
-      self.noData = 1
-      tempFile = None
-      return tempFile
-    
-    if not os.path.isfile(ncFile1):
-      print 'Subsetting failed; file not there: %s'%(ncFile1)
-      self.noData = 1
-      tempFile = None
-      return tempFile
-      
-    aveStr = ''
-    if isAve==1:
-      aveStr = '@ave'
-
-    if self.noData ==1:
-      self.noDataExit('in subsetting: nc file is not there.')
-     
-    tempFile = tempfile.mkstemp(suffix='.nc', dir=self.outDir)
-
-    tmpFileJnl = tempfile.mkstemp(suffix='.jnl', dir=self.outDir)
-    #print varName, tempFile, tmpFileJnl
-
-    dimStr = ''
-    if dim==3:
-      dimStr = ', t="15-%s-%d":"15-%s-%d"%s'\
-%(num2month[self.monthS], self.yearS, num2month[self.monthE], self.yearE, aveStr)
-    elif dim==4:
-      if lev<0:
-        dimStr = ', k=1, t="15-%s-%d":"15-%s-%d"%s'\
-%(num2month[self.monthS], self.yearS, num2month[self.monthE], self.yearE, aveStr)
-      else:
-        dimStr = ', z=%g@itp, t="15-%s-%d":"15-%s-%d"%s'\
-%(lev, num2month[self.monthS], self.yearS, num2month[self.monthE], self.yearE, aveStr)
-
-      if 0:
-        dimStr = ', k=1, t="15-%s-%d":"15-%s-%d"%s'\
-%(num2month[self.monthS], self.yearS, num2month[self.monthE], self.yearE, aveStr)
-
-    #  
-    if ncFile2 is None:
-      script1 = '''
-  SET MEMORY/SIZE=%d  
-  show memory
-  SET mode desperate:100000
-
-  ! 3
-  use "%s"
-  !show data
-
-  !define var/bad=-9999.0/title="aa" data1 =SST[d=1, g=newG@nrst, l=1]
-  ! This is too slow:
-  !define var/bad=-9999.0/title="aa" data1 =SST[d=1, g=newG@ave, l=1]
-  ! Default is linear interpolation. As fast as nrst: 
-  ! 4
-  define var/bad=-9999.0/title="aa" %s =%s[d=1, x=%f:%f, y=%f:%f %s]
-  ! 5
-  save/clobber/file="%s" %s
-  '''%(
-  self.ferretMem, 
-  # 3
-  ncFile1, 
-  # 4
-  varNameOut,
-  varName1,
-  self.lon1S,
-  self.lon1E,
-  self.lat1S,
-  self.lat1E,
-  #interp,
-  dimStr,
-  # 5
-  tempFile[1],
-  varNameOut)
-
-    else:
-      script1 = '''
-  SET MEMORY/SIZE=%d  
-  show memory
-  SET mode desperate:100000
-
-  ! 3
-  use "%s"
-  use "%s"
-  !show data
-
-  
-  !define var/bad=-9999.0/title="aa" data1 =SST[d=1, g=newG@nrst, l=1]
-  ! This is too slow:
-  !define var/bad=-9999.0/title="aa" data1 =SST[d=1, g=newG@ave, l=1]
-  ! Default is linear interpolation. As fast as nrst: 
-  ! 4
-  define var/bad=-9999.0/title="aa" %s =%s[d=1, g=%s[d=2, l=1]%s %s]
-  ! 5
-  save/clobber/file="%s" %s
-  '''%(
-  self.ferretMem, 
-  # 3
-  ncFile1, 
-  ncFile2, 
-  # 4
-  varNameOut,
-  varName1,
-  varName2,
-  interp,
-  dimStr,
-  # 5
-  tempFile[1],
-  varNameOut)
-
-    open(tmpFileJnl[1], 'w').write(script1)
-
-    temp1 = '%s -gif -script %s' %(self.ferretCmd, tmpFileJnl[1])
-
-    try:
-      os.system(temp1)
-    except:
-      self.noDataExit('subsetting: failed to run ferret')
-
-    #os.remove(tmpFileJnl)
-
-    if not os.path.isfile(tempFile[1]):
-      self.noDataExit('subsetting: ferret failed to generate a nc file.')
-
-    if os.stat(tempFile[1]).st_size<10:
-      self.noDataExit('subsetting: ferret failed to generate a nc file.')
-
-    return tempFile[1]
-
-  # def_loadFile
-  def loadFile(self, ncFile, varName='DATA1'):
-    nc1 = Dataset(ncFile, 'r')
-    data = nc1.variables[varName][:]
-    nc1.close()
-
-    #zzzz 
-    if len(data.shape)==3:
-      data = data[0, :,:]
-    return data
- 
-  # def_corr #
-  def corr(self, ncFile1, ncFile2, varName1='DATA1', varName2='DATA2'):
-    nBin = 30 
-    nBin1 = 40 
-
-    # open file
-    nc1 = Dataset(ncFile1, 'r')
-    nc2 = Dataset(ncFile2, 'r')
-
-    ncVar1 = nc1.variables[varName1]
-    ncVar2 = nc2.variables[varName2]
-
-    dims1 = ncVar1.dimensions
-    lon1 = nc1.variables[dims1[-1]][:]
-    lat1 = nc1.variables[dims1[-2]][:]
-
-    dims2 = ncVar2.dimensions
-    lon2 = nc2.variables[dims2[-1]][:]
-    lat2 = nc2.variables[dims2[-2]][:]
-
-    print ncVar1.shape
-
-    nMonth = ncVar1.shape[0]
- 
-    # loop over time
-    monthCount = 0
-    for iMonth in range(self.laggedTime, nMonth):
-      monthCount += 1
-      a1 = ncVar1[iMonth-self.laggedTime]
-      a2 = ncVar2[iMonth]
-
-      # sometimes the 2 data may not have the save shape
-      if (a1.shape[-1] != a2.shape[-1]):
-        min1 = min(a1.shape[-1], a2.shape[-1]) 
-        a1 = a1[:, :min1] 
-        a2 = a2[:, :min1] 
-
-      if (a1.shape[0] != a2.shape[0]):
-        min1 = min(a1.shape[0], a2.shape[0]) 
-        a1 = a1[:min1,:] 
-        a2 = a2[:min1,:] 
-
-      # remove the invalid data
-      if 0:
-        temp1 = np.ma.arange(5)
-        valid1 = np.ones( a1.shape )
-        valid2 = np.ones( a1.shape )
-        if type(a1) == type(temp1):
-          if a1.mask is not None:
-            valid1 = ~( a1.mask )
-        if type(a2) == type(temp1):
-          if a2.mask is not None:
-            valid2 = ~( a2.mask )
-
-        valid = valid1 & valid2
-        aa1 = a1[valid]
-        aa2 = a2[valid]
-
-        aa1 = aa1.ravel()
-        aa2 = aa2.ravel()
-
-      if monthCount==1:
-        xb = a1
-        yb = a2
-        xyb = a1*a2
-        xxb = a1*a1
-        yyb = a2*a2
-      else:
-        xb += a1
-        yb += a2
-        xyb += a1*a2
-        xxb += a1*a1
-        yyb += a2*a2
-        
-    nc1.close()
-    nc2.close()
-
-    # calc corr
-    xb /= float(monthCount)
-    yb /= float(monthCount)
-    xyb /= float(monthCount)
-    xxb /= float(monthCount)
-    yyb /= float(monthCount)
-
-    print 'xb: '
-    print xb.min(), xb.max(), xb.mean(), xb.std()
-
-    print 'yb: '
-    print yb.min(), yb.max(), yb.mean(), yb.std()
-
-    print 'xyb: '
-    print xyb.min(), xyb.max(), xyb.mean(), xyb.std()
-
-    print 'xxb: '
-    print xxb.min(), xxb.max(), xxb.mean(), xxb.std()
-
-    print 'yyb: '
-    print yyb.min(), yyb.max(), yyb.mean(), yyb.std()
-
-    temp1 = np.sqrt( (xxb-xb*xb)*(yyb-yb*yb) )
-    temp2 = temp1<1e-10
-    temp1[temp2] = 1.0
-
-    temp3 = (xyb - xb*yb)
-    corrxy = temp3/temp1
-    corrxy = np.ma.array(corrxy)
-    corrxy[temp2] = np.ma.masked
-
-    print 'corrxy: '
-    print corrxy.min(), corrxy.max(), corrxy.mean(), corrxy.std()
-
-    # figure
-    fig1 = Mat.figure(figsize=(10,16))
-    Mat.clf()
-
-    # plot correlation map
-    Mat.subplot(3,1,1)
-    #fig1.tight_layout()
-
-    fig1.tight_layout()
-    m1 = Basemap(self.lon1S, self.lat1S, self.lon1E, self.lat1E, resolution='c', suppress_ticks=False)
-    temp1 = m1.pcolor(lon1, lat1, corrxy, vmin=-1.0, vmax=1.0)
-    #temp1 = m1.pcolor(lon1, lat1, corrxy)
-    temp1 = m1.drawcoastlines()
-    Mat.colorbar()
-    Mat.title('corrcoef(%s_%s:%s , %s_%s:%s(lag=%d)). # of month: %d'\
-        %(a.center[0], a.model[0], a.varName[0], a.center[1], a.model[1], a.varName[1],
-         a.laggedTime, 
-         monthCount))
-
-    #change_labels(Mat.gca())
-    # output png file
-    figFile = '%s/corrcoef.png'%self.outDir
-    Mat.savefig(figFile, dpi=100)
-
-    print 'figFile: %s'%figFile
-
-  # def_saveData(self):
-  def saveData(self, tempFile1, tempFile2):
-    fn = '%s/data_compare.nc'%self.outDir
-
-    # load data
-    nc1 = Dataset(tempFile1, 'r')
-    data1a = nc1.variables['DATA1']
-    dims1 = data1a.dimensions
-    data1 = data1a[:]
-    lon1 = nc1.variables[dims1[-1]][:]
-    lat1 = nc1.variables[dims1[-2]][:]
-
-    nDim1 = len(data1.shape)
-    if nDim1==3:
-      time1 = nc1.variables[dims1[0]][:]
-
-    nc1.close()
-
-    nc2 = Dataset(tempFile2, 'r')
-    data2a = nc2.variables['DATA2']
-    dims2 = data2a.dimensions
-    data2 = data2a[:]
-    lon2 = nc2.variables[dims2[-1]][:]
-    lat2 = nc2.variables[dims2[-2]][:]
-
-    nDim2 = len(data2.shape)
-    if nDim2==3:
-      time2 = nc2.variables[dims2[0]][:]
-
-    nc2.close()
-
-    # sometimes the 2 data may not have the save shape
-    nLon = min( len(lon1), len(lon2) )
-    nLat = min( len(lat1), len(lat2) )
-    if len(lon1)>nLon or len(lat1)>nLat:
-      lon1 = lon1[:nLon]
-      lat1 = lat1[:nLat]
-      data1 = data1[..., :nLat, :nLon]
-
-    if len(lon2)>nLon or len(lat2)>nLat:
-      lon2 = lon2[:nLon]
-      lat2 = lat2[:nLat]
-      data2 = data2[..., :nLat, :nLon]
-
-    # fill the missing data
-    if type(data1)==type(np.ma.arange(1)):
-      data1a = data1.filled(-9999.0)
-    else: 
-      data1a = data1
-
-    if type(data2)==type(np.ma.arange(1)):
-      data2a = data2.filled(-9999.0)
-    else: 
-      data2a = data2
-
-    # save the 2 variables
-    if nDim1==2:
-      NC1.save2nc(data1a, ncfile=fn, name='data1', 
-        newfile=1,
-        format='NETCDF3_CLASSIC',
-        missing_value=-9999.0,
-        axisorder='yx', axislib=NC1.axislib0, axisarray=[lat1, lon1])
-    else:
-      NC1.save2nc(data1a, ncfile=fn, name='data1', 
-        newfile=1,
-        format='NETCDF3_CLASSIC',
-        missing_value=-9999.0,
-        axisorder='tyx', axislib=NC1.axislib0, axisarray=[time1,lat1, lon1])
-
-    nc1 = Dataset(fn, 'r+')
-
-    if nDim2==2:
-      d2 = nc1.createVariable('data2', 'float32', ('lat', 'lon'))
-    else:
-      d2 = nc1.createVariable('data2', 'float32', ('time', 'lat', 'lon'))
-
-    #print d2.shape
-    #print data2.shape
-    # zzzz
-    #nn0 = min( d2.shape[0], data2.shape[0])
-    #nn1 = min( d2.shape[1], data2.shape[1])
-    d2[:] = data2a
-    nc1.close()
-
-    print 'dataFile: %s'%fn
-    
-if cr['init_class']       == 1:
-  a = SUBSET_REGION()
-
-if cr['command_arg']       == 1:
-
-  '''
-- interface:
- nVar
- repeat nVar times:
-  model1
-  var1
-  lavel1
- laggedTime
- months
- lon1,lon2
- lat1,lat2
- outDir
-''' 
-  #     inputs = \
-  #              self.model1 + ' ' + self.var1 + ' ' + self.start_time1 + ' ' + self.end_time1 + ' ' + \
-  #              self.lon1a + ',' + self.lon1b + ' ' + self.lat1a + ',' + self.lat1b + ' ' + \
-  #              self.model2 + ' ' + self.var2 + ' ' + self.start_time2 + ' ' + self.end_time2 + ' ' + \
-  #              self.lon2a + ',' + self.lon2b + ' ' + self.lat2a + ',' + self.lat2b + ' ' + \
-  #              self.output_dir
-
-  if len(sys.argv)>1:
-    argv = sys.argv
-
-    print 'len(argv) = ',
-    print len(argv)
-    print 'argv: '
-    for i in argv:
-      print i
-
-    # arg 1
-    a.nVar = 2
-
-    a.center = []
-    a.model = []
-    a.varName = []
-    a.pres = []
-    ii = 0
-    for iVar in range(a.nVar):
-      # arg 2
-      ii += 1
-      temp1 = argv[ii].split('_')
-      a.center.append(temp1[0])
-      a.model.append(temp1[1])
-
-      # arg 3
-      ii += 1
-      a.varName.append(argv[ii])
-
-      # arg 4
-      if 1:
-        ii += 1
-        try:
-          pres1 = float(argv[ii])
-        except ValueError:
-          pres1 = -1
-        if pres1>0 and (a.varName[iVar] not in oceanVar):
-          pres1 *= 100.0
-        a.pres.append(pres1)
-
-    ii += 1
-    temp1 = argv[ii]
-    a.laggedTime = int(temp1)
-
-    ii += 1
-    a.yearS = int(argv[ii][:4])
-    a.monthS = int(argv[ii][4:])
-
-    # arg 8
-    ii += 1
-    a.yearE = int(argv[ii][:4])
-    a.monthE = int(argv[ii][4:])
-
-    # arg 11
-    ii += 1
-    temp1 = argv[ii].split(',')
-    a.lon1S = float(temp1[0])
-    a.lon1E = float(temp1[1])
-
-    # arg 12
-    ii += 1
-    temp1 = argv[ii].split(',')
-    a.lat1S = float(temp1[0])
-    a.lat1E = float(temp1[1])
-
-    # arg 10
-    if 0:
-      ii += 1
-      temp1 = argv[ii].split(',')
-      a.months = [int(i) for i in temp1]
-      if a.months[0]==-1:
-        a.months = range(1,13)
-
-    # arg 13
-    ii += 1
-    a.outDir = argv[ii]
-    print 'a.outDir: ',
-    print a.outDir
-
-if cr['plot__']       == 1:
-  # get file names
-  #try: 
-  a.inFile = []
-  a.inFileNc = []
-  for iVar in range(a.nVar):
-    if 1: 
-      inFile1, inFile1Nc = a.getFileName2(a.center[iVar], a.model[iVar], a.varName[iVar]) 
-      a.inFile.append(inFile1)
-      a.inFileNc.append(inFile1Nc)
-      print 'variable ', iVar
-      print a.center[iVar], a.model[iVar], a.varName[iVar]
-      print a.inFile[-1]
-      print a.inFileNc[-1]
-
-  a.getUnits()
-
-  # subset
-  tempFile1 = a.subsetting(a.inFile[0], a.varName[0], dim=4, lev=a.pres[0])
-  tempFile2 = a.subsetting(a.inFile[1], a.varName[1], ncFile2=tempFile1, varNameOut='DATA2', dim=4, lev=a.pres[1])
-
-  if 1:
-    a.corr(tempFile1,tempFile2)
-
-  #a.saveData(tempFile1, tempFile2)
-
-  print 'tempFiles:'
-  print tempFile1
-  print tempFile2

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/011075b9/public/src/correlationMap/wrapper
----------------------------------------------------------------------
diff --git a/public/src/correlationMap/wrapper b/public/src/correlationMap/wrapper
deleted file mode 100644
index 2559755..0000000
--- a/public/src/correlationMap/wrapper
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-/home/svc/install/bin/epd ./pythonWrapper $*
-

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/011075b9/public/src/regridAndDownload/__init__.py
----------------------------------------------------------------------
diff --git a/public/src/regridAndDownload/__init__.py b/public/src/regridAndDownload/__init__.py
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/011075b9/public/src/regridAndDownload/__init__.pyc
----------------------------------------------------------------------
diff --git a/public/src/regridAndDownload/__init__.pyc b/public/src/regridAndDownload/__init__.pyc
deleted file mode 100644
index 59debc3..0000000
Binary files a/public/src/regridAndDownload/__init__.pyc and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/011075b9/public/src/regridAndDownload/call_regridAndDownload.py
----------------------------------------------------------------------
diff --git a/public/src/regridAndDownload/call_regridAndDownload.py b/public/src/regridAndDownload/call_regridAndDownload.py
deleted file mode 100644
index 8e02bb8..0000000
--- a/public/src/regridAndDownload/call_regridAndDownload.py
+++ /dev/null
@@ -1,99 +0,0 @@
-# call_twoDimMap.py
-import string
-import subprocess
-import os
-from os.path import basename
-
-if __name__ == '__main__':
-  import sys
-  sys.path.append('../time_bounds')
-  from getTimeBounds import correctTimeBounds1
-else:
-  from svc.src.time_bounds.getTimeBounds import correctTimeBounds1
-
-class call_regridAndDownload:
-    def __init__(self, model, var, start_time, end_time, lon1, lon2, dlon, lat1, lat2, dlat, plev, output_dir):
-        self.model = model
-        self.var = var
-        self.lon1 = lon1
-        self.lon2 = lon2
-        self.dlon = dlon
-        self.lat1 = lat1
-        self.lat2 = lat2
-        self.dlat = dlat
-        self.plev = plev
-        self.output_dir = output_dir
-        availableTimeBnds = correctTimeBounds1('1', model.replace("_", "/"), var, start_time, end_time)
-        self.start_time = availableTimeBnds[0]
-        self.end_time = availableTimeBnds[1]
-
-        # temporary fix
-        # This application level knowledge may not belong here
-        if self.model == 'NASA_AMSRE' and self.var == 'ts':
-          self.var = 'tos'
-
-
-    def regridAndDownload(self):
-
-        ### print 'current dir: ', os.getcwd()
-        # inputs: model name, variable name, start-year-mon, end-year-mon, 'start lon, end lon', 'start lat, end lat', 'mon list'
-        # example: ./octaveWrapper ukmo_hadgem2-a ts 199001 199512 '0,100' '-29,29' '4,5,6,10,12'
-        inputs = self.model + ' ' + self.var + ' ' + self.start_time + ' ' + self.end_time + ' ' + \
-                 self.lon1 + ',' + self.lon2 + ',' + self.dlon + ' ' + self.lat1 + ',' + self.lat2 + ',' + self.dlat + ' ' + \
-                 self.plev + ' ' + self.output_dir
-        print 'inputs: ', inputs
-        command = './octaveWrapper ' +  inputs
-        cmd = command.split(' ')
-        cmdstring = string.join(cmd, ' ')
-        print 'cmdstring: ', cmdstring
-
-        if self.start_time == '0' or self.end_time == '0':
-          return ('No Data', '', '')
-
-        try:
-          proc=subprocess.Popen(cmd, cwd='.', stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True)
-          # wait for the process to finish
-          stdout_value, stderr_value = proc.communicate()
-          print 'stdout_value: ', stdout_value
-          print 'stderr_value: ', stderr_value
-
-          if stderr_value.find('error:') >= 0:
-             return (stderr_value, '', '')
-
-          fst = 'figFile: '
-          l1 = len(fst)
-          ### print 'l1: ', l1
-          image_filename = ''
-
-          fst2 = 'dataFile: '
-          l2 = len(fst2)
-          ### print 'l2: ', l2
-          data_filename = ''
-
-          lines = stdout_value.split('\n')
-          for line in lines:
-            ## print '*****: ', line
-            if line.find('figFile: ') >= 0:
-              print '***** line: ', line
-              image_filename = line[l1:]
-
-            if line.find('dataFile: ') >= 0:
-              print '***** line: ', line
-              data_filename = line[l2:]
-
-          print 'image_filename: ', image_filename
-          print 'data_filename: ', data_filename
-          return (stdout_value, image_filename, data_filename)
-        except OSError, e:
-          err_mesg = 'The subprocess "%s" returns with an error: %s.' % (cmdstring, e)
-          return (err_mesg, '', '')
-
-
-if __name__ == '__main__':
-    ### c1 = call_twoDimMap('ukmo_hadgem2-a', 'ts', '199001', '199512', '0', '100', '-29', '29', '4,5,6,10,12', '/home/svc/cmac/trunk/services/twoDimMap/twoDimMap/static/')
-    ### c1 = call_twoDimMap('cccma_canam4', 'ts', '199001', '199512', '0', '100', '-29', '29', '4,5,6,10,12', '/home/svc/cmac/trunk/services/twoDimMap/twoDimMap/static/')
-    c1 = call_regridAndDownload('ncc_noresm', 'ta', '199001', '200012', '0', '360', '4', '-90', '90', '4',  '100000,80000,50000,30000,20000,10000', './')
-    ### c1 = call_twoDimMap('ukmo_hadgem2-es', 'ts', '199001', '199512', '0', '100', '-29', '29', '4,5,6,10,12', '/home/svc/cmac/trunk/services/twoDimMap/twoDimMap/static/')
-
-    mesg = c1.regridAndDownload()
-    print 'mesg: ', mesg

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/011075b9/public/src/regridAndDownload/call_regridAndDownload.pyc
----------------------------------------------------------------------
diff --git a/public/src/regridAndDownload/call_regridAndDownload.pyc b/public/src/regridAndDownload/call_regridAndDownload.pyc
deleted file mode 100644
index 42b6191..0000000
Binary files a/public/src/regridAndDownload/call_regridAndDownload.pyc and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/011075b9/public/src/regridAndDownload/octaveWrapper
----------------------------------------------------------------------
diff --git a/public/src/regridAndDownload/octaveWrapper b/public/src/regridAndDownload/octaveWrapper
deleted file mode 100644
index f8c12dd..0000000
--- a/public/src/regridAndDownload/octaveWrapper
+++ /dev/null
@@ -1,106 +0,0 @@
-#!/usr/bin/octave -q
-addpath([pwd()  '/../util/']);
-
-pkg load netcdf;
-arg_list = argv();
-printf ("program name: %s\n", program_name());
-
-narg = length(arg_list);
-
-if narg < 2
-  error('Insufficient argument, need a model and a variable name!'); 
-end
-sourceName = lower(arg_list{1});
-printf ("sourceName: %s\n", sourceName);
-varName = arg_list{2};
-printf ("varName: %s\n", varName);
-
-if narg > 2
-  startTimeStr = arg_list{3};
-  startTime = struct('year', str2num(startTimeStr(1:4)), 'month', str2num(startTimeStr(5:6)));
-end
-
-if narg > 3
-  stopTimeStr = arg_list{4};
-  stopTime = struct('year', str2num(stopTimeStr(1:4)), 'month', str2num(stopTimeStr(5:6)));
-end
-
-% Default grid, 2 x 2.5 deg, MLS grid
-lon = 2.5*(0:143);
-lat = 2*(-45:45);
-
-if narg > 4
-  lon_grid = str2num(arg_list{5});
-  printf ("longitude grid (min, max, resolution): (%d, %d, %d) \n", lon_grid(1), lon_grid(2), lon_grid(3));
-  lon = lon_grid(1):lon_grid(3):lon_grid(2);
-end
-
-if narg > 5
-  lat_grid = str2num(arg_list{6});
-  printf ("latitude grid (min, max, resolution): (%d, %d, %d) \n", lat_grid(1), lat_grid(2), lat_grid(3));
-  lat = lat_grid(1):lat_grid(3):lat_grid(2);
-end
-
-% Default CMIP5 pressure levels
-plev = plevForRegrid();
-
-if narg > 6
-  plev = str2num(strrep(arg_list{7}, ',', ' '));
-  printf ("pressure levels : %s Pa\n", arg_list{5});
-end
-
-outputDir = '/tmp/';
-if narg > 7
-  outputDir = arg_list{8};
-end 
-
-overwrite = true;
-if narg > 8
-  overwrite = str2num(arg_list{9});
-end 
-
-for ii = 1:narg
-  printf("%d. %s\n", arg_list{ii}, ii)
-end
-
-dataFileFullPath = getDataFilePaths(sourceName, varName, startTime, stopTime);
-
-nFile = length(dataFileFullPath);
-
-disp(nFile)
-
-outFiles = cell(nFile,1);
-
-regridStr = strrep(strrep([arg_list{5} '_'  arg_list{6} '_' arg_list{7}], ' ' , ''), ',', 'f');
-
-for fileI = 1:nFile
-  thisInputFile = dataFileFullPath{fileI};
-  [thisPath, thisName] = fileparts(thisInputFile);
-  outFiles{fileI} = [outputDir '/' thisName '_' regridStr '.nc'];
-  disp(outFiles{fileI})
-  if exist(outFiles{fileI}, 'file')
-    if overwrite
-      delete(outFiles{fileI});
-    else
-      continue;
-    end
-  end
-  status = regridAndDownload(thisInputFile, outFiles{fileI}, varName, lon, lat, plev);
-end
-
-dataFile = [sourceName '_' varName '_' date2Str(startTime) '_' date2Str(stopTime) '_' regridStr '.nc'];
-dataFilePath = [outputDir '/' dataFile];
-
-% Let us concatenate all the outpout files
-cmd = ['/usr/bin/ncrcat ']
-for ii = 1:nFile
-  cmd = [cmd outFiles{ii} ' '];
-end
-cmd = [cmd dataFilePath];
-system(cmd);
-for ii = 1:nFile
-  delete(outFiles{ii});
-end
-
-printf("dataFile: %s\n", dataFile)
-printf("dataFilePath: %s\n", dataFilePath)

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/011075b9/public/src/regridAndDownload/regridAndDownload.m
----------------------------------------------------------------------
diff --git a/public/src/regridAndDownload/regridAndDownload.m b/public/src/regridAndDownload/regridAndDownload.m
deleted file mode 100644
index 485c294..0000000
--- a/public/src/regridAndDownload/regridAndDownload.m
+++ /dev/null
@@ -1,28 +0,0 @@
-function status = regridAndDownload(inputFile, outputFile, varName, lon, lat, plev)
-%
-% This function regrids data in input file according to the specified longitude, latitude, pressure level
-% and output the data to output file
-%
-status = -1;
-
-if nargin < 4
-  status = system(['/bin/ln -s ' inputFile ' ' outputFile ';']);
-  return;
-end
-
-outputFile_tmp = [outputFile(1:(end-3)) '_tmp.nc'];
-
-if ~isempty(lon) && ~isempty(lat)
-  disp('regridding longitude and latitude ...');
-  status = regridLonAndLat(inputFile, outputFile_tmp, varName, lon, lat);
-else
-  status = system(['/bin/ln -s ' inputFile ' ' outputFile_tmp ';']);
-end
-
-if abs(plev(1) - (-999999.0)) < 1
-  movefile(outputFile_tmp, outputFile);
-else
-  disp('regridding vertical levels ...');
-  status = resampleVerticalGrid(outputFile_tmp, outputFile, varName, plev);
-  delete(outputFile_tmp);
-end

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/011075b9/public/src/regridAndDownload/testScript
----------------------------------------------------------------------
diff --git a/public/src/regridAndDownload/testScript b/public/src/regridAndDownload/testScript
deleted file mode 100644
index 301cddc..0000000
--- a/public/src/regridAndDownload/testScript
+++ /dev/null
@@ -1,7 +0,0 @@
-#./octaveWrapper '/mnt/hgfs/cmacws/data1/data/cmip5/giss/e2-r/amip/ta_Amon_GISS-E2-R_amip_r1i1p1_188001-195012.nc' 'ta' '0, 360, 4', '-90, 90, 4', '100000,80000,50000,30000, 20000, 10000', 1  /tmp/xxx2.nc;
-
-#./octaveWrapper '/mnt/hgfs/cmacws/data1/data/cmip5/giss/e2-r/amip/cli_Amon_GISS-E2-R_amip_r1i1p1_188001-195012.nc' 'cli' '0, 360, 4', '-90, 90, 4', '100000,80000,50000,30000, 20000, 10000', 1  /tmp/xxx2.nc;
-
-#./octaveWrapper 'ncc_noresm' 'ta' 199001 200012 '0, 360, 4' '-90, 90, 4' '100000,80000,50000,30000, 20000, 10000'  /tmp/;
-
-./octaveWrapper 'giss_e2-r' 'ts' 199001 200012 '0, 360, 4' '-90, 90, 4' '-999999'  /tmp/;


[27/50] [abbrv] incubator-cmda git commit: Change the name

Posted by xi...@apache.org.
Change the name

Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/c64222a3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/c64222a3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/c64222a3

Branch: refs/heads/master
Commit: c64222a3b04e8302ff72f924b1d2d96d7465551e
Parents: 190fe2e
Author: mingqi830 <mq...@andrew.cmu.edu>
Authored: Thu Sep 3 17:06:47 2015 -0700
Committer: mingqi830 <mq...@andrew.cmu.edu>
Committed: Thu Sep 3 17:06:47 2015 -0700

----------------------------------------------------------------------
 app/controllers/ClimateServiceController.java   |   2 +-
 .../climate/TwoDVariableZonelMean.scala.html    | 988 -------------------
 .../climate/twoDVariableZonelMean.scala.html    | 988 +++++++++++++++++++
 3 files changed, 989 insertions(+), 989 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/c64222a3/app/controllers/ClimateServiceController.java
----------------------------------------------------------------------
diff --git a/app/controllers/ClimateServiceController.java b/app/controllers/ClimateServiceController.java
index ae5d8b5..0606f65 100644
--- a/app/controllers/ClimateServiceController.java
+++ b/app/controllers/ClimateServiceController.java
@@ -273,7 +273,7 @@ public class ClimateServiceController extends Controller {
 				twoDVarZonalMean.setExecutionPurpose(response.path("purpose").textValue());
 				twoDVarZonalMean.setImage(response.path("plotUrl").textValue());
 				twoDVarZonalMean.setDataURL(response.path("dataUrl").textValue());
-				return ok(views.html.climate.TwoDVariableZonelMean.render(twoDVarZonalMean));
+				return ok(views.html.climate.twoDVariableZonelMean.render(twoDVarZonalMean));
 			}
 			else if (serviceName.equals("2-D-Variable-Map")) {//Old ID 12
 				for (int i = 0; i < responseConfigItems.size(); i++) {

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/c64222a3/app/views/climate/TwoDVariableZonelMean.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/TwoDVariableZonelMean.scala.html b/app/views/climate/TwoDVariableZonelMean.scala.html
deleted file mode 100644
index 74bb104..0000000
--- a/app/views/climate/TwoDVariableZonelMean.scala.html
+++ /dev/null
@@ -1,988 +0,0 @@
-@(parameters: metadata.TwoDVarZonalMean) @import helper._
-<link rel="stylesheet"
-	href='@routes.Assets.at("stylesheets/livefitler.css")'>
-@scripts = {
-<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
-<script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
-<script type="text/javascript"
-	src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
-<script type="text/javascript"
-	src="https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js"></script>
-<script type="
-	text/javascript"
-	src='@routes.Assets.at("javascripts/json2.js")'></script>
-<script
-	type='text/javascript" src="@routes.Assets.at("javascripts/xmisc.js")'></script>
-<script type="text/javascript">
-    var Response = null;
-    var variable = "";
-    window.onload = function() {
-      changeDataSource(); 
-      select_data();
-      changeVariableName();
-      select_var();
-      var z=document.getElementById("download_data");
-      z.disabled=false;
-      $('#t0').val($('#startYearMonth').text());
-      $('#t1').val($('#endYearMonth').text());
-      var selectMonths = $('#selectMonths').text();
-      $('#months option:contains('+selectMonths+')').prop({selected: true});
-      select_months();
-      select_monthsByPara();
-      $('#lat0').val($('#startLat').text());
-      $('#lat1').val($('#endLat').text());
-      var variableScale = $('#variableScale').text();
-      if(variableScale == "0") {
-        $('#radioLin').prop( "checked", true );
-        $('#radioLog').prop( "checked", false );
-      }
-      else {
-        $('#radioLin').prop( "checked", false );
-        $('#radioLog').prop( "checked", true );
-      }
-      $('#purpose').html($('#executionPurpose').text());
-      var imageUrl = $('#image').text();
-      $('#Image').html('<img src="'+imageUrl+'" width=680 />');
-      $('#data_url').html($('#dataURL').text());
-      $('#Response').html($('serviceResponseText').text());
-    }
-    function changeDataSource(){
-    	var dataSource = $('#dataSource').text();
-     	var x = document.getElementById("data");
-     	if(dataSource == "NASA_MODIS" ){
-     		x.options[0].selected=true;
-     	}
-     	else if(dataSource == "NASA_AMSRE" ){
-     		x.options[1].selected=true;
-     	}
-     	else if(dataSource == "NASA_TRMM" ){
-     		x.options[2].selected=true;
-     	}
-     	else if(dataSource == "NASA_GPCP" ){
-     		x.options[3].selected=true;
-     	}
-     	else if(dataSource == "NASA_QuikSCAT" ){
-     		x.options[4].selected=true;
-     	}
-     	else if(dataSource == "NASA_AVISO" ){
-     		x.options[5].selected=true;
-     	}
-     	else if(dataSource == "NASA_GRACE" ){
-     		x.options[6].selected=true;
-     	}
-     	else if(dataSource == "NOAA_NODC" ){
-     		x.options[7].selected=true;
-     	}
-     	else if(dataSource == "NASA_CERES" ){
-     		x.options[8].selected=true;
-     	}
-     	else if(dataSource == "CCCMA_CANESM2" ){
-     		x.options[9].selected=true;
-     	}
-     	else if(dataSource == "GFDL_ESM2G" ){
-     		x.options[10].selected=true;
-     	}
-     	else if(dataSource == "GISS_E2-H" ){
-     		x.options[11].selected=true;
-     	}
-     	else if(dataSource == "GISS_E2-R" ){
-     		x.options[12].selected=true;
-     	}
-     	else if(dataSource == "NCAR_CAM5" ){
-     		x.options[13].selected=true;
-     	}
-     	else if(dataSource == "NCC_NORESM" ){
-     		x.options[14].selected=true;
-     	}
-     	else if(dataSource == "UKMO_HadGEM2-ES" ){
-     		x.options[15].selected=true;
-     	}
-     	else if(dataSource == "CCCMA_CANAM4" ){
-     		x.options[16].selected=true;
-     	}
-     	else if(dataSource == "CSIRO_MK3.6" ){
-     		x.options[17].selected=true;
-     	}
-     	else if(dataSource == "GFDL_CM3" ){
-     		x.options[18].selected=true;
-     	}
-     	else if(dataSource == "IPSL_CM5A-LR" ){
-     		x.options[19].selected=true;
-     	}
-     	else if(dataSource == "MIROC_MIROC5" ){
-     		x.options[20].selected=true;
-     	}
-     	else if(dataSource == "UKMO_HADGEM2-A" ){
-     		x.options[21].selected=true;
-     	}
-     	else if(dataSource == "ECMWF_interim" ){
-     		x.options[22].selected=true;
-     	}
-    }
-    function changeVariableName(){
-    	var var_string = $('#variableName').text();
-     	var x=document.getElementById("var");
-     	if (var_string == "clt")
-     		x.options[1].selected=true;
-        else if (var_string == "ts")
-        	x.options[2].selected=true;
-        else if (var_string == "tos")
-        	x.options[3].selected=true;
-        else if (var_string == "pr")
-        	x.options[0].selected=true;
-        else if (var_string == "uas")
-        	x.options[4].selected=true;
-        else if (var_string == "vas")
-        	x.options[5].selected=true;
-        else if (var_string == "sfcWind")
-        	x.options[6].selected=true;
-        else if (var_string == "zos")
-        	x.options[7].selected=true;
-        else if (var_string == "lai")
-        	x.options[8].selected=true;
-        else if (var_string == "zl")
-        	x.options[9].selected=true;
-        else if (var_string == "zo")
-        	x.options[10].selected=true;
-        else if (var_string == "ohc700")
-        	x.options[11].selected=true;
-        else if (var_string == "ohc2000")
-        	x.options[12].selected=true;
-        else if (var_string == "rlds")
-        	x.options[13].selected=true;
-        else if (var_string == "rsds")
-        	x.options[14].selected=true;
-        else if (var_string == "rlus")
-        	x.options[15].selected=true;
-        else if (var_string == "rsus")
-        	x.options[16].selected=true;
-        else if (var_string == "rldscs")
-        	x.options[17].selected=true;
-        else if (var_string == "rsdscs")
-        	x.options[18].selected=true;
-        else if (var_string == "rsuscs")
-        	x.options[19].selected=true;
-        else if (var_string == "rsdt")
-        	x.options[20].selected=true;
-        else if (var_string == "rlutcs")
-        	x.options[21].selected=true;
-        else if (var_string == "rlut")
-        	x.options[22].selected=true;
-        else if (var_string == "rsutcs")
-        	x.options[23].selected=true;
-        else if (var_string == "rsut")
-        	x.options[24].selected=true;
-    }
-    function select_monthsByPara(){
-    	var monthsByPara = $('#monthsPara').text();
-    	if(monthsByPara.search("jan")>-1){
-    		document.getElementById('Jan').checked = true;
-    	}
-    	if(monthsByPara.search("feb")>-1){
-    		document.getElementById('Feb').checked = true;
-    	}
-    	if(monthsByPara.search("mar")>-1){
-    		document.getElementById('Mar').checked = true;
-    	}
-    	if(monthsByPara.search("apr")>-1){
-    		document.getElementById('Apr').checked = true;
-    	}
-    	if(monthsByPara.search("may")>-1){
-    		document.getElementById('May').checked = true;
-    	}
-    	if(monthsByPara.search("jun")>-1){
-    		document.getElementById('Jun').checked = true;
-    	}
-    	if(monthsByPara.search("jul")>-1){
-    		document.getElementById('Jul').checked = true;
-    	}
-    	if(monthsByPara.search("aug")>-1){
-    		document.getElementById('Aug').checked = true;
-    	}
-    	if(monthsByPara.search("sep")>-1){
-    		document.getElementById('Sep').checked = true;
-    	}
-    	if(monthsByPara.search("oct")>-1){
-    		document.getElementById('Oct').checked = true;
-    	}
-    	if(monthsByPara.search("nov")>-1){
-    		document.getElementById('Nov').checked = true;
-    	}
-    	if(monthsByPara.search("dec")>-1){
-    		document.getElementById('Dec').checked = true;
-    	}
-    }
-    function disable_download_button()
-    {
-    }
-    function enable_download_button()
-    {
-      var x=document.getElementById("download_data");
-      x.disabled=false;
-    }
-    function select_all_months()
-    {
-        document.getElementById('Jan').checked = true;
-        document.getElementById('Feb').checked = true;
-        document.getElementById('Mar').checked = true;
-        document.getElementById('Apr').checked = true;
-        document.getElementById('May').checked = true;
-        document.getElementById('Jun').checked = true;
-        document.getElementById('Jul').checked = true;
-        document.getElementById('Aug').checked = true;
-        document.getElementById('Sep').checked = true;
-        document.getElementById('Oct').checked = true;
-        document.getElementById('Nov').checked = true;
-        document.getElementById('Dec').checked = true;
-    }
-    function no_month_check()
-    {
-        if (document.getElementById('Jan').checked == false &&
-           document.getElementById('Feb').checked == false &&
-           document.getElementById('Mar').checked == false &&
-           document.getElementById('Apr').checked == false &&
-           document.getElementById('May').checked == false &&
-           document.getElementById('Jun').checked == false &&
-           document.getElementById('Jul').checked == false &&
-           document.getElementById('Aug').checked == false &&
-           document.getElementById('Sep').checked == false &&
-           document.getElementById('Oct').checked == false &&
-           document.getElementById('Nov').checked == false &&
-           document.getElementById('Dec').checked == false) {
-           return true;
-          }
-        else
-           return false;
-    }
-    function reset_months()
-    {
-        document.getElementById('Jan').checked = false;
-        document.getElementById('Feb').checked = false;
-        document.getElementById('Mar').checked = false;
-        document.getElementById('Apr').checked = false;
-        document.getElementById('May').checked = false;
-        document.getElementById('Jun').checked = false;
-        document.getElementById('Jul').checked = false;
-        document.getElementById('Aug').checked = false;
-        document.getElementById('Sep').checked = false;
-        document.getElementById('Oct').checked = false;
-        document.getElementById('Nov').checked = false;
-        document.getElementById('Dec').checked = false;
-    }
-    function reset_vars()
-    {
-      var x=document.getElementById("var");
-      x.options[0].disabled=false;
-      x.options[1].disabled=false;
-      x.options[2].disabled=false;
-      x.options[3].disabled=false;
-      x.options[4].disabled=false;
-      x.options[5].disabled=false;
-      x.options[6].disabled=false;
-      x.options[7].disabled=false;
-      x.options[8].disabled=false;
-      x.options[9].disabled=false;
-      x.options[10].disabled=false;
-      x.options[11].disabled=false;
-      x.options[12].disabled=false;
-      x.options[13].disabled=false;
-      x.options[14].disabled=false;
-      x.options[15].disabled=false;
-      x.options[16].disabled=false;
-      x.options[17].disabled=false;
-      x.options[18].disabled=false;
-      x.options[19].disabled=false;
-      x.options[20].disabled=false;
-      x.options[21].disabled=false;
-      x.options[22].disabled=false;
-      x.options[23].disabled=false;
-      x.options[24].disabled=false;
-    }
-    function select_var()
-    {
-      var var_string = $("#var").val();
-      if (var_string == "Total Cloud Fraction")
-        variable = "clt";
-      else if (var_string == "Surface Temperature")
-        variable = "ts";
-      else if (var_string == "Sea Surface Temperature")
-        variable = "tos";
-      else if (var_string == "Precipitation Flux")
-        variable = "pr";
-      else if (var_string == "Eastward Near-Surface Wind")
-        variable = "uas";
-      else if (var_string == "Northward Near-Surface Wind")
-        variable = "vas";
-      else if (var_string == "Near-Surface Wind Speed")
-        variable = "sfcWind";
-      else if (var_string == "Sea Surface Height")
-        variable = "zos";
-      else if (var_string == "Leaf Area Index")
-        variable = "lai";
-      else if (var_string == "Equivalent Water Height Over Land")
-        variable = "zl";
-      else if (var_string == "Equivalent Water Height Over Ocean")
-        variable = "zo";
-      else if (var_string == "Ocean Heat Content Anomaly within 700 m Depth")
-        variable = "ohc700";
-      else if (var_string == "Ocean Heat Content Anomaly within 2000 m Depth")
-        variable = "ohc2000";
-      else if (var_string == "Surface Downwelling Longwave Radiation")
-        variable = "rlds";
-      else if (var_string == "Surface Downwelling Shortwave Radiation")
-        variable = "rsds";
-      else if (var_string == "Surface Upwelling Longwave Radiation")
-        variable = "rlus";
-      else if (var_string == "Surface Upwelling Shortwave Radiation")
-        variable = "rsus";
-      else if (var_string == "Surface Downwelling Clear-Sky Longwave Radiation")
-        variable = "rldscs";
-      else if (var_string == "Surface Downwelling Clear-Sky Shortwave Radiation")
-        variable = "rsdscs";
-      else if (var_string == "Surface Upwelling Clear-Sky Shortwave Radiation")
-        variable = "rsuscs";
-      else if (var_string == "TOA Incident Shortwave Radiation")
-        variable = "rsdt";
-      else if (var_string == "TOA Outgoing Clear-Sky Longwave Radiation")
-        variable = "rlutcs";
-      else if (var_string == "TOA Outgoing Longwave Radiation")
-        variable = "rlut";
-      else if (var_string == "TOA Outgoing Clear-Sky Shortwave Radiation")
-        variable = "rsutcs";
-      else if (var_string == "TOA Outgoing Shortwave Radiation")
-        variable = "rsut";
-    }
-    function select_data()
-    {
-      var data_string = $("#data").val();
-      var x=document.getElementById("var");
-      reset_vars();
-      if (data_string == "NASA/AMSRE") {
-        x.options[0].disabled=true;
-        x.options[1].disabled=true;
-        x.options[2].disabled=true;
-        x.options[4].disabled=true;
-        x.options[5].disabled=true;
-        x.options[6].disabled=true;
-        x.options[7].disabled=true;
-        x.options[8].disabled=true;
-        x.options[9].disabled=true;
-        x.options[10].disabled=true;
-        x.options[11].disabled=true;
-        x.options[12].disabled=true;
-        x.options[13].disabled=true;
-        x.options[14].disabled=true;
-        x.options[15].disabled=true;
-        x.options[16].disabled=true;
-        x.options[17].disabled=true;
-        x.options[18].disabled=true;
-        x.options[19].disabled=true;
-        x.options[20].disabled=true;
-        x.options[21].disabled=true;
-        x.options[22].disabled=true;
-        x.options[23].disabled=true;
-        x.options[24].disabled=true;
-        x.options[3].selected=true;
-      }
-      else if (data_string == "NASA/MODIS") {
-        x.options[0].disabled=true;
-        x.options[2].disabled=true;
-        x.options[3].disabled=true;
-        x.options[4].disabled=true;
-        x.options[5].disabled=true;
-        x.options[6].disabled=true;
-        x.options[7].disabled=true;
-        x.options[9].disabled=true;
-        x.options[10].disabled=true;
-        x.options[11].disabled=true;
-        x.options[12].disabled=true;
-        x.options[13].disabled=true;
-        x.options[14].disabled=true;
-        x.options[15].disabled=true;
-        x.options[16].disabled=true;
-        x.options[17].disabled=true;
-        x.options[18].disabled=true;
-        x.options[19].disabled=true;
-        x.options[20].disabled=true;
-        x.options[21].disabled=true;
-        x.options[22].disabled=true;
-        x.options[23].disabled=true;
-        x.options[24].disabled=true;
-        x.options[1].selected=true;
-      }
-      else if (data_string == "NASA/TRMM") {
-        x.options[0].selected=true;
-        x.options[1].disabled=true;
-        x.options[2].disabled=true;
-        x.options[3].disabled=true;
-        x.options[4].disabled=true;
-        x.options[5].disabled=true;
-        x.options[6].disabled=true;
-        x.options[7].disabled=true;
-        x.options[8].disabled=true;
-        x.options[9].disabled=true;
-        x.options[10].disabled=true;
-        x.options[11].disabled=true;
-        x.options[12].disabled=true;
-        x.options[13].disabled=true;
-        x.options[14].disabled=true;
-        x.options[15].disabled=true;
-        x.options[16].disabled=true;
-        x.options[17].disabled=true;
-        x.options[18].disabled=true;
-        x.options[19].disabled=true;
-        x.options[20].disabled=true;
-        x.options[21].disabled=true;
-        x.options[22].disabled=true;
-        x.options[23].disabled=true;
-        x.options[24].disabled=true;
-      }
-      else if (data_string == "NASA/GPCP") {
-        x.options[0].selected=true;
-        x.options[1].disabled=true;
-        x.options[2].disabled=true;
-        x.options[3].disabled=true;
-        x.options[4].disabled=true;
-        x.options[5].disabled=true;
-        x.options[6].disabled=true;
-        x.options[7].disabled=true;
-        x.options[8].disabled=true;
-        x.options[9].disabled=true;
-        x.options[10].disabled=true;
-        x.options[11].disabled=true;
-        x.options[12].disabled=true;
-        x.options[13].disabled=true;
-        x.options[14].disabled=true;
-        x.options[15].disabled=true;
-        x.options[16].disabled=true;
-        x.options[17].disabled=true;
-        x.options[18].disabled=true;
-        x.options[19].disabled=true;
-        x.options[20].disabled=true;
-        x.options[21].disabled=true;
-        x.options[22].disabled=true;
-        x.options[23].disabled=true;
-        x.options[24].disabled=true;
-      }
-      else if (data_string == "NASA/QuikSCAT") {
-        x.options[0].disabled=true;
-        x.options[1].disabled=true;
-        x.options[2].disabled=true;
-        x.options[3].disabled=true;
-        x.options[7].disabled=true;
-        x.options[8].disabled=true;
-        x.options[9].disabled=true;
-        x.options[10].disabled=true;
-        x.options[11].disabled=true;
-        x.options[12].disabled=true;
-        x.options[13].disabled=true;
-        x.options[14].disabled=true;
-        x.options[15].disabled=true;
-        x.options[16].disabled=true;
-        x.options[17].disabled=true;
-        x.options[18].disabled=true;
-        x.options[19].disabled=true;
-        x.options[20].disabled=true;
-        x.options[21].disabled=true;
-        x.options[22].disabled=true;
-        x.options[23].disabled=true;
-        x.options[24].disabled=true;
-        x.options[4].selected=true;
-      }
-      else if (data_string == "NASA/AVISO") {
-        x.options[0].disabled=true;
-        x.options[1].disabled=true;
-        x.options[2].disabled=true;
-        x.options[3].disabled=true;
-        x.options[4].disabled=true;
-        x.options[5].disabled=true;
-        x.options[6].disabled=true;
-        x.options[8].disabled=true;
-        x.options[9].disabled=true;
-        x.options[10].disabled=true;
-        x.options[11].disabled=true;
-        x.options[12].disabled=true;
-        x.options[13].disabled=true;
-        x.options[14].disabled=true;
-        x.options[15].disabled=true;
-        x.options[16].disabled=true;
-        x.options[17].disabled=true;
-        x.options[18].disabled=true;
-        x.options[19].disabled=true;
-        x.options[20].disabled=true;
-        x.options[21].disabled=true;
-        x.options[22].disabled=true;
-        x.options[23].disabled=true;
-        x.options[24].disabled=true;
-        x.options[7].selected=true;
-      }
-      else if (data_string == "NASA/GRACE") {
-        x.options[0].disabled=true;
-        x.options[1].disabled=true;
-        x.options[2].disabled=true;
-        x.options[3].disabled=true;
-        x.options[4].disabled=true;
-        x.options[5].disabled=true;
-        x.options[6].disabled=true;
-        x.options[7].disabled=true;
-        x.options[8].disabled=true;
-        x.options[11].disabled=true;
-        x.options[12].disabled=true;
-        x.options[13].disabled=true;
-        x.options[14].disabled=true;
-        x.options[15].disabled=true;
-        x.options[16].disabled=true;
-        x.options[17].disabled=true;
-        x.options[18].disabled=true;
-        x.options[19].disabled=true;
-        x.options[20].disabled=true;
-        x.options[21].disabled=true;
-        x.options[22].disabled=true;
-        x.options[23].disabled=true;
-        x.options[24].disabled=true;
-        x.options[9].selected=true;
-      }
-      else if (data_string == "NOAA/NODC") {
-        x.options[0].disabled=true;
-        x.options[1].disabled=true;
-        x.options[2].disabled=true;
-        x.options[3].disabled=true;
-        x.options[4].disabled=true;
-        x.options[5].disabled=true;
-        x.options[6].disabled=true;
-        x.options[7].disabled=true;
-        x.options[8].disabled=true;
-        x.options[9].disabled=true;
-        x.options[10].disabled=true;
-        x.options[13].disabled=true;
-        x.options[14].disabled=true;
-        x.options[15].disabled=true;
-        x.options[16].disabled=true;
-        x.options[17].disabled=true;
-        x.options[18].disabled=true;
-        x.options[19].disabled=true;
-        x.options[20].disabled=true;
-        x.options[21].disabled=true;
-        x.options[22].disabled=true;
-        x.options[23].disabled=true;
-        x.options[24].disabled=true;
-        x.options[11].selected=true;
-      }
-      else if (data_string == "NASA/CERES") {
-        x.options[0].disabled=true;
-        x.options[1].disabled=true;
-        x.options[2].disabled=true;
-        x.options[3].disabled=true;
-        x.options[4].disabled=true;
-        x.options[5].disabled=true;
-        x.options[6].disabled=true;
-        x.options[7].disabled=true;
-        x.options[8].disabled=true;
-        x.options[9].disabled=true;
-        x.options[10].disabled=true;
-        x.options[11].disabled=true;
-        x.options[12].disabled=true;
-        x.options[13].selected=true;
-      }
-      else if (data_string == "ECMWF/interim") {
-        x.options[0].disabled=true;
-        x.options[1].disabled=true;
-        x.options[2].disabled=true;
-        x.options[4].disabled=true;
-        x.options[5].disabled=true;
-        x.options[6].disabled=true;
-        x.options[7].disabled=true;
-        x.options[8].disabled=true;
-        x.options[9].disabled=true;
-        x.options[10].disabled=true;
-        x.options[11].disabled=true;
-        x.options[12].disabled=true;
-        x.options[13].disabled=true;
-        x.options[14].disabled=true;
-        x.options[15].disabled=true;
-        x.options[16].disabled=true;
-        x.options[17].disabled=true;
-        x.options[18].disabled=true;
-        x.options[19].disabled=true;
-        x.options[20].disabled=true;
-        x.options[21].disabled=true;
-        x.options[22].disabled=true;
-        x.options[23].disabled=true;
-        x.options[24].disabled=true;
-        x.options[3].selected=true;
-      }
-      else {
-        x.options[9].disabled=true;
-        x.options[10].disabled=true;
-        x.options[11].disabled=true;
-        x.options[12].disabled=true;
-        x.options[0].selected=true;
-      }
-    select_var();
-    }
-    function select_months()
-    {
-      var s1=document.getElementById("months");
-      if (s1.selectedIndex == 1) {
-        reset_months();
-      }
-      if (s1.selectedIndex == 0) {
-        select_all_months();
-      }
-      if (s1.selectedIndex == 2) {
-        reset_months();
-        document.getElementById('Jun').checked = true;
-        document.getElementById('Jul').checked = true;
-        document.getElementById('Aug').checked = true;
-      }
-      if (s1.selectedIndex == 3) {
-        reset_months();
-        document.getElementById('Sep').checked = true;
-        document.getElementById('Oct').checked = true;
-        document.getElementById('Nov').checked = true;
-      }
-      if (s1.selectedIndex == 4) {
-        reset_months();
-        document.getElementById('Dec').checked = true;
-        document.getElementById('Jan').checked = true;
-        document.getElementById('Feb').checked = true;
-      }
-      if (s1.selectedIndex == 5) {
-        reset_months();
-        document.getElementById('Mar').checked = true;
-        document.getElementById('Apr').checked = true;
-        document.getElementById('May').checked = true;
-      }
-    }
-    $(document).ready(function(){
-      $("#download_data").click(function(event) {
-        var durl = $("#data_url").val();
-        window.location.assign(durl);
-      });
-      $("#twodvarzonalmean").click(function(event) {
-		Response = null;
-      	if (no_month_check()) {
-           $("#Response").html("Error: please check at least one month.");
-           $("#Image").html("");
-           return;
-        } 
-        $("#Response").html("Calculating ...");
-        $("#data_url").html("Calculating ...");
-        $("#Image").html("");
-        var url = "http://" + window.location.hostname + ":9002/svc/twoDimZonalMean?";
-        var d1 = $("#data").val();
-        var model1 = d1.replace("/", "_");
-        var arglist = "";
-        arglist = arglist.concat("model=");
-        arglist = arglist.concat(model1);
-        var v1 = $("#var").val();
-        arglist = arglist.concat("&var=");
-        arglist = arglist.concat(variable);
-        var t0 = $("#t0").val();
-        var t1 = $("#t1").val();
-        t0 = t0.replace("-", "");
-        t1 = t1.replace("-", "");
-        arglist = arglist.concat("&start_time=");
-        arglist = arglist.concat(t0);
-        arglist = arglist.concat("&end_time=");
-        arglist = arglist.concat(t1);
-        var lat0 = $("#lat0").val();
-        var lat1 = $("#lat1").val();
-        arglist = arglist.concat("&lat1=");
-        arglist = arglist.concat(lat0);
-        arglist = arglist.concat("&lat2=");
-        arglist = arglist.concat(lat1);
-        var s1 = document.getElementById('months');
-        var month_str = "";
-        var mm = document.getElementById('Jan');
-        if (mm.checked == true)
-          month_str = month_str.concat(",1");
-        var mm = document.getElementById('Feb');
-        if (mm.checked == true)
-          month_str = month_str.concat(",2");
-        var mm = document.getElementById('Mar');
-        if (mm.checked == true)
-          month_str = month_str.concat(",3");
-        var mm = document.getElementById('Apr');
-        if (mm.checked == true)
-          month_str = month_str.concat(",4");
-        var mm = document.getElementById('May');
-        if (mm.checked == true)
-          month_str = month_str.concat(",5");
-        var mm = document.getElementById('Jun');
-        if (mm.checked == true)
-          month_str = month_str.concat(",6");
-        var mm = document.getElementById('Jul');
-        if (mm.checked == true)
-          month_str = month_str.concat(",7");
-        var mm = document.getElementById('Aug');
-        if (mm.checked == true)
-          month_str = month_str.concat(",8");
-        var mm = document.getElementById('Sep');
-        if (mm.checked == true)
-          month_str = month_str.concat(",9");
-        var mm = document.getElementById('Oct');
-        if (mm.checked == true)
-          month_str = month_str.concat(",10");
-        var mm = document.getElementById('Nov');
-        if (mm.checked == true)
-          month_str = month_str.concat(",11");
-        var mm = document.getElementById('Dec');
-        if (mm.checked == true)
-          month_str = month_str.concat(",12");
-        month_str = month_str.substr(1);
-        arglist = arglist.concat("&months=");
-        arglist = arglist.concat(month_str);
-        arglist = arglist.concat("&scale=");
-        var y = document.getElementById("radioLin").checked;
-        if (y == true)
-          arglist = arglist.concat('0');
-        else
-          arglist = arglist.concat('2');
-        var purpose = $("#purpose").val();
-        arglist = arglist.concat("&purpose=");
-        arglist = arglist.concat(purpose);
-        url = url + encodeURI(arglist);
-        var urlTimeBounds = "http://" + window.location.hostname + ":9002/svc/time_bounds?";
-        var arglistTB = "";
-        arglistTB = arglistTB.concat("serviceType=");
-        arglistTB = arglistTB.concat("1");
-        arglistTB = arglistTB.concat("&source=");
-        arglistTB = arglistTB.concat(d1);
-        arglistTB = arglistTB.concat("&var=");
-        arglistTB = arglistTB.concat(variable);
-        urlTimeBounds = urlTimeBounds + encodeURI(arglistTB);
-        $.ajax({
-            type: "GET",
-            url: urlTimeBounds,
-            dataType: "json",
-            data: null,
-            success: function(data, textStatus, xhr) {
-                Response = data;
-                if (data.success == false) {
-                    Response = null;
-                    var text = JSON.stringify(data, null, 4);
-                    text = "Error in backend: <br>" + text; 
-                    $("#Response").html(text);
-                    $("#data_url").html(text);
-                    return;
-                }
-                var text = JSON.stringify(data, null, 4);
-                var tb = data.time_bounds;
-                var bds = String(tb).split(",");
-                var lowerT = parseInt(bds[0]);
-                var upperT = parseInt(bds[1]);
-                var t0I = parseInt(t0);
-                var t1I = parseInt(t1);
-                if ( lowerT == 0 && upperT ==0 ) {
-                  alert("We do not have data for this source and variable configuration.");
-                  return;
-                }
-                if (t0I < lowerT && t1I < lowerT ||
-                    t0I > upperT && t1I > upperT) {
-                  alert("We do not have data that span your time range. Try the range inside ["+lowerT+", "+upperT+"].");
-                  return;
-                }
-                if (t0I < lowerT && t1I <= upperT) {
-                  alert("Your start year-month is out of bound. It has to be in or later than " + lowerT +
-                        ". We will use the range ["+lowerT+", "+t1I+"] for you.");
-                }
-                if (t1I > upperT && t0I >= lowerT) {
-                  alert("Your end year-month is out of bound. It has to be in or earlier than " + upperT +
-                        ". We will use the range ["+t0I+", "+upperT+"] for you.");
-                }
-                if (t0I < lowerT && t1I > upperT ) {
-                  alert("Both of your start and end year-months are out of bounds. They have to be in or earlier than " + upperT +
-                        ", and in or later than " + lowerT + ". We will use the range ["+lowerT+", "+upperT+"] for you.");
-                }
-            },
-            error: function(xhr, textStatus, errorThrown) {
-				$("#Response").html("error!");
-				$("#data_url").html("error!");
-            },
-            complete: function(xhr, textStatus) {
-            }
-        });
-        $.ajax({
-            type: "GET",
-            url: url,
-            dataType: "json",
-            data: null,
-            success: function(data, textStatus, xhr) {
-                Response = data;
-                if (data.success == false) {
-                    Response = null;
-                    var text = JSON.stringify(data, null, 4);
-                    text = "Error in backend: <br>" + text; 
-                    $("#Response").html(text);
-                    $("#data_url").html(text);
-                    return;
-                }
-                var text = JSON.stringify(data, null, 4);
-                $("#Response").html(text);
-                var html1 = "<img src='"+data.url+"' width='680' style=‘display: block; margin: 0 auto;’/>";
-                $("#Image").html(html1);
-                $("#data_url").html(data.dataUrl);
-                enable_download_button();
-            },
-            error: function(xhr, textStatus, errorThrown) {
-		$("#Response").html("error!");
-                $("#data_url").html("error!");
-            },
-            complete: function(xhr, textStatus) {
-            }
-        });
-      });
-    });
-  </script>
-<optgroup label="Observation">
-	<option>NASA/MODIS</option>
-	<option>NASA/AMSRE</option>
-	<option>NASA/TRMM</option>
-	<option>NASA/GPCP</option>
-	<option>NASA/QuikSCAT</option>
-	<option>NASA/AVISO</option>
-	<option>NASA/GRACE</option>
-	<option>NOAA/NODC</option>
-	<option>NASA/CERES</option>
-</optgroup>
-<optgroup label="Model: Historical">
-	<option>CCCMA/CANESM2</option>
-	<option>GFDL/ESM2G</option>
-	<option>GISS/E2-H</option>
-	<option>GISS/E2-R</option>
-	<option>NCAR/CAM5</option>
-	<option>NCC/NORESM</option>
-	<option>UKMO/HadGEM2-ES</option>
-</optgroup>
-<optgroup label="Model: AMIP">
-	<option>CCCMA/CANAM4</option>
-	<option>CSIRO/MK3.6</option>
-	<option>GFDL/CM3</option>
-	<option>IPSL/CM5A-LR</option>
-	<option>MIROC/MIROC5</option>
-	<option>UKMO/HadGEM2-A</option>
-</optgroup>
-<optgroup label="Reanalysis">
-	<option>ECMWF/interim</option>
-</optgroup>
-</select>
-</td>
-<td>variable name:</td>
-<td><select name="var" , id="var" onchange="select_var()">
-		<option>Precipitation Flux</option>
-		<option>Total Cloud Fraction</option>
-		<option>Surface Temperature</option>
-		<option>Sea Surface Temperature</option>
-		<option>Eastward Near-Surface Wind</option>
-		<option>Northward Near-Surface Wind</option>
-		<option>Near-Surface Wind Speed</option>
-		<option>Sea Surface Height</option>
-		<option>Leaf Area Index</option>
-		<option>Equivalent Water Height Over Land</option>
-		<option>Equivalent Water Height Over Ocean</option>
-		<option>Ocean Heat Content Anomaly within 700 m Depth</option>
-		<option>Ocean Heat Content Anomaly within 2000 m Depth</option>
-		<option>Surface Downwelling Longwave Radiation</option>
-		<option>Surface Downwelling Shortwave Radiation</option>
-		<option>Surface Upwelling Longwave Radiation</option>
-		<option>Surface Upwelling Shortwave Radiation</option>
-		<option>Surface Downwelling Clear-Sky Longwave Radiation</option>
-		<option>Surface Downwelling Clear-Sky Shortwave Radiation</option>
-		<option>Surface Upwelling Clear-Sky Shortwave Radiation</option>
-		<option>TOA Incident Shortwave Radiation</option>
-		<option>TOA Outgoing Longwave Radiation</option>
-		<option>TOA Outgoing Shortwave Radiation</option>
-		<option>TOA Outgoing Clear-Sky Longwave Radiation</option>
-		<option>TOA Outgoing Clear-Sky Shortwave Radiation</option>
-</select></td>
-</tr>
-<tr>
-	<td>start year-month:</td>
-	<td><input id="t0" value="2004-01" alt="start" /></td>
-	<td>end year-month:</td>
-	<td><input id="t1" value="2004-12" alt="end" /></td>
-</tr>
-<tr>
-	<td>select months:</td>
-	<td><select name="months" id="months" onchange="select_months()">
-			<option id="all">select all</option>
-			<option id="none">select none</option>
-			<option id="summer">Summer:Jun-Jul-Aug</option>
-			<option id="autum">Autumn:Sep-Oct-Nov</option>
-			<option id="winter">Winter:Dec-Jan-Feb</option>
-			<option id="spring">Spring:Mar-Apr-May</option>
-	</select></td>
-	<td></td>
-	<td>
-</tr>
-<tr>
-	<td><label><input type="checkbox" name="option1" id="Jan"
-			value="Jan" /> Jan<br></label> <label><input type="checkbox"
-			name="option1" id="Feb" value="Feb" /> Feb<br></label> <label><input
-			type="checkbox" name="option1" id="Mar" value="Mar" /> Mar<br></label>
-	</td>
-	<td><label><input type="checkbox" name="option1" id="Apr"
-			value="Apr" /> Apr<br></label> <label><input type="checkbox"
-			name="option1" id="May" value="May" /> May<br></label> <label><input
-			type="checkbox" name="option1" id="Jun" value="Jun" /> Jun<br></label>
-	</td>
-	<td><label><input type="checkbox" name="option1" id="Jul"
-			value="Jul" /> Jul<br></label> <label><input type="checkbox"
-			name="option1" id="Aug" value="Aug" /> Aug<br></label> <label><input
-			type="checkbox" name="option1" id="Sep" value="Sep" /> Sep<br></label>
-	</td>
-	<td><label><input type="checkbox" name="option1" id="Oct"
-			value="Oct" /> Oct<br></label> <label><input type="checkbox"
-			name="option1" id="Nov" value="Nov" /> Nov<br></label> <label><input
-			type="checkbox" name="option1" id="Dec" value="Dec" /> Dec<br></label>
-	</td>
-</tr>
-<tr>
-	<td>start lat (deg):</td>
-	<td><input id="lat0" value="-90" /></td>
-	<td>end lat (deg):</td>
-	<td><input id="lat1" value="90" /></td>
-</tr>
-<tr>
-	<td colspan="1">variable scale:</td>
-	<td colspan="3">
-		<form>
-			<input type="radio" name="scale1" value="linear" id="radioLin"
-				checked>linear <input type="radio" name="scale1"
-				value="logarithmic" id="radioLog">logarithmic
-		</form>
-	</td>
-</tr>
-<tr>
-	<td colspan="1">Execution purpose</td>
-	<td colspan="3">
-		<form>
-			<textarea name="purpose" id="purpose" rows="4" cols="50"> </textarea>
-		</form>
-	</td>
-</tr>
-<tr>
-	<td colspan="2" align="center"><input id="twodvarzonalmean"
-		type="submit" value="            Run  Again            "
-		style="height: 28px" /></td>
-	<form>
-		<td colspan="2" align="center"><input id="download_data"
-			type="button" value="Download Data" style="height: 28px" /></td>
-	</form>
-</tr>
-<td colspan="4">
-	<div id="Image">Image Here</div>
-</td>
-</tr>
-<tr>
-	<td colspan="4" align="center"><textarea readonly id="data_url"
-			cols="89" rows="2">Data URL Here</textarea></td>
-</tr>
-<tr>
-	<td colspan="4" align="center"><textarea readonly id="Response"
-			cols="89" rows="6">Service Response Text Here</textarea></td>
-</tr>
-</p>
-</table>
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/c64222a3/app/views/climate/twoDVariableZonelMean.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/twoDVariableZonelMean.scala.html b/app/views/climate/twoDVariableZonelMean.scala.html
new file mode 100644
index 0000000..74bb104
--- /dev/null
+++ b/app/views/climate/twoDVariableZonelMean.scala.html
@@ -0,0 +1,988 @@
+@(parameters: metadata.TwoDVarZonalMean) @import helper._
+<link rel="stylesheet"
+	href='@routes.Assets.at("stylesheets/livefitler.css")'>
+@scripts = {
+<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
+<script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
+<script type="text/javascript"
+	src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
+<script type="text/javascript"
+	src="https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js"></script>
+<script type="
+	text/javascript"
+	src='@routes.Assets.at("javascripts/json2.js")'></script>
+<script
+	type='text/javascript" src="@routes.Assets.at("javascripts/xmisc.js")'></script>
+<script type="text/javascript">
+    var Response = null;
+    var variable = "";
+    window.onload = function() {
+      changeDataSource(); 
+      select_data();
+      changeVariableName();
+      select_var();
+      var z=document.getElementById("download_data");
+      z.disabled=false;
+      $('#t0').val($('#startYearMonth').text());
+      $('#t1').val($('#endYearMonth').text());
+      var selectMonths = $('#selectMonths').text();
+      $('#months option:contains('+selectMonths+')').prop({selected: true});
+      select_months();
+      select_monthsByPara();
+      $('#lat0').val($('#startLat').text());
+      $('#lat1').val($('#endLat').text());
+      var variableScale = $('#variableScale').text();
+      if(variableScale == "0") {
+        $('#radioLin').prop( "checked", true );
+        $('#radioLog').prop( "checked", false );
+      }
+      else {
+        $('#radioLin').prop( "checked", false );
+        $('#radioLog').prop( "checked", true );
+      }
+      $('#purpose').html($('#executionPurpose').text());
+      var imageUrl = $('#image').text();
+      $('#Image').html('<img src="'+imageUrl+'" width=680 />');
+      $('#data_url').html($('#dataURL').text());
+      $('#Response').html($('serviceResponseText').text());
+    }
+    function changeDataSource(){
+    	var dataSource = $('#dataSource').text();
+     	var x = document.getElementById("data");
+     	if(dataSource == "NASA_MODIS" ){
+     		x.options[0].selected=true;
+     	}
+     	else if(dataSource == "NASA_AMSRE" ){
+     		x.options[1].selected=true;
+     	}
+     	else if(dataSource == "NASA_TRMM" ){
+     		x.options[2].selected=true;
+     	}
+     	else if(dataSource == "NASA_GPCP" ){
+     		x.options[3].selected=true;
+     	}
+     	else if(dataSource == "NASA_QuikSCAT" ){
+     		x.options[4].selected=true;
+     	}
+     	else if(dataSource == "NASA_AVISO" ){
+     		x.options[5].selected=true;
+     	}
+     	else if(dataSource == "NASA_GRACE" ){
+     		x.options[6].selected=true;
+     	}
+     	else if(dataSource == "NOAA_NODC" ){
+     		x.options[7].selected=true;
+     	}
+     	else if(dataSource == "NASA_CERES" ){
+     		x.options[8].selected=true;
+     	}
+     	else if(dataSource == "CCCMA_CANESM2" ){
+     		x.options[9].selected=true;
+     	}
+     	else if(dataSource == "GFDL_ESM2G" ){
+     		x.options[10].selected=true;
+     	}
+     	else if(dataSource == "GISS_E2-H" ){
+     		x.options[11].selected=true;
+     	}
+     	else if(dataSource == "GISS_E2-R" ){
+     		x.options[12].selected=true;
+     	}
+     	else if(dataSource == "NCAR_CAM5" ){
+     		x.options[13].selected=true;
+     	}
+     	else if(dataSource == "NCC_NORESM" ){
+     		x.options[14].selected=true;
+     	}
+     	else if(dataSource == "UKMO_HadGEM2-ES" ){
+     		x.options[15].selected=true;
+     	}
+     	else if(dataSource == "CCCMA_CANAM4" ){
+     		x.options[16].selected=true;
+     	}
+     	else if(dataSource == "CSIRO_MK3.6" ){
+     		x.options[17].selected=true;
+     	}
+     	else if(dataSource == "GFDL_CM3" ){
+     		x.options[18].selected=true;
+     	}
+     	else if(dataSource == "IPSL_CM5A-LR" ){
+     		x.options[19].selected=true;
+     	}
+     	else if(dataSource == "MIROC_MIROC5" ){
+     		x.options[20].selected=true;
+     	}
+     	else if(dataSource == "UKMO_HADGEM2-A" ){
+     		x.options[21].selected=true;
+     	}
+     	else if(dataSource == "ECMWF_interim" ){
+     		x.options[22].selected=true;
+     	}
+    }
+    function changeVariableName(){
+    	var var_string = $('#variableName').text();
+     	var x=document.getElementById("var");
+     	if (var_string == "clt")
+     		x.options[1].selected=true;
+        else if (var_string == "ts")
+        	x.options[2].selected=true;
+        else if (var_string == "tos")
+        	x.options[3].selected=true;
+        else if (var_string == "pr")
+        	x.options[0].selected=true;
+        else if (var_string == "uas")
+        	x.options[4].selected=true;
+        else if (var_string == "vas")
+        	x.options[5].selected=true;
+        else if (var_string == "sfcWind")
+        	x.options[6].selected=true;
+        else if (var_string == "zos")
+        	x.options[7].selected=true;
+        else if (var_string == "lai")
+        	x.options[8].selected=true;
+        else if (var_string == "zl")
+        	x.options[9].selected=true;
+        else if (var_string == "zo")
+        	x.options[10].selected=true;
+        else if (var_string == "ohc700")
+        	x.options[11].selected=true;
+        else if (var_string == "ohc2000")
+        	x.options[12].selected=true;
+        else if (var_string == "rlds")
+        	x.options[13].selected=true;
+        else if (var_string == "rsds")
+        	x.options[14].selected=true;
+        else if (var_string == "rlus")
+        	x.options[15].selected=true;
+        else if (var_string == "rsus")
+        	x.options[16].selected=true;
+        else if (var_string == "rldscs")
+        	x.options[17].selected=true;
+        else if (var_string == "rsdscs")
+        	x.options[18].selected=true;
+        else if (var_string == "rsuscs")
+        	x.options[19].selected=true;
+        else if (var_string == "rsdt")
+        	x.options[20].selected=true;
+        else if (var_string == "rlutcs")
+        	x.options[21].selected=true;
+        else if (var_string == "rlut")
+        	x.options[22].selected=true;
+        else if (var_string == "rsutcs")
+        	x.options[23].selected=true;
+        else if (var_string == "rsut")
+        	x.options[24].selected=true;
+    }
+    function select_monthsByPara(){
+    	var monthsByPara = $('#monthsPara').text();
+    	if(monthsByPara.search("jan")>-1){
+    		document.getElementById('Jan').checked = true;
+    	}
+    	if(monthsByPara.search("feb")>-1){
+    		document.getElementById('Feb').checked = true;
+    	}
+    	if(monthsByPara.search("mar")>-1){
+    		document.getElementById('Mar').checked = true;
+    	}
+    	if(monthsByPara.search("apr")>-1){
+    		document.getElementById('Apr').checked = true;
+    	}
+    	if(monthsByPara.search("may")>-1){
+    		document.getElementById('May').checked = true;
+    	}
+    	if(monthsByPara.search("jun")>-1){
+    		document.getElementById('Jun').checked = true;
+    	}
+    	if(monthsByPara.search("jul")>-1){
+    		document.getElementById('Jul').checked = true;
+    	}
+    	if(monthsByPara.search("aug")>-1){
+    		document.getElementById('Aug').checked = true;
+    	}
+    	if(monthsByPara.search("sep")>-1){
+    		document.getElementById('Sep').checked = true;
+    	}
+    	if(monthsByPara.search("oct")>-1){
+    		document.getElementById('Oct').checked = true;
+    	}
+    	if(monthsByPara.search("nov")>-1){
+    		document.getElementById('Nov').checked = true;
+    	}
+    	if(monthsByPara.search("dec")>-1){
+    		document.getElementById('Dec').checked = true;
+    	}
+    }
+    function disable_download_button()
+    {
+    }
+    function enable_download_button()
+    {
+      var x=document.getElementById("download_data");
+      x.disabled=false;
+    }
+    function select_all_months()
+    {
+        document.getElementById('Jan').checked = true;
+        document.getElementById('Feb').checked = true;
+        document.getElementById('Mar').checked = true;
+        document.getElementById('Apr').checked = true;
+        document.getElementById('May').checked = true;
+        document.getElementById('Jun').checked = true;
+        document.getElementById('Jul').checked = true;
+        document.getElementById('Aug').checked = true;
+        document.getElementById('Sep').checked = true;
+        document.getElementById('Oct').checked = true;
+        document.getElementById('Nov').checked = true;
+        document.getElementById('Dec').checked = true;
+    }
+    function no_month_check()
+    {
+        if (document.getElementById('Jan').checked == false &&
+           document.getElementById('Feb').checked == false &&
+           document.getElementById('Mar').checked == false &&
+           document.getElementById('Apr').checked == false &&
+           document.getElementById('May').checked == false &&
+           document.getElementById('Jun').checked == false &&
+           document.getElementById('Jul').checked == false &&
+           document.getElementById('Aug').checked == false &&
+           document.getElementById('Sep').checked == false &&
+           document.getElementById('Oct').checked == false &&
+           document.getElementById('Nov').checked == false &&
+           document.getElementById('Dec').checked == false) {
+           return true;
+          }
+        else
+           return false;
+    }
+    function reset_months()
+    {
+        document.getElementById('Jan').checked = false;
+        document.getElementById('Feb').checked = false;
+        document.getElementById('Mar').checked = false;
+        document.getElementById('Apr').checked = false;
+        document.getElementById('May').checked = false;
+        document.getElementById('Jun').checked = false;
+        document.getElementById('Jul').checked = false;
+        document.getElementById('Aug').checked = false;
+        document.getElementById('Sep').checked = false;
+        document.getElementById('Oct').checked = false;
+        document.getElementById('Nov').checked = false;
+        document.getElementById('Dec').checked = false;
+    }
+    function reset_vars()
+    {
+      var x=document.getElementById("var");
+      x.options[0].disabled=false;
+      x.options[1].disabled=false;
+      x.options[2].disabled=false;
+      x.options[3].disabled=false;
+      x.options[4].disabled=false;
+      x.options[5].disabled=false;
+      x.options[6].disabled=false;
+      x.options[7].disabled=false;
+      x.options[8].disabled=false;
+      x.options[9].disabled=false;
+      x.options[10].disabled=false;
+      x.options[11].disabled=false;
+      x.options[12].disabled=false;
+      x.options[13].disabled=false;
+      x.options[14].disabled=false;
+      x.options[15].disabled=false;
+      x.options[16].disabled=false;
+      x.options[17].disabled=false;
+      x.options[18].disabled=false;
+      x.options[19].disabled=false;
+      x.options[20].disabled=false;
+      x.options[21].disabled=false;
+      x.options[22].disabled=false;
+      x.options[23].disabled=false;
+      x.options[24].disabled=false;
+    }
+    function select_var()
+    {
+      var var_string = $("#var").val();
+      if (var_string == "Total Cloud Fraction")
+        variable = "clt";
+      else if (var_string == "Surface Temperature")
+        variable = "ts";
+      else if (var_string == "Sea Surface Temperature")
+        variable = "tos";
+      else if (var_string == "Precipitation Flux")
+        variable = "pr";
+      else if (var_string == "Eastward Near-Surface Wind")
+        variable = "uas";
+      else if (var_string == "Northward Near-Surface Wind")
+        variable = "vas";
+      else if (var_string == "Near-Surface Wind Speed")
+        variable = "sfcWind";
+      else if (var_string == "Sea Surface Height")
+        variable = "zos";
+      else if (var_string == "Leaf Area Index")
+        variable = "lai";
+      else if (var_string == "Equivalent Water Height Over Land")
+        variable = "zl";
+      else if (var_string == "Equivalent Water Height Over Ocean")
+        variable = "zo";
+      else if (var_string == "Ocean Heat Content Anomaly within 700 m Depth")
+        variable = "ohc700";
+      else if (var_string == "Ocean Heat Content Anomaly within 2000 m Depth")
+        variable = "ohc2000";
+      else if (var_string == "Surface Downwelling Longwave Radiation")
+        variable = "rlds";
+      else if (var_string == "Surface Downwelling Shortwave Radiation")
+        variable = "rsds";
+      else if (var_string == "Surface Upwelling Longwave Radiation")
+        variable = "rlus";
+      else if (var_string == "Surface Upwelling Shortwave Radiation")
+        variable = "rsus";
+      else if (var_string == "Surface Downwelling Clear-Sky Longwave Radiation")
+        variable = "rldscs";
+      else if (var_string == "Surface Downwelling Clear-Sky Shortwave Radiation")
+        variable = "rsdscs";
+      else if (var_string == "Surface Upwelling Clear-Sky Shortwave Radiation")
+        variable = "rsuscs";
+      else if (var_string == "TOA Incident Shortwave Radiation")
+        variable = "rsdt";
+      else if (var_string == "TOA Outgoing Clear-Sky Longwave Radiation")
+        variable = "rlutcs";
+      else if (var_string == "TOA Outgoing Longwave Radiation")
+        variable = "rlut";
+      else if (var_string == "TOA Outgoing Clear-Sky Shortwave Radiation")
+        variable = "rsutcs";
+      else if (var_string == "TOA Outgoing Shortwave Radiation")
+        variable = "rsut";
+    }
+    function select_data()
+    {
+      var data_string = $("#data").val();
+      var x=document.getElementById("var");
+      reset_vars();
+      if (data_string == "NASA/AMSRE") {
+        x.options[0].disabled=true;
+        x.options[1].disabled=true;
+        x.options[2].disabled=true;
+        x.options[4].disabled=true;
+        x.options[5].disabled=true;
+        x.options[6].disabled=true;
+        x.options[7].disabled=true;
+        x.options[8].disabled=true;
+        x.options[9].disabled=true;
+        x.options[10].disabled=true;
+        x.options[11].disabled=true;
+        x.options[12].disabled=true;
+        x.options[13].disabled=true;
+        x.options[14].disabled=true;
+        x.options[15].disabled=true;
+        x.options[16].disabled=true;
+        x.options[17].disabled=true;
+        x.options[18].disabled=true;
+        x.options[19].disabled=true;
+        x.options[20].disabled=true;
+        x.options[21].disabled=true;
+        x.options[22].disabled=true;
+        x.options[23].disabled=true;
+        x.options[24].disabled=true;
+        x.options[3].selected=true;
+      }
+      else if (data_string == "NASA/MODIS") {
+        x.options[0].disabled=true;
+        x.options[2].disabled=true;
+        x.options[3].disabled=true;
+        x.options[4].disabled=true;
+        x.options[5].disabled=true;
+        x.options[6].disabled=true;
+        x.options[7].disabled=true;
+        x.options[9].disabled=true;
+        x.options[10].disabled=true;
+        x.options[11].disabled=true;
+        x.options[12].disabled=true;
+        x.options[13].disabled=true;
+        x.options[14].disabled=true;
+        x.options[15].disabled=true;
+        x.options[16].disabled=true;
+        x.options[17].disabled=true;
+        x.options[18].disabled=true;
+        x.options[19].disabled=true;
+        x.options[20].disabled=true;
+        x.options[21].disabled=true;
+        x.options[22].disabled=true;
+        x.options[23].disabled=true;
+        x.options[24].disabled=true;
+        x.options[1].selected=true;
+      }
+      else if (data_string == "NASA/TRMM") {
+        x.options[0].selected=true;
+        x.options[1].disabled=true;
+        x.options[2].disabled=true;
+        x.options[3].disabled=true;
+        x.options[4].disabled=true;
+        x.options[5].disabled=true;
+        x.options[6].disabled=true;
+        x.options[7].disabled=true;
+        x.options[8].disabled=true;
+        x.options[9].disabled=true;
+        x.options[10].disabled=true;
+        x.options[11].disabled=true;
+        x.options[12].disabled=true;
+        x.options[13].disabled=true;
+        x.options[14].disabled=true;
+        x.options[15].disabled=true;
+        x.options[16].disabled=true;
+        x.options[17].disabled=true;
+        x.options[18].disabled=true;
+        x.options[19].disabled=true;
+        x.options[20].disabled=true;
+        x.options[21].disabled=true;
+        x.options[22].disabled=true;
+        x.options[23].disabled=true;
+        x.options[24].disabled=true;
+      }
+      else if (data_string == "NASA/GPCP") {
+        x.options[0].selected=true;
+        x.options[1].disabled=true;
+        x.options[2].disabled=true;
+        x.options[3].disabled=true;
+        x.options[4].disabled=true;
+        x.options[5].disabled=true;
+        x.options[6].disabled=true;
+        x.options[7].disabled=true;
+        x.options[8].disabled=true;
+        x.options[9].disabled=true;
+        x.options[10].disabled=true;
+        x.options[11].disabled=true;
+        x.options[12].disabled=true;
+        x.options[13].disabled=true;
+        x.options[14].disabled=true;
+        x.options[15].disabled=true;
+        x.options[16].disabled=true;
+        x.options[17].disabled=true;
+        x.options[18].disabled=true;
+        x.options[19].disabled=true;
+        x.options[20].disabled=true;
+        x.options[21].disabled=true;
+        x.options[22].disabled=true;
+        x.options[23].disabled=true;
+        x.options[24].disabled=true;
+      }
+      else if (data_string == "NASA/QuikSCAT") {
+        x.options[0].disabled=true;
+        x.options[1].disabled=true;
+        x.options[2].disabled=true;
+        x.options[3].disabled=true;
+        x.options[7].disabled=true;
+        x.options[8].disabled=true;
+        x.options[9].disabled=true;
+        x.options[10].disabled=true;
+        x.options[11].disabled=true;
+        x.options[12].disabled=true;
+        x.options[13].disabled=true;
+        x.options[14].disabled=true;
+        x.options[15].disabled=true;
+        x.options[16].disabled=true;
+        x.options[17].disabled=true;
+        x.options[18].disabled=true;
+        x.options[19].disabled=true;
+        x.options[20].disabled=true;
+        x.options[21].disabled=true;
+        x.options[22].disabled=true;
+        x.options[23].disabled=true;
+        x.options[24].disabled=true;
+        x.options[4].selected=true;
+      }
+      else if (data_string == "NASA/AVISO") {
+        x.options[0].disabled=true;
+        x.options[1].disabled=true;
+        x.options[2].disabled=true;
+        x.options[3].disabled=true;
+        x.options[4].disabled=true;
+        x.options[5].disabled=true;
+        x.options[6].disabled=true;
+        x.options[8].disabled=true;
+        x.options[9].disabled=true;
+        x.options[10].disabled=true;
+        x.options[11].disabled=true;
+        x.options[12].disabled=true;
+        x.options[13].disabled=true;
+        x.options[14].disabled=true;
+        x.options[15].disabled=true;
+        x.options[16].disabled=true;
+        x.options[17].disabled=true;
+        x.options[18].disabled=true;
+        x.options[19].disabled=true;
+        x.options[20].disabled=true;
+        x.options[21].disabled=true;
+        x.options[22].disabled=true;
+        x.options[23].disabled=true;
+        x.options[24].disabled=true;
+        x.options[7].selected=true;
+      }
+      else if (data_string == "NASA/GRACE") {
+        x.options[0].disabled=true;
+        x.options[1].disabled=true;
+        x.options[2].disabled=true;
+        x.options[3].disabled=true;
+        x.options[4].disabled=true;
+        x.options[5].disabled=true;
+        x.options[6].disabled=true;
+        x.options[7].disabled=true;
+        x.options[8].disabled=true;
+        x.options[11].disabled=true;
+        x.options[12].disabled=true;
+        x.options[13].disabled=true;
+        x.options[14].disabled=true;
+        x.options[15].disabled=true;
+        x.options[16].disabled=true;
+        x.options[17].disabled=true;
+        x.options[18].disabled=true;
+        x.options[19].disabled=true;
+        x.options[20].disabled=true;
+        x.options[21].disabled=true;
+        x.options[22].disabled=true;
+        x.options[23].disabled=true;
+        x.options[24].disabled=true;
+        x.options[9].selected=true;
+      }
+      else if (data_string == "NOAA/NODC") {
+        x.options[0].disabled=true;
+        x.options[1].disabled=true;
+        x.options[2].disabled=true;
+        x.options[3].disabled=true;
+        x.options[4].disabled=true;
+        x.options[5].disabled=true;
+        x.options[6].disabled=true;
+        x.options[7].disabled=true;
+        x.options[8].disabled=true;
+        x.options[9].disabled=true;
+        x.options[10].disabled=true;
+        x.options[13].disabled=true;
+        x.options[14].disabled=true;
+        x.options[15].disabled=true;
+        x.options[16].disabled=true;
+        x.options[17].disabled=true;
+        x.options[18].disabled=true;
+        x.options[19].disabled=true;
+        x.options[20].disabled=true;
+        x.options[21].disabled=true;
+        x.options[22].disabled=true;
+        x.options[23].disabled=true;
+        x.options[24].disabled=true;
+        x.options[11].selected=true;
+      }
+      else if (data_string == "NASA/CERES") {
+        x.options[0].disabled=true;
+        x.options[1].disabled=true;
+        x.options[2].disabled=true;
+        x.options[3].disabled=true;
+        x.options[4].disabled=true;
+        x.options[5].disabled=true;
+        x.options[6].disabled=true;
+        x.options[7].disabled=true;
+        x.options[8].disabled=true;
+        x.options[9].disabled=true;
+        x.options[10].disabled=true;
+        x.options[11].disabled=true;
+        x.options[12].disabled=true;
+        x.options[13].selected=true;
+      }
+      else if (data_string == "ECMWF/interim") {
+        x.options[0].disabled=true;
+        x.options[1].disabled=true;
+        x.options[2].disabled=true;
+        x.options[4].disabled=true;
+        x.options[5].disabled=true;
+        x.options[6].disabled=true;
+        x.options[7].disabled=true;
+        x.options[8].disabled=true;
+        x.options[9].disabled=true;
+        x.options[10].disabled=true;
+        x.options[11].disabled=true;
+        x.options[12].disabled=true;
+        x.options[13].disabled=true;
+        x.options[14].disabled=true;
+        x.options[15].disabled=true;
+        x.options[16].disabled=true;
+        x.options[17].disabled=true;
+        x.options[18].disabled=true;
+        x.options[19].disabled=true;
+        x.options[20].disabled=true;
+        x.options[21].disabled=true;
+        x.options[22].disabled=true;
+        x.options[23].disabled=true;
+        x.options[24].disabled=true;
+        x.options[3].selected=true;
+      }
+      else {
+        x.options[9].disabled=true;
+        x.options[10].disabled=true;
+        x.options[11].disabled=true;
+        x.options[12].disabled=true;
+        x.options[0].selected=true;
+      }
+    select_var();
+    }
+    function select_months()
+    {
+      var s1=document.getElementById("months");
+      if (s1.selectedIndex == 1) {
+        reset_months();
+      }
+      if (s1.selectedIndex == 0) {
+        select_all_months();
+      }
+      if (s1.selectedIndex == 2) {
+        reset_months();
+        document.getElementById('Jun').checked = true;
+        document.getElementById('Jul').checked = true;
+        document.getElementById('Aug').checked = true;
+      }
+      if (s1.selectedIndex == 3) {
+        reset_months();
+        document.getElementById('Sep').checked = true;
+        document.getElementById('Oct').checked = true;
+        document.getElementById('Nov').checked = true;
+      }
+      if (s1.selectedIndex == 4) {
+        reset_months();
+        document.getElementById('Dec').checked = true;
+        document.getElementById('Jan').checked = true;
+        document.getElementById('Feb').checked = true;
+      }
+      if (s1.selectedIndex == 5) {
+        reset_months();
+        document.getElementById('Mar').checked = true;
+        document.getElementById('Apr').checked = true;
+        document.getElementById('May').checked = true;
+      }
+    }
+    $(document).ready(function(){
+      $("#download_data").click(function(event) {
+        var durl = $("#data_url").val();
+        window.location.assign(durl);
+      });
+      $("#twodvarzonalmean").click(function(event) {
+		Response = null;
+      	if (no_month_check()) {
+           $("#Response").html("Error: please check at least one month.");
+           $("#Image").html("");
+           return;
+        } 
+        $("#Response").html("Calculating ...");
+        $("#data_url").html("Calculating ...");
+        $("#Image").html("");
+        var url = "http://" + window.location.hostname + ":9002/svc/twoDimZonalMean?";
+        var d1 = $("#data").val();
+        var model1 = d1.replace("/", "_");
+        var arglist = "";
+        arglist = arglist.concat("model=");
+        arglist = arglist.concat(model1);
+        var v1 = $("#var").val();
+        arglist = arglist.concat("&var=");
+        arglist = arglist.concat(variable);
+        var t0 = $("#t0").val();
+        var t1 = $("#t1").val();
+        t0 = t0.replace("-", "");
+        t1 = t1.replace("-", "");
+        arglist = arglist.concat("&start_time=");
+        arglist = arglist.concat(t0);
+        arglist = arglist.concat("&end_time=");
+        arglist = arglist.concat(t1);
+        var lat0 = $("#lat0").val();
+        var lat1 = $("#lat1").val();
+        arglist = arglist.concat("&lat1=");
+        arglist = arglist.concat(lat0);
+        arglist = arglist.concat("&lat2=");
+        arglist = arglist.concat(lat1);
+        var s1 = document.getElementById('months');
+        var month_str = "";
+        var mm = document.getElementById('Jan');
+        if (mm.checked == true)
+          month_str = month_str.concat(",1");
+        var mm = document.getElementById('Feb');
+        if (mm.checked == true)
+          month_str = month_str.concat(",2");
+        var mm = document.getElementById('Mar');
+        if (mm.checked == true)
+          month_str = month_str.concat(",3");
+        var mm = document.getElementById('Apr');
+        if (mm.checked == true)
+          month_str = month_str.concat(",4");
+        var mm = document.getElementById('May');
+        if (mm.checked == true)
+          month_str = month_str.concat(",5");
+        var mm = document.getElementById('Jun');
+        if (mm.checked == true)
+          month_str = month_str.concat(",6");
+        var mm = document.getElementById('Jul');
+        if (mm.checked == true)
+          month_str = month_str.concat(",7");
+        var mm = document.getElementById('Aug');
+        if (mm.checked == true)
+          month_str = month_str.concat(",8");
+        var mm = document.getElementById('Sep');
+        if (mm.checked == true)
+          month_str = month_str.concat(",9");
+        var mm = document.getElementById('Oct');
+        if (mm.checked == true)
+          month_str = month_str.concat(",10");
+        var mm = document.getElementById('Nov');
+        if (mm.checked == true)
+          month_str = month_str.concat(",11");
+        var mm = document.getElementById('Dec');
+        if (mm.checked == true)
+          month_str = month_str.concat(",12");
+        month_str = month_str.substr(1);
+        arglist = arglist.concat("&months=");
+        arglist = arglist.concat(month_str);
+        arglist = arglist.concat("&scale=");
+        var y = document.getElementById("radioLin").checked;
+        if (y == true)
+          arglist = arglist.concat('0');
+        else
+          arglist = arglist.concat('2');
+        var purpose = $("#purpose").val();
+        arglist = arglist.concat("&purpose=");
+        arglist = arglist.concat(purpose);
+        url = url + encodeURI(arglist);
+        var urlTimeBounds = "http://" + window.location.hostname + ":9002/svc/time_bounds?";
+        var arglistTB = "";
+        arglistTB = arglistTB.concat("serviceType=");
+        arglistTB = arglistTB.concat("1");
+        arglistTB = arglistTB.concat("&source=");
+        arglistTB = arglistTB.concat(d1);
+        arglistTB = arglistTB.concat("&var=");
+        arglistTB = arglistTB.concat(variable);
+        urlTimeBounds = urlTimeBounds + encodeURI(arglistTB);
+        $.ajax({
+            type: "GET",
+            url: urlTimeBounds,
+            dataType: "json",
+            data: null,
+            success: function(data, textStatus, xhr) {
+                Response = data;
+                if (data.success == false) {
+                    Response = null;
+                    var text = JSON.stringify(data, null, 4);
+                    text = "Error in backend: <br>" + text; 
+                    $("#Response").html(text);
+                    $("#data_url").html(text);
+                    return;
+                }
+                var text = JSON.stringify(data, null, 4);
+                var tb = data.time_bounds;
+                var bds = String(tb).split(",");
+                var lowerT = parseInt(bds[0]);
+                var upperT = parseInt(bds[1]);
+                var t0I = parseInt(t0);
+                var t1I = parseInt(t1);
+                if ( lowerT == 0 && upperT ==0 ) {
+                  alert("We do not have data for this source and variable configuration.");
+                  return;
+                }
+                if (t0I < lowerT && t1I < lowerT ||
+                    t0I > upperT && t1I > upperT) {
+                  alert("We do not have data that span your time range. Try the range inside ["+lowerT+", "+upperT+"].");
+                  return;
+                }
+                if (t0I < lowerT && t1I <= upperT) {
+                  alert("Your start year-month is out of bound. It has to be in or later than " + lowerT +
+                        ". We will use the range ["+lowerT+", "+t1I+"] for you.");
+                }
+                if (t1I > upperT && t0I >= lowerT) {
+                  alert("Your end year-month is out of bound. It has to be in or earlier than " + upperT +
+                        ". We will use the range ["+t0I+", "+upperT+"] for you.");
+                }
+                if (t0I < lowerT && t1I > upperT ) {
+                  alert("Both of your start and end year-months are out of bounds. They have to be in or earlier than " + upperT +
+                        ", and in or later than " + lowerT + ". We will use the range ["+lowerT+", "+upperT+"] for you.");
+                }
+            },
+            error: function(xhr, textStatus, errorThrown) {
+				$("#Response").html("error!");
+				$("#data_url").html("error!");
+            },
+            complete: function(xhr, textStatus) {
+            }
+        });
+        $.ajax({
+            type: "GET",
+            url: url,
+            dataType: "json",
+            data: null,
+            success: function(data, textStatus, xhr) {
+                Response = data;
+                if (data.success == false) {
+                    Response = null;
+                    var text = JSON.stringify(data, null, 4);
+                    text = "Error in backend: <br>" + text; 
+                    $("#Response").html(text);
+                    $("#data_url").html(text);
+                    return;
+                }
+                var text = JSON.stringify(data, null, 4);
+                $("#Response").html(text);
+                var html1 = "<img src='"+data.url+"' width='680' style=‘display: block; margin: 0 auto;’/>";
+                $("#Image").html(html1);
+                $("#data_url").html(data.dataUrl);
+                enable_download_button();
+            },
+            error: function(xhr, textStatus, errorThrown) {
+		$("#Response").html("error!");
+                $("#data_url").html("error!");
+            },
+            complete: function(xhr, textStatus) {
+            }
+        });
+      });
+    });
+  </script>
+<optgroup label="Observation">
+	<option>NASA/MODIS</option>
+	<option>NASA/AMSRE</option>
+	<option>NASA/TRMM</option>
+	<option>NASA/GPCP</option>
+	<option>NASA/QuikSCAT</option>
+	<option>NASA/AVISO</option>
+	<option>NASA/GRACE</option>
+	<option>NOAA/NODC</option>
+	<option>NASA/CERES</option>
+</optgroup>
+<optgroup label="Model: Historical">
+	<option>CCCMA/CANESM2</option>
+	<option>GFDL/ESM2G</option>
+	<option>GISS/E2-H</option>
+	<option>GISS/E2-R</option>
+	<option>NCAR/CAM5</option>
+	<option>NCC/NORESM</option>
+	<option>UKMO/HadGEM2-ES</option>
+</optgroup>
+<optgroup label="Model: AMIP">
+	<option>CCCMA/CANAM4</option>
+	<option>CSIRO/MK3.6</option>
+	<option>GFDL/CM3</option>
+	<option>IPSL/CM5A-LR</option>
+	<option>MIROC/MIROC5</option>
+	<option>UKMO/HadGEM2-A</option>
+</optgroup>
+<optgroup label="Reanalysis">
+	<option>ECMWF/interim</option>
+</optgroup>
+</select>
+</td>
+<td>variable name:</td>
+<td><select name="var" , id="var" onchange="select_var()">
+		<option>Precipitation Flux</option>
+		<option>Total Cloud Fraction</option>
+		<option>Surface Temperature</option>
+		<option>Sea Surface Temperature</option>
+		<option>Eastward Near-Surface Wind</option>
+		<option>Northward Near-Surface Wind</option>
+		<option>Near-Surface Wind Speed</option>
+		<option>Sea Surface Height</option>
+		<option>Leaf Area Index</option>
+		<option>Equivalent Water Height Over Land</option>
+		<option>Equivalent Water Height Over Ocean</option>
+		<option>Ocean Heat Content Anomaly within 700 m Depth</option>
+		<option>Ocean Heat Content Anomaly within 2000 m Depth</option>
+		<option>Surface Downwelling Longwave Radiation</option>
+		<option>Surface Downwelling Shortwave Radiation</option>
+		<option>Surface Upwelling Longwave Radiation</option>
+		<option>Surface Upwelling Shortwave Radiation</option>
+		<option>Surface Downwelling Clear-Sky Longwave Radiation</option>
+		<option>Surface Downwelling Clear-Sky Shortwave Radiation</option>
+		<option>Surface Upwelling Clear-Sky Shortwave Radiation</option>
+		<option>TOA Incident Shortwave Radiation</option>
+		<option>TOA Outgoing Longwave Radiation</option>
+		<option>TOA Outgoing Shortwave Radiation</option>
+		<option>TOA Outgoing Clear-Sky Longwave Radiation</option>
+		<option>TOA Outgoing Clear-Sky Shortwave Radiation</option>
+</select></td>
+</tr>
+<tr>
+	<td>start year-month:</td>
+	<td><input id="t0" value="2004-01" alt="start" /></td>
+	<td>end year-month:</td>
+	<td><input id="t1" value="2004-12" alt="end" /></td>
+</tr>
+<tr>
+	<td>select months:</td>
+	<td><select name="months" id="months" onchange="select_months()">
+			<option id="all">select all</option>
+			<option id="none">select none</option>
+			<option id="summer">Summer:Jun-Jul-Aug</option>
+			<option id="autum">Autumn:Sep-Oct-Nov</option>
+			<option id="winter">Winter:Dec-Jan-Feb</option>
+			<option id="spring">Spring:Mar-Apr-May</option>
+	</select></td>
+	<td></td>
+	<td>
+</tr>
+<tr>
+	<td><label><input type="checkbox" name="option1" id="Jan"
+			value="Jan" /> Jan<br></label> <label><input type="checkbox"
+			name="option1" id="Feb" value="Feb" /> Feb<br></label> <label><input
+			type="checkbox" name="option1" id="Mar" value="Mar" /> Mar<br></label>
+	</td>
+	<td><label><input type="checkbox" name="option1" id="Apr"
+			value="Apr" /> Apr<br></label> <label><input type="checkbox"
+			name="option1" id="May" value="May" /> May<br></label> <label><input
+			type="checkbox" name="option1" id="Jun" value="Jun" /> Jun<br></label>
+	</td>
+	<td><label><input type="checkbox" name="option1" id="Jul"
+			value="Jul" /> Jul<br></label> <label><input type="checkbox"
+			name="option1" id="Aug" value="Aug" /> Aug<br></label> <label><input
+			type="checkbox" name="option1" id="Sep" value="Sep" /> Sep<br></label>
+	</td>
+	<td><label><input type="checkbox" name="option1" id="Oct"
+			value="Oct" /> Oct<br></label> <label><input type="checkbox"
+			name="option1" id="Nov" value="Nov" /> Nov<br></label> <label><input
+			type="checkbox" name="option1" id="Dec" value="Dec" /> Dec<br></label>
+	</td>
+</tr>
+<tr>
+	<td>start lat (deg):</td>
+	<td><input id="lat0" value="-90" /></td>
+	<td>end lat (deg):</td>
+	<td><input id="lat1" value="90" /></td>
+</tr>
+<tr>
+	<td colspan="1">variable scale:</td>
+	<td colspan="3">
+		<form>
+			<input type="radio" name="scale1" value="linear" id="radioLin"
+				checked>linear <input type="radio" name="scale1"
+				value="logarithmic" id="radioLog">logarithmic
+		</form>
+	</td>
+</tr>
+<tr>
+	<td colspan="1">Execution purpose</td>
+	<td colspan="3">
+		<form>
+			<textarea name="purpose" id="purpose" rows="4" cols="50"> </textarea>
+		</form>
+	</td>
+</tr>
+<tr>
+	<td colspan="2" align="center"><input id="twodvarzonalmean"
+		type="submit" value="            Run  Again            "
+		style="height: 28px" /></td>
+	<form>
+		<td colspan="2" align="center"><input id="download_data"
+			type="button" value="Download Data" style="height: 28px" /></td>
+	</form>
+</tr>
+<td colspan="4">
+	<div id="Image">Image Here</div>
+</td>
+</tr>
+<tr>
+	<td colspan="4" align="center"><textarea readonly id="data_url"
+			cols="89" rows="2">Data URL Here</textarea></td>
+</tr>
+<tr>
+	<td colspan="4" align="center"><textarea readonly id="Response"
+			cols="89" rows="6">Service Response Text Here</textarea></td>
+</tr>
+</p>
+</table>
+}


[47/50] [abbrv] incubator-cmda git commit: modify model package

Posted by xi...@apache.org.
modify model package


Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/25673e4c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/25673e4c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/25673e4c

Branch: refs/heads/master
Commit: 25673e4c3109ea169b4899ac61f2b91452d202e9
Parents: f6aa032
Author: cat1021 <lo...@gmail.com>
Authored: Fri Sep 4 16:49:39 2015 -0700
Committer: cat1021 <lo...@gmail.com>
Committed: Fri Sep 4 16:49:39 2015 -0700

----------------------------------------------------------------------
 app/models/BugReport.java                       | 37 ++--------
 app/models/DataSet.java                         | 74 ++------------------
 app/models/metadata/ClimateService.java         | 15 ----
 app/models/metadata/ConditionalSampling.java    |  4 +-
 .../metadata/ConditionalSampling2Var.java       |  3 -
 app/models/metadata/ServiceLog.java             | 66 +++--------------
 app/models/metadata/ThreeDVar2DSlice.java       |  5 +-
 .../metadata/ThreeDVarAvgVertical4Profile.java  |  4 +-
 app/models/metadata/ThreeDVarZonalMean.java     |  4 +-
 app/models/metadata/TwoDVarMap.java             |  4 +-
 app/util/APICall.java                           | 14 ++--
 11 files changed, 34 insertions(+), 196 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/25673e4c/app/models/BugReport.java
----------------------------------------------------------------------
diff --git a/app/models/BugReport.java b/app/models/BugReport.java
index 7c15d0d..9842e09 100644
--- a/app/models/BugReport.java
+++ b/app/models/BugReport.java
@@ -18,15 +18,11 @@
 package models;
 
 import java.util.*;
-
 import javax.persistence.*;
-
 import play.data.format.*;
 import play.data.validation.*;
-
 import java.sql.*;
 import java.sql.Date;
-
 import play.db.*;
 import play.db.jpa.*;
 
@@ -72,14 +68,10 @@ public class BugReport {
 	@Formats.DateTime(pattern = "MM/dd/yy")
 	public java.sql.Date updateDate;
 
-	// @ManyToOne
-	// public User owner;
 	@play.db.jpa.Transactional
 	public static List getAll() {
 		Connection connection = DB.getConnection();
-		// This should clearly not be here, but for the moment i'll leave it
-		// we need to learn how H2 works, it's an in-memory db so i think
-		// there's two instances running
+
 		try {
 			Query query = JPA.em().createNativeQuery(
 					"CREATE TABLE BUG_REPORT (id INT auto_increment, "
@@ -93,8 +85,7 @@ public class BugReport {
 			System.out.println("created bug report table");
 		} catch (Exception e) {
 			System.out.println("Didn't create table");
-		}
-		finally {
+		} finally {
 			if (connection != null) {
 				try {
 					connection.close();
@@ -104,24 +95,17 @@ public class BugReport {
 			}
 		}
 
-		// org.hibernate.dialect.Dialect does not have boolean type registered
 		Query query2 = JPA.em().createNativeQuery("SELECT * FROM BUG_REPORT order by solved");
 		List<Object[]> list = query2.getResultList();
-		
 		return list;
 	}
 
 	@play.db.jpa.Transactional
 	public boolean save() {
 		Connection connection = DB.getConnection();
-		// "INSERT INTO BUG_REPORT VALUES ("Name")";
-		// Query query =
-		// JPA.em().createNativeQuery("INSERT INTO BUG_REPORT VALUES (" +
-		// this.title + ")" );
-		// query.executeUpdate();
+
 		try {
-			// organization_name VARCHAR(255), email VARCHAR(255), description
-			// VARCHAR(255), CREATED_AT TIMESTAMP
+			
 			Statement statement = connection.createStatement();
 			String queryText = "INSERT INTO BUG_REPORT (title, name, email, organization, description, solved) VALUES ('"
 					+ this.title.replaceAll("\'", "\'\'")
@@ -153,14 +137,9 @@ public class BugReport {
 	@play.db.jpa.Transactional
 	public static boolean delete(int id) {
 		Connection connection = DB.getConnection();
-		// "INSERT INTO BUG_REPORT VALUES ("Name")";
-		// Query query =
-		// JPA.em().createNativeQuery("INSERT INTO BUG_REPORT VALUES (" +
-		// this.title + ")" );
-		// query.executeUpdate();
+
 		try {
-			// organization_name VARCHAR(255), email VARCHAR(255), description
-			// VARCHAR(255), CREATED_AT TIMESTAMP
+
 			Statement statement = connection.createStatement();
 			String deleteText = "DELETE FROM BUG_REPORT WHERE ID = " + id;
 			statement.executeUpdate(deleteText);
@@ -184,8 +163,7 @@ public class BugReport {
 	public static boolean solve(int id) {
 		Connection connection = DB.getConnection();
 		try {
-			// organization_name VARCHAR(255), email VARCHAR(255), description
-			// VARCHAR(255), CREATED_AT TIMESTAMP
+
 			Statement statement = connection.createStatement();
 			String solveText = "UPDATE BUG_REPORT SET SOLVED = 1 WHERE ID = " + id;
 			statement.executeUpdate(solveText);
@@ -264,5 +242,4 @@ public class BugReport {
 	public void setSolved(int solved) {
 		this.solved = solved;
 	}
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/25673e4c/app/models/DataSet.java
----------------------------------------------------------------------
diff --git a/app/models/DataSet.java b/app/models/DataSet.java
index 91200eb..929dce7 100644
--- a/app/models/DataSet.java
+++ b/app/models/DataSet.java
@@ -22,14 +22,8 @@ import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
-import java.util.Map;
-
-import scala.Console;
-import models.metadata.ClimateService;
-import models.metadata.ServiceLog;
 import util.APICall;
 import util.Constants;
-
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.node.ObjectNode;
@@ -177,13 +171,11 @@ public class DataSet {
 
 		JsonNode dataSetNode = APICall.callAPI(GET_ALL_DATASET);
 
-		// if no value is returned or error or is not json array
 		if (dataSetNode == null || dataSetNode.has("error")
 				|| !dataSetNode.isArray()) {
 			return dataSets;
 		}
 
-		// parse the json string into object
 		for (int i = 0; i < dataSetNode.size(); i++) {
 			JsonNode json = dataSetNode.path(i);
 			DataSet dataset = new DataSet();
@@ -198,31 +190,14 @@ public class DataSet {
 			dataset.setSource(json.get("source").asText());
 			dataset.setStatus(json.get("status").asText());
 			dataset.setResponsiblePerson(json.get("responsiblePerson").asText());
-//			dataset.setComments(json.get(""));
 			dataset.setDataSourceName(json.get("dataSourceNameinWebInterface").asText());
-//			Console.print("aaa"+dataset.getDataSourceName());
 			dataset.setVariableName(json.get("variableNameInWebInterface").asText());
 			dataset.setDataSourceInput(json.get("dataSourceInputParameterToCallScienceApplicationCode").asText());
 			dataset.setVariableNameInput(json.get("variableNameInputParameterToCallScienceApplicationCode").asText());
-			
-//!!!!!!fake start/end time value
-			
-//			if (json.get("endTime") != null) {
-//				dataset.setEndTime(json.get("endTime").asText());
-//			} else {
-//				dataset.setEndTime(null);
-//			}
-//			if (json.get("startTime") != null) {
-//				dataset.setStartTime(json.get("startTime").asText());
-//			} else {
-//				dataset.setEndTime(null);
-//			}
-			
-			
 			String startTime = json.findPath("startTime").asText();
 			String endTime = json.findPath("endTime").asText();
-			
 			Date tmpTime = null;
+			
 			try {
 				tmpTime = (new SimpleDateFormat("MMM dd, yyyy hh:mm:ss a")).parse(startTime);
 				
@@ -230,7 +205,7 @@ public class DataSet {
 					dataset.setStartTime(new SimpleDateFormat("YYYYMM").format(tmpTime));
 				}
 		    } catch (ParseException e){	    
-//		    	e.printStackTrace();
+
 		    }
 			
 			try {
@@ -240,13 +215,8 @@ public class DataSet {
 					dataset.setEndTime(new SimpleDateFormat("YYYYMM").format(tmpTime));
 				}
 		    } catch (ParseException e){	    
-//		    	e.printStackTrace();
+
 		    }
-			
-			
-//			dataset.setEndTime("201508");
-//			dataset.setStartTime("201507");
-			
 			dataSets.add(dataset);
 		}
 		return dataSets;
@@ -262,36 +232,21 @@ public static List<DataSet> queryDataSet(String dataSetName, String agency, Stri
 		queryJson.put("instrument", instrument);
 		queryJson.put("physicalVariable", physicalVariable);
 		queryJson.put("gridDimension", gridDimension);
+		
 		if (dataSetEndTime != null) {
 			queryJson.put("dataSetEndTime", dataSetEndTime.getTime());
 		}
+		
 		if (dataSetStartTime != null) {
 			queryJson.put("dataSetStartTime", dataSetStartTime.getTime());
 		}
-		
-//		if (dataSetName != null && !dataSetName.isEmpty()) {
-//			queryJson.put("name", dataSetName);
-//		}
-//		if (agency != null && !agency.isEmpty()) {
-//			queryJson.put("agencyId", agency);
-//		}
-//		if (instrument != null && !instrument.isEmpty()) {
-//			queryJson.put("instrument", instrument);
-//		}
-//		if (physicalVariable != null && !physicalVariable.isEmpty()) {
-//			queryJson.put("physicalVariable", physicalVariable);
-//		}
-//		if (gridDimension != null && !gridDimension.isEmpty()) {
-//			queryJson.put("gridDimension", gridDimension);
-//		}
-		
 		JsonNode dataSetNode = APICall.postAPI(DATASET_QUERY, queryJson);
+		
 		if (dataSetNode == null || dataSetNode.has("error")
 				|| !dataSetNode.isArray()) {
 			return dataset;
 		}
 
-		// parse the json string into object
 		for (int i = 0; i < dataSetNode.size(); i++) {
 			JsonNode json = dataSetNode.path(i);
 			DataSet newDataSet = deserializeJsonToDataSet(json);
@@ -302,14 +257,6 @@ public static List<DataSet> queryDataSet(String dataSetName, String agency, Stri
 
 	private static DataSet deserializeJsonToDataSet(JsonNode json) {
 		DataSet newDataSet = new DataSet();
-//		newDataSet.setDataSetName(json.get(
-//				"name").asText());
-//		newDataSet.setAgencyId(json.get(
-//				"agencyId").asText());
-//		newDataSet.setInstrument(json.get("instrument").get("name").asText());
-//		newDataSet.setPhysicalVariable(json.get("physicalVariable").asText());
-//		newDataSet.setGridDimension(json.get("gridDimension").asText());
-		
 		newDataSet.setId(json.get("id").asText());
 		newDataSet.setDataSetName(json.get("name").asText());
 		newDataSet.setAgencyId(json.get("agencyId").asText());
@@ -321,9 +268,7 @@ public static List<DataSet> queryDataSet(String dataSetName, String agency, Stri
 		newDataSet.setSource(json.get("source").asText());
 		newDataSet.setStatus(json.get("status").asText());
 		newDataSet.setResponsiblePerson(json.get("responsiblePerson").asText());
-//		dataset.setComments(json.get(""));
 		newDataSet.setDataSourceName(json.get("dataSourceNameinWebInterface").asText());
-//		Console.print("aaa"+dataset.getDataSourceName());
 		newDataSet.setVariableName(json.get("variableNameInWebInterface").asText());
 		newDataSet.setDataSourceInput(json.get("dataSourceInputParameterToCallScienceApplicationCode").asText());
 		newDataSet.setVariableNameInput(json.get("variableNameInputParameterToCallScienceApplicationCode").asText());
@@ -349,13 +294,6 @@ public static List<DataSet> queryDataSet(String dataSetName, String agency, Stri
 	    } catch (ParseException e){	    
 	    	
 	    }
-
-		
-//!!!!!!fake start/end time value		
-//		newDataSet.setEndTime(json.get("dataSetEndTime").asText());
-//		newDataSet.setStartTime(json.get("dataSetStartTime").asText());
-		
-	
 		return newDataSet;
 	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/25673e4c/app/models/metadata/ClimateService.java
----------------------------------------------------------------------
diff --git a/app/models/metadata/ClimateService.java b/app/models/metadata/ClimateService.java
index 96a40e0..63711e6 100644
--- a/app/models/metadata/ClimateService.java
+++ b/app/models/metadata/ClimateService.java
@@ -20,9 +20,7 @@ package models.metadata;
 import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;
 import java.util.*;
-
 import com.fasterxml.jackson.databind.JsonNode;
-
 import util.APICall;
 import util.Constants;
 
@@ -146,13 +144,11 @@ public class ClimateService {
 		JsonNode climateServicesNode = APICall
 				.callAPI(GET_CLIMATE_SERVICES_CALL);
 
-		// if no value is returned or error or is not json array
 		if (climateServicesNode == null || climateServicesNode.has("error")
 				|| !climateServicesNode.isArray()) {
 			return climateServices;
 		}
 
-		// parse the json string into object
 		for (int i = 0; i < climateServicesNode.size(); i++) {
 			JsonNode json = climateServicesNode.path(i);
 			ClimateService newService = new ClimateService();
@@ -176,14 +172,11 @@ public class ClimateService {
 
 		JsonNode climateServicesNode = APICall
 				.callAPI(GET_MOST_RECENTLY_ADDED_CLIMATE_SERVICES_CALL);
-		//System.out.print(GET_MOST_RECENTLY_ADDED_CLIMATE_SERVICES_CALL);
-		// if no value is returned or error or is not json array
 		if (climateServicesNode == null || climateServicesNode.has("error")
 				|| !climateServicesNode.isArray()) {
 			return climateServices;
 		}
 
-		// parse the json string into object
 		for (int i = 0; i < climateServicesNode.size(); i++) {
 			JsonNode json = climateServicesNode.path(i);
 			ClimateService newService = new ClimateService();
@@ -192,7 +185,6 @@ public class ClimateService {
 					"name").asText());
 			newService.setPurpose(json.findPath("purpose").asText());
 			newService.setUrl(json.findPath("url").asText());
-			//newService.setCreateTime(json.findPath("createTime").asText());
 			newService.setScenario(json.findPath("scenario").asText());
 			newService.setVersion(json.findPath("versionNo").asText());
 			newService.setRootservice(json.findPath("rootServiceId").asText());
@@ -208,13 +200,11 @@ public class ClimateService {
 		JsonNode climateServicesNode = APICall
 				.callAPI(GET_MOST_RECENTLY_USED_CLIMATE_SERVICES_CALL);
 
-		// if no value is returned or error or is not json array
 		if (climateServicesNode == null || climateServicesNode.has("error")
 				|| !climateServicesNode.isArray()) {
 			return climateServices;
 		}
 
-		// parse the json string into object
 		for (int i = 0; i < climateServicesNode.size(); i++) {
 			JsonNode json = climateServicesNode.path(i);
 			ClimateService newService = new ClimateService();
@@ -223,7 +213,6 @@ public class ClimateService {
 					"name").asText());
 			newService.setPurpose(json.findPath("purpose").asText());
 			newService.setUrl(json.findPath("url").asText());
-			//newService.setCreateTime(json.findPath("createTime").asText());
 			newService.setScenario(json.findPath("scenario").asText());
 			newService.setVersion(json.findPath("versionNo").asText());
 			newService.setRootservice(json.findPath("rootServiceId").asText());
@@ -239,13 +228,11 @@ public class ClimateService {
 		JsonNode climateServicesNode = APICall
 				.callAPI(GET_MOST_POPULAR_CLIMATE_SERVICES_CALL);
 
-		// if no value is returned or error or is not json array
 		if (climateServicesNode == null || climateServicesNode.has("error")
 				|| !climateServicesNode.isArray()) {
 			return climateServices;
 		}
 
-		// parse the json string into object
 		for (int i = 0; i < climateServicesNode.size(); i++) {
 			JsonNode json = climateServicesNode.path(i);
 			ClimateService newService = new ClimateService();
@@ -254,7 +241,6 @@ public class ClimateService {
 					"name").asText());
 			newService.setPurpose(json.findPath("purpose").asText());
 			newService.setUrl(json.findPath("url").asText());
-			//newService.setCreateTime(json.findPath("createTime").asText());
 			newService.setScenario(json.findPath("scenario").asText());
 			newService.setVersion(json.findPath("versionNo").asText());
 			newService.setRootservice(json.findPath("rootServiceId").asText());
@@ -339,7 +325,6 @@ public class ClimateService {
 			photo = "/assets/images/conditionalSampling2Variables.jpeg";
 		}
 		else{
-			//photo = "http://i1-mac.softpedia-static.com/screenshots/Climate-Data-Analysis-Tools_1.png";
 			photo = "http://upload.wikimedia.org/wikipedia/commons/3/33/White_square_with_question_mark.png";
 		}
 	}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/25673e4c/app/models/metadata/ConditionalSampling.java
----------------------------------------------------------------------
diff --git a/app/models/metadata/ConditionalSampling.java b/app/models/metadata/ConditionalSampling.java
index dbe1332..d8ef86c 100644
--- a/app/models/metadata/ConditionalSampling.java
+++ b/app/models/metadata/ConditionalSampling.java
@@ -155,9 +155,7 @@ public class ConditionalSampling {
 		this.selectMonths = selectMonths;
 	}
 	public void changeSelectMonths(){
-//		if(month.isEmpty()){
-//			this.selectMonths = "select none";
-//		}
+
 		if(month.contains("1")&&month.contains("2")&&month.contains("3")&&month.contains("4")&&month.contains("5")&&month.contains("6")&&month.contains("7")&&month.contains("8")&&month.contains("9")&&month.contains("10")&&month.contains("11")&&month.contains("12")){
 			this.selectMonths = "select all";
 		}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/25673e4c/app/models/metadata/ConditionalSampling2Var.java
----------------------------------------------------------------------
diff --git a/app/models/metadata/ConditionalSampling2Var.java b/app/models/metadata/ConditionalSampling2Var.java
index 6c69796..30a9e24 100644
--- a/app/models/metadata/ConditionalSampling2Var.java
+++ b/app/models/metadata/ConditionalSampling2Var.java
@@ -60,9 +60,6 @@ public class ConditionalSampling2Var {
 	private String image = "";
 	private String dataURL = "";
 	private String serviceResponseText = "";
-
-	//env_var_plev1
-	
 	
 	public String getDataSourceP() {
 		return dataSourceP;

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/25673e4c/app/models/metadata/ServiceLog.java
----------------------------------------------------------------------
diff --git a/app/models/metadata/ServiceLog.java b/app/models/metadata/ServiceLog.java
index 9cb9a39..830362e 100644
--- a/app/models/metadata/ServiceLog.java
+++ b/app/models/metadata/ServiceLog.java
@@ -23,7 +23,6 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
 import play.Logger;
 import util.APICall;
 import util.Constants;
-
 import java.io.UnsupportedEncodingException;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
@@ -155,13 +154,11 @@ public class ServiceLog {
 		JsonNode serviceLogNode = APICall
 				.callAPI(GET_ALL_SERVICE_LOG);
 
-		// if no value is returned or error or is not json array
 		if (serviceLogNode == null || serviceLogNode.has("error")
 				|| !serviceLogNode.isArray()) {
 			return serviceLog;
 		}
 
-		// parse the json string into object
 		for (int i = 0; i < serviceLogNode.size(); i++) {
 			JsonNode json = serviceLogNode.path(i);
 
@@ -181,18 +178,12 @@ public class ServiceLog {
 		newServiceLog.setPurpose(json.get("purpose").asText());
 		newServiceLog.setUserId(json.get("user").get("firstName").asText()+" "+json.get("user").get("lastName").asText());
 		newServiceLog.setServiceConfigurationId(json.get("serviceConfiguration").get("id").asText());
-//		newServiceLog.setExecutionStartTime(json.findPath("executionStartTime").asText());
-//		newServiceLog.setExecutionEndTime(json.findPath("executionEndTime").asText());
-//		newServiceLog.setDataSetStartTime(json.findPath("datasetStudyStartTime").asText());
-//		newServiceLog.setDataSetEndTime(json.findPath("datasetStudyEndTime").asText());
-		
 		String executionStartTime = json.findPath("executionStartTime").asText();
-		String executionEndTime = json.findPath("executionEndTime").asText();
-		
+		String executionEndTime = json.findPath("executionEndTime").asText();	
 		String datasetStudyStartTime = json.findPath("datasetStudyStartTime").asText();
 		String datasetStudyEndTime = json.findPath("datasetStudyEndTime").asText();
-		
 		Date tmpTime = null;
+		
 		try {
 			tmpTime = (new SimpleDateFormat("MMM dd, yyyy hh:mm:ss a")).parse(executionStartTime);		
 			if (tmpTime != null) {
@@ -216,7 +207,7 @@ public class ServiceLog {
 				newServiceLog.setDataSetStartTime(new SimpleDateFormat("YYYYMM").format(tmpTime));
 			}
 	    } catch (ParseException e){	    
-//	    	e.printStackTrace();
+
 	    }
 		
 		try {
@@ -226,19 +217,10 @@ public class ServiceLog {
 				newServiceLog.setDataSetEndTime(new SimpleDateFormat("YYYYMM").format(tmpTime));
 			}
 	    } catch (ParseException e){	    
-//	    	e.printStackTrace();
+
 	    }
-		
-		
-//		tmptime = null;
-//		try {
-//			tmptime = (new SimpleDateFormat("YYYY-MM-DD HH:MM:SS")).parse(json.findPath("datasetStudyEndTime").asText());
-//	    } catch (ParseException e){	    
-//	    	e.printStackTrace();
-//	    }
-//		newServiceLog.setDataSetEndTime(new SimpleDateFormat("YYYYMM").format(tmptime));
-		
-		newServiceLog.setDatasetLogId(json.findPath("datasetLogId").asText());	//Not used variavle, use original code for now to set this to an empyy string
+
+		newServiceLog.setDatasetLogId(json.findPath("datasetLogId").asText());
 
 		return newServiceLog;
 	}
@@ -259,15 +241,11 @@ public class ServiceLog {
 
 		JsonNode serviceLogNode = APICall
 				.callAPI("http://localhost:9008/searchServiceLogsWithParameter/model/"+dataSource+"/json");
-		//Logger.debug(GET_A_SERVICE_LOG + userId+ "/" +startTime + "" + "/" +endTime + "" + "/" + util.Constants.FORMAT);
-		// if no value is returned or error or is not json array
-		//Logger.info(serviceLogNode.toString());
 		if (serviceLogNode == null || serviceLogNode.has("error")
 				|| !serviceLogNode.isArray()) {
 			return serviceLog;
 		}
 
-		// parse the json string into object
 		for (int i = 0; i < serviceLogNode.size(); i++) {
 			JsonNode json = serviceLogNode.path(i);
 			ServiceLog newServiceLog = deserializeJsonToServiceLog(json);
@@ -281,15 +259,13 @@ public class ServiceLog {
 
 		JsonNode serviceLogNode = APICall
 				.callAPI("http://localhost:9008/searchServiceLogsWithParameter/var/"+variableName+"/json");
-		//Logger.debug(GET_A_SERVICE_LOG + userId+ "/" +startTime + "" + "/" +endTime + "" + "/" + util.Constants.FORMAT);
-		// if no value is returned or error or is not json array
+
 		Logger.info(serviceLogNode.toString());
 		if (serviceLogNode == null || serviceLogNode.has("error")
 				|| !serviceLogNode.isArray()) {
 			return serviceLog;
 		}
 
-		// parse the json string into object
 		for (int i = 0; i < serviceLogNode.size(); i++) {
 			JsonNode json = serviceLogNode.path(i);
 			ServiceLog newServiceLog = deserializeJsonToServiceLog(json);
@@ -303,15 +279,12 @@ public class ServiceLog {
 
 		JsonNode serviceLogNode = APICall
 				.callAPIParameter("http://localhost:9008/getExecutionLogByPurpose", "purpose", purpose);
-		//Logger.debug(GET_A_SERVICE_LOG + userId+ "/" +startTime + "" + "/" +endTime + "" + "/" + util.Constants.FORMAT);
-		// if no value is returned or error or is not json array
+
 		Logger.info(serviceLogNode.toString());
 		if (serviceLogNode == null || serviceLogNode.has("error")
 				|| !serviceLogNode.isArray()) {
 			return serviceLog;
 		}
-
-		// parse the json string into object
 		
 		for (int i = 0; i < serviceLogNode.size(); i++) {
 			JsonNode json = serviceLogNode.path(i);
@@ -326,15 +299,12 @@ public class ServiceLog {
 
 		JsonNode serviceLogNode = APICall
 				.callAPI("http://localhost:9008/searchServiceLogsWithParameter/" + userId + "/json");
-		//Logger.debug(GET_A_SERVICE_LOG + userId+ "/" +startTime + "" + "/" +endTime + "" + "/" + util.Constants.FORMAT);
-		// if no value is returned or error or is not json array
 		Logger.info(serviceLogNode.toString());
 		if (serviceLogNode == null || serviceLogNode.has("error")
 				|| !serviceLogNode.isArray()) {
 			return serviceLog;
 		}
 
-		// parse the json string into object
 		for (int i = 0; i < serviceLogNode.size(); i++) {
 			JsonNode json = serviceLogNode.path(i);
 			ServiceLog newServiceLog = deserializeJsonToServiceLog(json);
@@ -348,15 +318,12 @@ public class ServiceLog {
 
 		JsonNode serviceLogNode = APICall
 				.callAPI("http://localhost:9008/searchServiceLogsWithParameterRange/startT/"+start+"/endT/"+end+"/json");
-		//Logger.debug(GET_A_SERVICE_LOG + userId+ "/" +startTime + "" + "/" +endTime + "" + "/" + util.Constants.FORMAT);
-		// if no value is returned or error or is not json array
 		Logger.info(serviceLogNode.toString());
 		if (serviceLogNode == null || serviceLogNode.has("error")
 				|| !serviceLogNode.isArray()) {
 			return serviceLog;
 		}
 
-		// parse the json string into object
 		for (int i = 0; i < serviceLogNode.size(); i++) {
 			JsonNode json = serviceLogNode.path(i);
 			ServiceLog newServiceLog = deserializeJsonToServiceLog(json);
@@ -370,15 +337,13 @@ public class ServiceLog {
 
 		JsonNode serviceLogNode = APICall
 				.callAPI("http://localhost:9008/searchServiceLogsWithParameterRange/start%20lat%20(deg)/" + start + "/end%20lat%20(deg)/" + end + "/json");
-		//Logger.debug(GET_A_SERVICE_LOG + userId+ "/" +startTime + "" + "/" +endTime + "" + "/" + util.Constants.FORMAT);
-		// if no value is returned or error or is not json array
+
 		Logger.info(serviceLogNode.toString());
 		if (serviceLogNode == null || serviceLogNode.has("error")
 				|| !serviceLogNode.isArray()) {
 			return serviceLog;
 		}
 
-		// parse the json string into object
 		for (int i = 0; i < serviceLogNode.size(); i++) {
 			JsonNode json = serviceLogNode.path(i);
 			ServiceLog newServiceLog = deserializeJsonToServiceLog(json);
@@ -410,15 +375,13 @@ public class ServiceLog {
 		}
 		JsonNode serviceLogNode = APICall
 				.callAPI("http://localhost:9008/searchServiceLogsWithMultipleParameter/userid/" + userId + "/datasource/" + dataSource + "/variablename/" + variableName + "/startyearmonth/" + startTime + "/endyearmonth/" + endTime + "/executionpurpose/" + executionPurpose + "/json");
-		//Logger.debug(GET_A_SERVICE_LOG + userId+ "/" +startTime + "" + "/" +endTime + "" + "/" + util.Constants.FORMAT);
-		// if no value is returned or error or is not json array
+
 		Logger.info(serviceLogNode.toString());
 		if (serviceLogNode == null || serviceLogNode.has("error")
 				|| !serviceLogNode.isArray()) {
 			return serviceLog;
 		}
 
-		// parse the json string into object
 		for (int i = 0; i < serviceLogNode.size(); i++) {
 			JsonNode json = serviceLogNode.path(i);
 			ServiceLog newServiceLog = deserializeJsonToServiceLog(json);
@@ -427,7 +390,6 @@ public class ServiceLog {
 		return serviceLog;
 	}
 
-	//simple search function on top of the table of service execution log
 	public static List<ServiceLog> search(String userId, long startTime, long endTime) {
 
 		List<ServiceLog> serviceLog = new ArrayList<ServiceLog>();
@@ -437,16 +399,12 @@ public class ServiceLog {
 
 		JsonNode serviceLogNode = APICall
 				.callAPI(GET_A_SERVICE_LOG + userId + "/" + startTime + "" + "/" + endTime + "" + "/" + util.Constants.FORMAT);
-//		JsonNode serviceLogNode = APICall
-//				.callAPI("http://localhost:9008/getServiceExecutionLogs/123/1415904302/1415904357/json");
-		//Logger.debug(GET_A_SERVICE_LOG + userId+ "/" +startTime + "" + "/" +endTime + "" + "/" + util.Constants.FORMAT);
-		// if no value is returned or error or is not json array
+
 		if (serviceLogNode == null || serviceLogNode.has("error")
 				|| !serviceLogNode.isArray()) {
 			return serviceLog;
 		}
 
-		// parse the json string into object
 		for (int i = 0; i < serviceLogNode.size(); i++) {
 			JsonNode json = serviceLogNode.path(i);
 			ServiceLog newServiceLog = deserializeJsonToServiceLog(json);
@@ -529,14 +487,12 @@ public class ServiceLog {
 			}
 		}
 
-		//System.out.println(queryJson);
 		JsonNode serviceLogNode = APICall.postAPI(EXECUTION_LOG_QUERY, queryJson);
 		if (serviceLogNode == null || serviceLogNode.has("error")
 				|| !serviceLogNode.isArray()) {
 			return serviceLog;
 		}
 
-		// parse the json string into object
 		for (int i = 0; i < serviceLogNode.size(); i++) {
 			JsonNode json = serviceLogNode.path(i);
 			ServiceLog newServiceLog = deserializeJsonToServiceLog(json);

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/25673e4c/app/models/metadata/ThreeDVar2DSlice.java
----------------------------------------------------------------------
diff --git a/app/models/metadata/ThreeDVar2DSlice.java b/app/models/metadata/ThreeDVar2DSlice.java
index 0d31acc..66d24ab 100644
--- a/app/models/metadata/ThreeDVar2DSlice.java
+++ b/app/models/metadata/ThreeDVar2DSlice.java
@@ -92,9 +92,7 @@ public class ThreeDVar2DSlice {
 		this.selectMonths = selectMonths;
 	}
 	public void changeSelectMonths(){
-//		if(month.isEmpty()){
-//			this.selectMonths = "select none";
-//		}
+
 		if(month.contains("1")&&month.contains("2")&&month.contains("3")&&month.contains("4")&&month.contains("5")&&month.contains("6")&&month.contains("7")&&month.contains("8")&&month.contains("9")&&month.contains("10")&&month.contains("11")&&month.contains("12")){
 			this.selectMonths = "select all";
 		}
@@ -136,7 +134,6 @@ public class ThreeDVar2DSlice {
 	public void setEndLat(String endLat) {
 		this.endLat = endLat;
 	}
-	
 	public String getExecutionPurpose() {
 		return executionPurpose;
 	}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/25673e4c/app/models/metadata/ThreeDVarAvgVertical4Profile.java
----------------------------------------------------------------------
diff --git a/app/models/metadata/ThreeDVarAvgVertical4Profile.java b/app/models/metadata/ThreeDVarAvgVertical4Profile.java
index 5161722..c3b6ecf 100644
--- a/app/models/metadata/ThreeDVarAvgVertical4Profile.java
+++ b/app/models/metadata/ThreeDVarAvgVertical4Profile.java
@@ -88,9 +88,7 @@ public class ThreeDVarAvgVertical4Profile {
 		this.selectMonths = selectMonths;
 	}
 	public void changeSelectMonths(){
-//		if(month.isEmpty()){
-//			this.selectMonths = "select none";
-//		}
+
 		if(month.contains("1")&&month.contains("2")&&month.contains("3")&&month.contains("4")&&month.contains("5")&&month.contains("6")&&month.contains("7")&&month.contains("8")&&month.contains("9")&&month.contains("10")&&month.contains("11")&&month.contains("12")){
 			this.selectMonths = "select all";
 		}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/25673e4c/app/models/metadata/ThreeDVarZonalMean.java
----------------------------------------------------------------------
diff --git a/app/models/metadata/ThreeDVarZonalMean.java b/app/models/metadata/ThreeDVarZonalMean.java
index c16d1f4..98eb959 100644
--- a/app/models/metadata/ThreeDVarZonalMean.java
+++ b/app/models/metadata/ThreeDVarZonalMean.java
@@ -86,9 +86,7 @@ public class ThreeDVarZonalMean {
 		this.selectMonths = selectMonths;
 	}
 	public void changeSelectMonths(){
-//		if(month.isEmpty()){
-//			this.selectMonths = "select none";
-//		}
+
 		if(month.contains("1")&&month.contains("2")&&month.contains("3")&&month.contains("4")&&month.contains("5")&&month.contains("6")&&month.contains("7")&&month.contains("8")&&month.contains("9")&&month.contains("10")&&month.contains("11")&&month.contains("12")){
 			this.selectMonths = "select all";
 		}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/25673e4c/app/models/metadata/TwoDVarMap.java
----------------------------------------------------------------------
diff --git a/app/models/metadata/TwoDVarMap.java b/app/models/metadata/TwoDVarMap.java
index 539e8db..4fc0803 100644
--- a/app/models/metadata/TwoDVarMap.java
+++ b/app/models/metadata/TwoDVarMap.java
@@ -80,9 +80,7 @@ public class TwoDVarMap {
 		this.selectMonths = selectMonths;
 	}
 	public void changeSelectMonths(){
-//		if(month.isEmpty()){
-//			this.selectMonths = "select none";
-//		}
+
 		if(month.contains("1")&&month.contains("2")&&month.contains("3")&&month.contains("4")&&month.contains("5")&&month.contains("6")&&month.contains("7")&&month.contains("8")&&month.contains("9")&&month.contains("10")&&month.contains("11")&&month.contains("12")){
 			this.selectMonths = "select all";
 		}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/25673e4c/app/util/APICall.java
----------------------------------------------------------------------
diff --git a/app/util/APICall.java b/app/util/APICall.java
index 2c147d5..4b182c1 100644
--- a/app/util/APICall.java
+++ b/app/util/APICall.java
@@ -23,7 +23,6 @@ import play.libs.WS;
 import play.libs.F.Function;
 import play.libs.F.Promise;
 import scala.Console;
-
 import com.fasterxml.jackson.databind.*;
 import com.fasterxml.jackson.databind.node.ObjectNode;
 
@@ -44,7 +43,7 @@ public class APICall {
 						if (response.getStatus() == 200
 								|| response.getStatus() == 201) {
 							return response.asJson();
-						} else { // no response from the server
+						} else {
 							Logger.info(""+response.getStatus());
 							return createResponse(ResponseType.GETERROR);
 						}
@@ -63,7 +62,6 @@ public class APICall {
 		Promise<WS.Response> responsePromise = WS
 				.url(apiString).setQueryParameter(paraName, para).get();
 		Console.print(responsePromise.get());
-//		System.out.println(responsePromise.toString());
 		final Promise<JsonNode> bodyPromise = responsePromise
 				.map(new Function<WS.Response, JsonNode>() {
 					@Override
@@ -72,7 +70,7 @@ public class APICall {
 						if (response.getStatus() == 200
 								|| response.getStatus() == 201) {
 							return response.asJson();
-						} else { // no response from the server
+						} else {
 							Logger.info(""+response.getStatus());
 							return createResponse(ResponseType.GETERROR);
 						}
@@ -100,10 +98,9 @@ public class APICall {
 								return response.asJson();
 							}
 							catch (Exception e){
-								//If response is in Json format, return as json, otherwise just plain success
 								return createResponse(ResponseType.SUCCESS);
 							}
-						} else { // other response status from the server
+						} else {
 							return createResponse(ResponseType.SAVEERROR);
 						}
 					}
@@ -115,7 +112,6 @@ public class APICall {
 		}
 	}
 
-	/* Right now, only deviceType and device use PUT HTTP request*/
 	public static JsonNode putAPI(String apiString, JsonNode jsonData) {
 		Promise<WS.Response> responsePromise = WS.url(apiString).put(jsonData);
 		final Promise<JsonNode> bodyPromise = responsePromise
@@ -127,7 +123,7 @@ public class APICall {
 								.getStatus() == 200)
 								&& !response.getBody().contains("not")) {
 							return createResponse(ResponseType.SUCCESS);
-						} else { // other response status from the server
+						} else { 
 							return createResponse(ResponseType.SAVEERROR);
 						}
 					}
@@ -150,7 +146,7 @@ public class APICall {
 								.getStatus() == 201)
 								&& !response.getBody().contains("not")) {
 							return createResponse(ResponseType.SUCCESS);
-						} else { // no response from the server
+						} else {
 							return createResponse(ResponseType.DELETEERROR);
 						}
 					}


[19/50] [abbrv] incubator-cmda git commit: delete comments

Posted by xi...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/f22b3e32/app/views/climate/TwoDVariableZonelMean.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/TwoDVariableZonelMean.scala.html b/app/views/climate/TwoDVariableZonelMean.scala.html
index a2db925..7fc50b0 100644
--- a/app/views/climate/TwoDVariableZonelMean.scala.html
+++ b/app/views/climate/TwoDVariableZonelMean.scala.html
@@ -1,47 +1,25 @@
-@(parameters: metadata.TwoDVarZonalMean)
-
-@import helper._
-
+@(parameters: metadata.TwoDVarZonalMean) @import helper._
 <link rel="stylesheet"
 	href='@routes.Assets.at("stylesheets/livefitler.css")'>
-	
 @scripts = {
-	<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
-	<script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
-	<script type="text/javascript" src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
-	<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js"></script>
-	<script type="text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
-	<script type="text/javascript" src="@routes.Assets.at("javascripts/xmisc.js")"></script>
-	<script type="text/javascript">
-
+<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
+<script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
+<script type="text/javascript"
+	src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
+<script type="text/javascript" src="https:
+	<script type="
+	text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
+<script type="text/javascript" src="@routes.Assets.at("javascripts/xmisc.js")"></script>
+<script type="text/javascript">
     var Response = null;
     var variable = "";
-
-    // called on load or reload
     window.onload = function() {
-      //select_all_months();
       changeDataSource(); 
       select_data();
       changeVariableName();
       select_var();
-      //enable download button
       var z=document.getElementById("download_data");
       z.disabled=false;
-      // no data to download yet
-      //disable_download_button();
-      
-      /* var var_string = $('#variableName').text();
-      alert(var_string);
-      var y=document.getElementById("var");
-  	  if (var_string == "lai"){
-  		y.options[8].selected=true;
-  	  	//$('#var option:contains('+'Leaf Area Index'+')').prop({selected: true});
-  	  }
-      else{
-    	y.options[1].selected=true;
-		//$('#var option:contains('+'Total Cloud Fraction'+')').prop({selected: true});
-      } */
-      
       $('#t0').val($('#startYearMonth').text());
       $('#t1').val($('#endYearMonth').text());
       var selectMonths = $('#selectMonths').text();
@@ -64,12 +42,9 @@
       $('#Image').html('<img src="'+imageUrl+'" width=680 />');
       $('#data_url').html($('#dataURL').text());
       $('#Response').html($('serviceResponseText').text());
-      
     }
-    
     function changeDataSource(){
     	var dataSource = $('#dataSource').text();
-     	//dataSource = "NASA_QuikSCAT";
      	var x = document.getElementById("data");
      	if(dataSource == "NASA_MODIS" ){
      		x.options[0].selected=true;
@@ -140,9 +115,7 @@
      	else if(dataSource == "ECMWF_interim" ){
      		x.options[22].selected=true;
      	}
-        //$('#data option:contains('+dataSource+')').prop({selected: true});
     }
-    
     function changeVariableName(){
     	var var_string = $('#variableName').text();
      	var x=document.getElementById("var");
@@ -197,7 +170,6 @@
         else if (var_string == "rsut")
         	x.options[24].selected=true;
     }
-    
     function select_monthsByPara(){
     	var monthsByPara = $('#monthsPara').text();
     	if(monthsByPara.search("jan")>-1){
@@ -237,22 +209,14 @@
     		document.getElementById('Dec').checked = true;
     	}
     }
-    
-    // disable download data button
     function disable_download_button()
     {
-      /* var x=document.getElementById("download_data");
-      x.disabled=true; */
     }
-
-    // enable download data button
     function enable_download_button()
     {
       var x=document.getElementById("download_data");
       x.disabled=false;
     }
-
-    // select all months in the checkboxes
     function select_all_months()
     {
         document.getElementById('Jan').checked = true;
@@ -268,8 +232,6 @@
         document.getElementById('Nov').checked = true;
         document.getElementById('Dec').checked = true;
     }
-
-    // see if no month is selected
     function no_month_check()
     {
         if (document.getElementById('Jan').checked == false &&
@@ -284,14 +246,11 @@
            document.getElementById('Oct').checked == false &&
            document.getElementById('Nov').checked == false &&
            document.getElementById('Dec').checked == false) {
-           // alert("No month check!");
            return true;
           }
         else
            return false;
     }
-
-    // unselect all months in the checkboxes
     function reset_months()
     {
         document.getElementById('Jan').checked = false;
@@ -307,12 +266,9 @@
         document.getElementById('Nov').checked = false;
         document.getElementById('Dec').checked = false;
     }
-
-    // enable all vars in dropdown menu
     function reset_vars()
     {
       var x=document.getElementById("var");
-
       x.options[0].disabled=false;
       x.options[1].disabled=false;
       x.options[2].disabled=false;
@@ -339,15 +295,9 @@
       x.options[23].disabled=false;
       x.options[24].disabled=false;
     }
-
-    // form variable string based on "var" dropdown selection
     function select_var()
     {
       var var_string = $("#var").val();
-
-      // disable the download button because of this change
-      //disable_download_button();
-
       if (var_string == "Total Cloud Fraction")
         variable = "clt";
       else if (var_string == "Surface Temperature")
@@ -398,26 +348,12 @@
         variable = "rsutcs";
       else if (var_string == "TOA Outgoing Shortwave Radiation")
         variable = "rsut";
-
-      // alert("variable: " + variable)
     }
-
-    // set up "var" dropdown based status of "data" dropdown
     function select_data()
     {
       var data_string = $("#data").val();
       var x=document.getElementById("var");
-
-      // disable the download button because of this change
-      //disable_download_button();
-
-      // enable all options in "var" dropdown first
       reset_vars();
-
-      // alert(data_string);
-
-      // disable corresponding "var" options
-
       if (data_string == "NASA/AMSRE") {
         x.options[0].disabled=true;
         x.options[1].disabled=true;
@@ -443,7 +379,6 @@
         x.options[22].disabled=true;
         x.options[23].disabled=true;
         x.options[24].disabled=true;
-
         x.options[3].selected=true;
       }
       else if (data_string == "NASA/MODIS") {
@@ -470,9 +405,7 @@
         x.options[22].disabled=true;
         x.options[23].disabled=true;
         x.options[24].disabled=true;
-
         x.options[1].selected=true;
-        //x.options[8].selected=true;
       }
       else if (data_string == "NASA/TRMM") {
         x.options[0].selected=true;
@@ -529,7 +462,6 @@
         x.options[24].disabled=true;
       }
       else if (data_string == "NASA/QuikSCAT") {
-
         x.options[0].disabled=true;
         x.options[1].disabled=true;
         x.options[2].disabled=true;
@@ -552,10 +484,7 @@
         x.options[22].disabled=true;
         x.options[23].disabled=true;
         x.options[24].disabled=true;
-
         x.options[4].selected=true;
-        //x.options[5].selected=true;
-        //x.options[6].selected=true;
       }
       else if (data_string == "NASA/AVISO") {
         x.options[0].disabled=true;
@@ -582,11 +511,9 @@
         x.options[22].disabled=true;
         x.options[23].disabled=true;
         x.options[24].disabled=true;
-
         x.options[7].selected=true;
       }
       else if (data_string == "NASA/GRACE") {
-
         x.options[0].disabled=true;
         x.options[1].disabled=true;
         x.options[2].disabled=true;
@@ -610,12 +537,9 @@
         x.options[22].disabled=true;
         x.options[23].disabled=true;
         x.options[24].disabled=true;
-
         x.options[9].selected=true;
-        //x.options[10].selected=true;
       }
       else if (data_string == "NOAA/NODC") {
-
         x.options[0].disabled=true;
         x.options[1].disabled=true;
         x.options[2].disabled=true;
@@ -639,12 +563,9 @@
         x.options[22].disabled=true;
         x.options[23].disabled=true;
         x.options[24].disabled=true;
-
         x.options[11].selected=true;
-        //x.options[12].selected=true;
       }
       else if (data_string == "NASA/CERES") {
-
         x.options[0].disabled=true;
         x.options[1].disabled=true;
         x.options[2].disabled=true;
@@ -658,11 +579,9 @@
         x.options[10].disabled=true;
         x.options[11].disabled=true;
         x.options[12].disabled=true;
-
         x.options[13].selected=true;
       }
       else if (data_string == "ECMWF/interim") {
-
         x.options[0].disabled=true;
         x.options[1].disabled=true;
         x.options[2].disabled=true;
@@ -687,227 +606,141 @@
         x.options[22].disabled=true;
         x.options[23].disabled=true;
         x.options[24].disabled=true;
-
         x.options[3].selected=true;
       }
-      // for all other models
       else {
         x.options[9].disabled=true;
         x.options[10].disabled=true;
         x.options[11].disabled=true;
         x.options[12].disabled=true;
-
         x.options[0].selected=true;
       }
-
-
- // form variable string
     select_var();
     }
-
-    // select checkboxes based on "months" dropdown
     function select_months()
     {
       var s1=document.getElementById("months");
-      // alert(s1.selectedIndex);
-      // alert(s1.options[s1.selectedIndex].value);
-
-      // disable the download button because of this change
-      //disable_download_button();
-
-      // "select none"
       if (s1.selectedIndex == 1) {
         reset_months();
       }
-      // "select all"
       if (s1.selectedIndex == 0) {
         select_all_months();
       }
-      // "summer"
       if (s1.selectedIndex == 2) {
         reset_months();
         document.getElementById('Jun').checked = true;
         document.getElementById('Jul').checked = true;
         document.getElementById('Aug').checked = true;
       }
-      // "autumn"
       if (s1.selectedIndex == 3) {
         reset_months();
         document.getElementById('Sep').checked = true;
         document.getElementById('Oct').checked = true;
         document.getElementById('Nov').checked = true;
       }
-      // "winter"
       if (s1.selectedIndex == 4) {
         reset_months();
         document.getElementById('Dec').checked = true;
         document.getElementById('Jan').checked = true;
         document.getElementById('Feb').checked = true;
       }
-      // "spring"
       if (s1.selectedIndex == 5) {
         reset_months();
         document.getElementById('Mar').checked = true;
         document.getElementById('Apr').checked = true;
         document.getElementById('May').checked = true;
       }
-        
     }
-
     $(document).ready(function(){
-    	
-     /*  $("a").click(function(event){
-        alert("As you can see, the link no longer took you to jquery.com");
-        event.preventDefault();
-      }); */
-        
-
       $("#download_data").click(function(event) {
         var durl = $("#data_url").val();
-        //alert("url"+durl);
         window.location.assign(durl);
       });
-
-
       $("#twodvarzonalmean").click(function(event) {
 		Response = null;
-
-        // no data to download yet
-        //disable_download_button();
-		
-        // flag error if no month box is checked
       	if (no_month_check()) {
-           // $("#Response").html("<span style='color:red'>Error: please check at least one month.</span>");
            $("#Response").html("Error: please check at least one month.");
            $("#Image").html("");
-           
            return;
         } 
-        
         $("#Response").html("Calculating ...");
         $("#data_url").html("Calculating ...");
         $("#Image").html("");
-		
-        // sample url: http://cmacws.jpl.nasa.gov:9002/svc/twoDimZonalMean?model=ukmo_hadgem2-a&var=ts&start_time=199001&end_time=199512&lat1=-29&lat2=29&months=1,2,4,5,6,10,12
-
-        // form url string
-        // var url = "http://cmacws.jpl.nasa.gov:9002/svc/twoDimZonalMean?";
-        var url = "http://" + window.location.hostname + ":9002/svc/twoDimZonalMean?";
-        //var url = "http://" + "einstein.sv.cmu.edu"+":9002/svc/twoDimZonalMean?";
-         //alert(url);
-		
+        var url = "http:
         var d1 = $("#data").val();
         var model1 = d1.replace("/", "_");
-
         var arglist = "";
         arglist = arglist.concat("model=");
         arglist = arglist.concat(model1);
-
         var v1 = $("#var").val();
         arglist = arglist.concat("&var=");
         arglist = arglist.concat(variable);
-
         var t0 = $("#t0").val();
         var t1 = $("#t1").val();
-
         t0 = t0.replace("-", "");
         t1 = t1.replace("-", "");
-
         arglist = arglist.concat("&start_time=");
         arglist = arglist.concat(t0);
-
         arglist = arglist.concat("&end_time=");
         arglist = arglist.concat(t1);
-
         var lat0 = $("#lat0").val();
         var lat1 = $("#lat1").val();
-
         arglist = arglist.concat("&lat1=");
         arglist = arglist.concat(lat0);
-
         arglist = arglist.concat("&lat2=");
         arglist = arglist.concat(lat1);
-
         var s1 = document.getElementById('months');
-
-        // get months checked by client
         var month_str = "";
-
         var mm = document.getElementById('Jan');
         if (mm.checked == true)
           month_str = month_str.concat(",1");
-
         var mm = document.getElementById('Feb');
         if (mm.checked == true)
           month_str = month_str.concat(",2");
-
         var mm = document.getElementById('Mar');
         if (mm.checked == true)
           month_str = month_str.concat(",3");
-
         var mm = document.getElementById('Apr');
         if (mm.checked == true)
           month_str = month_str.concat(",4");
-
         var mm = document.getElementById('May');
         if (mm.checked == true)
           month_str = month_str.concat(",5");
-
         var mm = document.getElementById('Jun');
         if (mm.checked == true)
           month_str = month_str.concat(",6");
-
         var mm = document.getElementById('Jul');
         if (mm.checked == true)
           month_str = month_str.concat(",7");
-
         var mm = document.getElementById('Aug');
         if (mm.checked == true)
           month_str = month_str.concat(",8");
-
         var mm = document.getElementById('Sep');
         if (mm.checked == true)
           month_str = month_str.concat(",9");
-
         var mm = document.getElementById('Oct');
         if (mm.checked == true)
           month_str = month_str.concat(",10");
-
         var mm = document.getElementById('Nov');
         if (mm.checked == true)
           month_str = month_str.concat(",11");
-
         var mm = document.getElementById('Dec');
         if (mm.checked == true)
           month_str = month_str.concat(",12");
-
-        // remove the leading ','
         month_str = month_str.substr(1);
-        // alert(month_str);
-
         arglist = arglist.concat("&months=");
         arglist = arglist.concat(month_str);
-        // alert("arglist: " + arglist);
-
         arglist = arglist.concat("&scale=");
         var y = document.getElementById("radioLin").checked;
-        // alert(y);
         if (y == true)
           arglist = arglist.concat('0');
         else
           arglist = arglist.concat('2');
-
         var purpose = $("#purpose").val();
         arglist = arglist.concat("&purpose=");
         arglist = arglist.concat(purpose);
-
-        // url = url + encodeURIComponent(arglist);
         url = url + encodeURI(arglist);
-        // url = url + arglist;
-        //alert("url: " + url);
-
-        var urlTimeBounds = "http://" + window.location.hostname + ":9002/svc/time_bounds?";
-        //var urlTimeBounds = "http://einstein.sv.cmu.edu" + ":9002/svc/time_bounds?";
+        var urlTimeBounds = "http:
         var arglistTB = "";
         arglistTB = arglistTB.concat("serviceType=");
         arglistTB = arglistTB.concat("1");
@@ -916,9 +749,6 @@
         arglistTB = arglistTB.concat("&var=");
         arglistTB = arglistTB.concat(variable);
         urlTimeBounds = urlTimeBounds + encodeURI(arglistTB);
-        //alert("urlTimeBounds: " + urlTimeBounds);
-
-		
         $.ajax({
             type: "GET",
             url: urlTimeBounds,
@@ -926,9 +756,7 @@
             data: null,
             success: function(data, textStatus, xhr) {
                 Response = data;
-                // alert("data: " + data);
                 if (data.success == false) {
-                    // alert(data.error);
                     Response = null;
                     var text = JSON.stringify(data, null, 4);
                     text = "Error in backend: <br>" + text; 
@@ -937,44 +765,29 @@
                     return;
                 }
                 var text = JSON.stringify(data, null, 4);
-                // alert("text: " + text);
-                // $("#Response").html("<pre>"+text+"</pre>");
-                // $("#Response").html(text);
-
                 var tb = data.time_bounds;
                 var bds = String(tb).split(",");
-                // alert("tb: " + tb);
-                // alert("bds: " + bds);
                 var lowerT = parseInt(bds[0]);
                 var upperT = parseInt(bds[1]);
-                // alert("lowerT: " + lowerT);
-                // alert("upperT: " + upperT);
                 var t0I = parseInt(t0);
                 var t1I = parseInt(t1);
-                // alert("t0: " + t0I);
-                // alert("t1: " + t1I);
-
                 if ( lowerT == 0 && upperT ==0 ) {
                   alert("We do not have data for this source and variable configuration.");
                   return;
                 }
-
                 if (t0I < lowerT && t1I < lowerT ||
                     t0I > upperT && t1I > upperT) {
                   alert("We do not have data that span your time range. Try the range inside ["+lowerT+", "+upperT+"].");
                   return;
                 }
-
                 if (t0I < lowerT && t1I <= upperT) {
                   alert("Your start year-month is out of bound. It has to be in or later than " + lowerT +
                         ". We will use the range ["+lowerT+", "+t1I+"] for you.");
                 }
-
                 if (t1I > upperT && t0I >= lowerT) {
                   alert("Your end year-month is out of bound. It has to be in or earlier than " + upperT +
                         ". We will use the range ["+t0I+", "+upperT+"] for you.");
                 }
-
                 if (t0I < lowerT && t1I > upperT ) {
                   alert("Both of your start and end year-months are out of bounds. They have to be in or earlier than " + upperT +
                         ", and in or later than " + lowerT + ". We will use the range ["+lowerT+", "+upperT+"] for you.");
@@ -983,15 +796,10 @@
             error: function(xhr, textStatus, errorThrown) {
 				$("#Response").html("error!");
 				$("#data_url").html("error!");
-                 //alert("xhr.status: "+xhr.status);
-                 //alert("error status: "+textStatus);
             },
             complete: function(xhr, textStatus) {
-                //alert("complete status: "+textStatus);
             }
         });
-
-		//alert("url" + url);
         $.ajax({
             type: "GET",
             url: url,
@@ -999,243 +807,179 @@
             data: null,
             success: function(data, textStatus, xhr) {
                 Response = data;
-                // alert("data: " + data);
                 if (data.success == false) {
-                    // alert(data.error);
                     Response = null;
                     var text = JSON.stringify(data, null, 4);
                     text = "Error in backend: <br>" + text; 
-                    // $("#Response").html("<span style='color:red'>" + text + "</span>");
                     $("#Response").html(text);
                     $("#data_url").html(text);
                     return;
                 }
                 var text = JSON.stringify(data, null, 4);
-                // alert(text);
-                // $("#Response").html("<pre>"+text+"</pre>");
                 $("#Response").html(text);
-
                 var html1 = "<img src='"+data.url+"' width='680' style=‘display: block; margin: 0 auto;’/>";
-                // alert(html1);
                 $("#Image").html(html1);
-
-                // post dataUrl to textarea and enable download button
                 $("#data_url").html(data.dataUrl);
                 enable_download_button();
-
             },
             error: function(xhr, textStatus, errorThrown) {
 		$("#Response").html("error!");
                 $("#data_url").html("error!");
-                // alert("xhr.status: "+xhr.status);
-                // alert("error status: "+textStatus);
             },
             complete: function(xhr, textStatus) {
-                //alert("complete status: "+textStatus);
             }
         });
-
       });
-
-
     });
-    
   </script>
-<!--
-
-//-->
-</script>
-}
-
-@main("Parameters of ConfId", scripts){
-	
-	@flash_message()   
-	 
-    <p>
-<div id="dataSource" style="display: none;">@parameters.getDataSource()</div>
-<div id="variableName" style="display: none;">@parameters.getVariableName()</div>
-<div id="startYearMonth" style="display: none;">@parameters.getStartYearMonth()</div>
-<div id="endYearMonth" style="display: none;">@parameters.getEndYearMonth()</div>
-<div id="selectMonths" style="display: none;">@parameters.getSelectMonths()</div>
-<div id="monthsPara" style="display: none;">@parameters.getMonth()</div>
-<div id="startLat" style="display: none;">@parameters.getStartLat()</div>
-<div id="endLat" style="display: none;">@parameters.getEndLat()</div>
-<div id="variableScale" style="display: none;">@parameters.getVariableScale()</div>
-<div id="executionPurpose" style="display: none;">@parameters.getExecutionPurpose()</div>
-<div id="image" style="display: none;">@parameters.getImage()</div>
-<div id="dataURL" style="display: none;">@parameters.getDataURL()</div>
-<div id="serviceResponseText" style="display: none;">@parameters.getServiceResponseText()</div>
-<table border="1" align="center">
-
-<tr>
-<td colspan="4">
-<center>
-<b>Service: 2-D Variable Zonal Mean</b> <br><br>
-This service generates a graph of a 2-dimensional variable's zonal mean with time averaing. <br>
-Select a data source (model or observation), a variable name, and a time range below.<br><br>
-</center>
-</td>
-</tr>
-
-<tr>
-<td>data source:</td><td><select name="data", id="data" onchange="select_data()">
-<!-- <option>NASA/obs4MIPs</option>  -->
 <optgroup label="Observation">
-<option>NASA/MODIS</option>
-<option>NASA/AMSRE</option>
-<option>NASA/TRMM</option>
-<option>NASA/GPCP</option>
-<option>NASA/QuikSCAT</option>
-<option>NASA/AVISO</option>
-<option>NASA/GRACE</option>
-<option>NOAA/NODC</option>
-<option>NASA/CERES</option>
+	<option>NASA/MODIS</option>
+	<option>NASA/AMSRE</option>
+	<option>NASA/TRMM</option>
+	<option>NASA/GPCP</option>
+	<option>NASA/QuikSCAT</option>
+	<option>NASA/AVISO</option>
+	<option>NASA/GRACE</option>
+	<option>NOAA/NODC</option>
+	<option>NASA/CERES</option>
 </optgroup>
 <optgroup label="Model: Historical">
-<option>CCCMA/CANESM2</option>
-<option>GFDL/ESM2G</option>
-<option>GISS/E2-H</option>
-<option>GISS/E2-R</option>
-<option>NCAR/CAM5</option>
-<option>NCC/NORESM</option>
-<option>UKMO/HadGEM2-ES</option>
+	<option>CCCMA/CANESM2</option>
+	<option>GFDL/ESM2G</option>
+	<option>GISS/E2-H</option>
+	<option>GISS/E2-R</option>
+	<option>NCAR/CAM5</option>
+	<option>NCC/NORESM</option>
+	<option>UKMO/HadGEM2-ES</option>
 </optgroup>
 <optgroup label="Model: AMIP">
-<option>CCCMA/CANAM4</option>
-<option>CSIRO/MK3.6</option>
-<option>GFDL/CM3</option>
-<option>IPSL/CM5A-LR</option>
-<option>MIROC/MIROC5</option>
-<option>UKMO/HadGEM2-A</option>
+	<option>CCCMA/CANAM4</option>
+	<option>CSIRO/MK3.6</option>
+	<option>GFDL/CM3</option>
+	<option>IPSL/CM5A-LR</option>
+	<option>MIROC/MIROC5</option>
+	<option>UKMO/HadGEM2-A</option>
 </optgroup>
 <optgroup label="Reanalysis">
-<option>ECMWF/interim</option>
+	<option>ECMWF/interim</option>
 </optgroup>
-</select></td>
-
-<td>variable name:</td><td><select name="var", id="var" onchange="select_var()">
-<option>Precipitation Flux</option>
-<option>Total Cloud Fraction</option>
-<option>Surface Temperature</option>
-<option>Sea Surface Temperature</option>
-<option>Eastward Near-Surface Wind</option>
-<option>Northward Near-Surface Wind</option>
-<option>Near-Surface Wind Speed</option>
-<option>Sea Surface Height</option>
-<option>Leaf Area Index</option>
-<option>Equivalent Water Height Over Land</option>
-<option>Equivalent Water Height Over Ocean</option>
-<option>Ocean Heat Content Anomaly within 700 m Depth</option>
-<option>Ocean Heat Content Anomaly within 2000 m Depth</option>
-<option>Surface Downwelling Longwave Radiation</option>
-<option>Surface Downwelling Shortwave Radiation</option>
-<option>Surface Upwelling Longwave Radiation</option>
-<option>Surface Upwelling Shortwave Radiation</option>
-<option>Surface Downwelling Clear-Sky Longwave Radiation</option>
-<option>Surface Downwelling Clear-Sky Shortwave Radiation</option>
-<option>Surface Upwelling Clear-Sky Shortwave Radiation</option>
-<option>TOA Incident Shortwave Radiation</option>
-<option>TOA Outgoing Longwave Radiation</option>
-<option>TOA Outgoing Shortwave Radiation</option>
-<option>TOA Outgoing Clear-Sky Longwave Radiation</option>
-<option>TOA Outgoing Clear-Sky Shortwave Radiation</option>
+</select>
+</td>
+<td>variable name:</td>
+<td><select name="var" , id="var" onchange="select_var()">
+		<option>Precipitation Flux</option>
+		<option>Total Cloud Fraction</option>
+		<option>Surface Temperature</option>
+		<option>Sea Surface Temperature</option>
+		<option>Eastward Near-Surface Wind</option>
+		<option>Northward Near-Surface Wind</option>
+		<option>Near-Surface Wind Speed</option>
+		<option>Sea Surface Height</option>
+		<option>Leaf Area Index</option>
+		<option>Equivalent Water Height Over Land</option>
+		<option>Equivalent Water Height Over Ocean</option>
+		<option>Ocean Heat Content Anomaly within 700 m Depth</option>
+		<option>Ocean Heat Content Anomaly within 2000 m Depth</option>
+		<option>Surface Downwelling Longwave Radiation</option>
+		<option>Surface Downwelling Shortwave Radiation</option>
+		<option>Surface Upwelling Longwave Radiation</option>
+		<option>Surface Upwelling Shortwave Radiation</option>
+		<option>Surface Downwelling Clear-Sky Longwave Radiation</option>
+		<option>Surface Downwelling Clear-Sky Shortwave Radiation</option>
+		<option>Surface Upwelling Clear-Sky Shortwave Radiation</option>
+		<option>TOA Incident Shortwave Radiation</option>
+		<option>TOA Outgoing Longwave Radiation</option>
+		<option>TOA Outgoing Shortwave Radiation</option>
+		<option>TOA Outgoing Clear-Sky Longwave Radiation</option>
+		<option>TOA Outgoing Clear-Sky Shortwave Radiation</option>
 </select></td>
 </tr>
-
 <tr>
-<td>start year-month:</td><td><input id="t0" value="2004-01" alt="start"/></td>
-<td>end year-month:</td><td><input id="t1" value="2004-12" alt="end"/></td>
+	<td>start year-month:</td>
+	<td><input id="t0" value="2004-01" alt="start" /></td>
+	<td>end year-month:</td>
+	<td><input id="t1" value="2004-12" alt="end" /></td>
 </tr>
-
 <tr>
-<td>select months:</td>
-<td><select name="months" id="months" onchange="select_months()">
-<option id="all">select all</option>
-<option id="none">select none</option>
-<option id="summer">Summer:Jun-Jul-Aug</option>
-<option id="autum">Autumn:Sep-Oct-Nov</option>
-<option id="winter">Winter:Dec-Jan-Feb</option>
-<option id="spring">Spring:Mar-Apr-May</option> </select>
-</td>
-<td>
-</td>
-<td>
+	<td>select months:</td>
+	<td><select name="months" id="months" onchange="select_months()">
+			<option id="all">select all</option>
+			<option id="none">select none</option>
+			<option id="summer">Summer:Jun-Jul-Aug</option>
+			<option id="autum">Autumn:Sep-Oct-Nov</option>
+			<option id="winter">Winter:Dec-Jan-Feb</option>
+			<option id="spring">Spring:Mar-Apr-May</option>
+	</select></td>
+	<td></td>
+	<td>
 </tr>
-
 <tr>
-<td>
-<label><input type="checkbox" name="option1" id="Jan" value="Jan" /> Jan<br></label>
-<label><input type="checkbox" name="option1" id="Feb" value="Feb" /> Feb<br></label>
-<label><input type="checkbox" name="option1" id="Mar" value="Mar" /> Mar<br></label>
-</td>
-<td>
-<label><input type="checkbox" name="option1" id="Apr" value="Apr" /> Apr<br></label>
-<label><input type="checkbox" name="option1" id="May" value="May" /> May<br></label>
-<label><input type="checkbox" name="option1" id="Jun" value="Jun" /> Jun<br></label>
-</td>
-<td>
-<label><input type="checkbox" name="option1" id="Jul" value="Jul" /> Jul<br></label>
-<label><input type="checkbox" name="option1" id="Aug" value="Aug" /> Aug<br></label>
-<label><input type="checkbox" name="option1" id="Sep" value="Sep" /> Sep<br></label>
-</td>
-<td>
-<label><input type="checkbox" name="option1" id="Oct" value="Oct" /> Oct<br></label>
-<label><input type="checkbox" name="option1" id="Nov" value="Nov" /> Nov<br></label>
-<label><input type="checkbox" name="option1" id="Dec" value="Dec" /> Dec<br></label>
-</td>
+	<td><label><input type="checkbox" name="option1" id="Jan"
+			value="Jan" /> Jan<br></label> <label><input type="checkbox"
+			name="option1" id="Feb" value="Feb" /> Feb<br></label> <label><input
+			type="checkbox" name="option1" id="Mar" value="Mar" /> Mar<br></label>
+	</td>
+	<td><label><input type="checkbox" name="option1" id="Apr"
+			value="Apr" /> Apr<br></label> <label><input type="checkbox"
+			name="option1" id="May" value="May" /> May<br></label> <label><input
+			type="checkbox" name="option1" id="Jun" value="Jun" /> Jun<br></label>
+	</td>
+	<td><label><input type="checkbox" name="option1" id="Jul"
+			value="Jul" /> Jul<br></label> <label><input type="checkbox"
+			name="option1" id="Aug" value="Aug" /> Aug<br></label> <label><input
+			type="checkbox" name="option1" id="Sep" value="Sep" /> Sep<br></label>
+	</td>
+	<td><label><input type="checkbox" name="option1" id="Oct"
+			value="Oct" /> Oct<br></label> <label><input type="checkbox"
+			name="option1" id="Nov" value="Nov" /> Nov<br></label> <label><input
+			type="checkbox" name="option1" id="Dec" value="Dec" /> Dec<br></label>
+	</td>
 </tr>
-
 <tr>
-<td>start lat (deg):</td><td><input id="lat0" value="-90"/></td>
-<td>end lat (deg):</td><td><input id="lat1" value="90"/></td>
+	<td>start lat (deg):</td>
+	<td><input id="lat0" value="-90" /></td>
+	<td>end lat (deg):</td>
+	<td><input id="lat1" value="90" /></td>
 </tr>
-
-<tr>               
-<td colspan="1">   
-variable scale:       
-</td>              
-<td colspan="3">   
-<form> <input type="radio" name="scale1" value="linear" id="radioLin" checked>linear
-<input type="radio" name="scale1" value="logarithmic" id="radioLog">logarithmic
-</form>        
-</td>          
-</tr> 
-
 <tr>
-<td colspan="1">
-Execution purpose
-</td>
-<td colspan="3">
-<form>
-<textarea name="purpose" id="purpose" rows="4" cols="50"> </textarea>
-</form>
-</td>
+	<td colspan="1">variable scale:</td>
+	<td colspan="3">
+		<form>
+			<input type="radio" name="scale1" value="linear" id="radioLin"
+				checked>linear <input type="radio" name="scale1"
+				value="logarithmic" id="radioLog">logarithmic
+		</form>
+	</td>
 </tr>
-
 <tr>
-<td colspan="2" align="center"><input id="twodvarzonalmean" type="submit" value="            Run  Again            " style="height:28px"/></td>
-<form>
-<td colspan="2" align="center"><input id="download_data" type="button" value="Download Data" style="height:28px"/>
-</td>
-</form>
-
+	<td colspan="1">Execution purpose</td>
+	<td colspan="3">
+		<form>
+			<textarea name="purpose" id="purpose" rows="4" cols="50"> </textarea>
+		</form>
+	</td>
+</tr>
+<tr>
+	<td colspan="2" align="center"><input id="twodvarzonalmean"
+		type="submit" value="            Run  Again            "
+		style="height: 28px" /></td>
+	<form>
+		<td colspan="2" align="center"><input id="download_data"
+			type="button" value="Download Data" style="height: 28px" /></td>
+	</form>
 </tr>
-
 <td colspan="4">
-<div id="Image">Image Here</div>
+	<div id="Image">Image Here</div>
 </td>
 </tr>
 <tr>
-<td colspan="4" align="center">
-<textarea readonly id="data_url" cols="89" rows="2">Data URL Here</textarea>
-</td>
+	<td colspan="4" align="center"><textarea readonly id="data_url"
+			cols="89" rows="2">Data URL Here</textarea></td>
 </tr>
 <tr>
-<td colspan="4" align="center">
-<textarea readonly id="Response" cols="89" rows="6">Service Response Text Here</textarea>
-</td>
+	<td colspan="4" align="center"><textarea readonly id="Response"
+			cols="89" rows="6">Service Response Text Here</textarea></td>
 </tr>
 </p>
-
 </table>
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/f22b3e32/app/views/climate/climateServices.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/climateServices.scala.html b/app/views/climate/climateServices.scala.html
index 3fe95d3..9c47938 100644
--- a/app/views/climate/climateServices.scala.html
+++ b/app/views/climate/climateServices.scala.html
@@ -7,7 +7,7 @@
 	<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
 	<script type="text/javascript">
 	$(document).ready(function(){
-		//alert($("#url").text());
+
 	});
 	</script>
 }


[49/50] [abbrv] incubator-cmda git commit: Change README file

Posted by xi...@apache.org.
Change README file

Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/860ca07b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/860ca07b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/860ca07b

Branch: refs/heads/master
Commit: 860ca07b5744844abaab0e80c447ddc145b3fc4d
Parents: f90e732
Author: mingqi830 <mq...@andrew.cmu.edu>
Authored: Fri Sep 4 16:54:26 2015 -0700
Committer: mingqi830 <mq...@andrew.cmu.edu>
Committed: Fri Sep 4 16:54:26 2015 -0700

----------------------------------------------------------------------
 README.md | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/860ca07b/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 3c02ada..f1ba5d7 100644
--- a/README.md
+++ b/README.md
@@ -1,17 +1,11 @@
-Fall-2013-CMUSDS
+Apache Climate Model Diagnostic Analyzer
 ================
 
-Rewrite the current Ruby on Rails web app on Heroku (http://cmu-sds.herokuapp.com/) into Java Play framework, aligning with the current APIs, to handle metadata view/creation/deletion of our Sensor Data Service Platform. Also, this platform will allow users to report bugs and have a detailed view of active VS nonactive sensors. This platform makes use of the Sensor Service Platform API, a REST API for interacting with the platform.
+The Climate Model Diagnostic Analyzer (CMDA) provides web services for multi-aspect physics-based and phenomenon-oriented climate model performance evaluation and diagnosis through the comprehensive and synergistic use of multiple observational data, reanalysis data, and model outputs.
 
-Pre-Requisites running on a local machine
+Requirements
 ============
 Java 1.6+ (http://www.oracle.com/technetwork/java/javase/downloads)
-Play 2.2.x (http://www.playframework.com/download)
 
+Play 2.2.x (http://www.playframework.com/download)
 
-How to run on a local machine
-=============
-1. Install Play Framework. Instruction can be found at http://www.playframework.com/documentation/2.2.x/Installing
-2. Downlaod the source code from https://github.com/cmusv-sc/ArchF2013-Project3-FT
-3. From the parent folder, run the command: 'play run'
-4. Local App will available at localhost:9000


[04/50] [abbrv] incubator-cmda git commit: Remove Device and Sensor Type

Posted by xi...@apache.org.
Remove Device and Sensor Type

Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/247a7178
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/247a7178
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/247a7178

Branch: refs/heads/master
Commit: 247a717809052c30606475bf899d97f2cf3ed098
Parents: 6c887ad
Author: mingqi830 <mq...@andrew.cmu.edu>
Authored: Wed Sep 2 15:31:25 2015 -0700
Committer: mingqi830 <mq...@andrew.cmu.edu>
Committed: Wed Sep 2 15:31:25 2015 -0700

----------------------------------------------------------------------
 app/controllers/DeviceTypeController.java | 129 -----------------------
 app/controllers/SensorTypeController.java | 140 -------------------------
 app/views/deviceTypes.scala.html          | 102 ------------------
 app/views/header.scala.html               |   4 +-
 app/views/sensorTypes.scala.html          | 136 ------------------------
 conf/routes                               |  12 ---
 6 files changed, 2 insertions(+), 521 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/247a7178/app/controllers/DeviceTypeController.java
----------------------------------------------------------------------
diff --git a/app/controllers/DeviceTypeController.java b/app/controllers/DeviceTypeController.java
deleted file mode 100644
index 3a2a224..0000000
--- a/app/controllers/DeviceTypeController.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright (c) 2013 Carnegie Mellon University Silicon Valley. 
- * All rights reserved. 
- * 
- * This program and the accompanying materials are made available
- * under the terms of dual licensing(GPL V2 for Research/Education
- * purposes). GNU Public License v2.0 which accompanies this distribution
- * is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
- * 
- * Please contact http://www.cmu.edu/silicon-valley/ if you have any 
- * questions.
- * 
- * */
-package controllers;
-
-import java.util.*;
-
-import com.fasterxml.jackson.databind.*;
-import com.fasterxml.jackson.databind.node.*;
-
-import play.libs.Json;
-import models.metadata.DeviceType;
-import play.data.DynamicForm;
-import play.data.Form;
-import play.mvc.*;
-import util.APICall;
-import util.APICall.ResponseType;
-import views.html.*;
-
-//@Security.Authenticated(Secured.class)
-public class DeviceTypeController extends Controller {
-	final static Form<DeviceType> deviceTypeForm = Form.form(DeviceType.class);
-
-	public static Result deviceTypes() {
-		// if (Secured.isLoggedIn())
-		// return ok(deviceTypes.render(DeviceType.all(), deviceTypeForm));
-		// else
-		// return forbidden();
-		return ok(deviceTypes.render(DeviceType.all(), deviceTypeForm));
-	}
-
-	public static Result newDeviceType() {
-		// Form<DeviceType> dt = deviceTypeForm.bindFromRequest();
-		Map<String, String[]> dtFormEncoded = request().body()
-				.asFormUrlEncoded();
-		try {
-			ObjectNode jsonData = Json.newObject();
-			String deviceTypeName = dtFormEncoded.get("deviceTypeName")[0];
-
-			// should not contain spaces
-			if (deviceTypeName != null && !deviceTypeName.isEmpty()
-					&& !deviceTypeName.contains(" ")) {
-				jsonData.put("deviceTypeName", deviceTypeName);
-			}
-			jsonData.put("manufacturer", dtFormEncoded.get("manufacturer")[0]);
-			jsonData.put("version", dtFormEncoded.get("version")[0]);
-			jsonData.put("deviceTypeUserDefinedFields",
-					dtFormEncoded.get("deviceTypeUserDefinedFields")[0]);
-
-			ArrayNode arrayNode = jsonData.putArray("sensorTypeNames");
-			for (int i = 0; i < dtFormEncoded.get("sensorTypeNames").length; i++) {
-				arrayNode.add(dtFormEncoded.get("sensorTypeNames")[i]);
-			}
-
-			// create the item by calling the API
-			JsonNode response = DeviceType.create(jsonData);
-
-			// flash the response message
-			Application.flashMsg(response);
-		} catch (IllegalStateException e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall
-					.createResponse(ResponseType.CONVERSIONERROR));
-		} catch (Exception e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall.createResponse(ResponseType.UNKNOWN));
-		}
-		return redirect("/deviceTypes");
-	}
-
-	public static Result editDeviceType() {
-		DynamicForm df = DynamicForm.form().bindFromRequest();
-		ObjectNode jsonData = Json.newObject();
-		try {
-			String deviceTypeName = df.field("pk").value();
-
-			if (deviceTypeName != null && !deviceTypeName.isEmpty()) {
-				jsonData.put("deviceTypeName", deviceTypeName);
-			}
-
-			String editField = df.field("name").value();  
-			if (editField != null && !editField.isEmpty()) {
-				jsonData.put(editField, df.field("value").value());
-			}
-
-			// Call the edit() method
-			JsonNode response = DeviceType.edit(deviceTypeName, jsonData);
-
-			// flash the response message
-			Application.flashMsg(response);
-
-		} catch (IllegalStateException e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall
-					.createResponse(ResponseType.CONVERSIONERROR));
-		} catch (Exception e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall.createResponse(ResponseType.UNKNOWN));
-		}
-
-		return ok("updated");
-	}
-
-	public static Result deleteDeviceType() {
-		DynamicForm df = DynamicForm.form().bindFromRequest();
-		String deviceTypeName = df.field("idHolder").value();
-
-		// Call the delete() method
-		JsonNode response = DeviceType.delete(deviceTypeName);
-
-		// flash the response message
-		Application.flashMsg(response);
-		return redirect("/deviceTypes");
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/247a7178/app/controllers/SensorTypeController.java
----------------------------------------------------------------------
diff --git a/app/controllers/SensorTypeController.java b/app/controllers/SensorTypeController.java
deleted file mode 100644
index f78a22d..0000000
--- a/app/controllers/SensorTypeController.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (c) 2013 Carnegie Mellon University Silicon Valley. 
- * All rights reserved. 
- * 
- * This program and the accompanying materials are made available
- * under the terms of dual licensing(GPL V2 for Research/Education
- * purposes). GNU Public License v2.0 which accompanies this distribution
- * is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
- * 
- * Please contact http://www.cmu.edu/silicon-valley/ if you have any 
- * questions.
- * 
- * */
-package controllers;
-
-import com.fasterxml.jackson.databind.*;
-import com.fasterxml.jackson.databind.node.*;
-
-import models.metadata.SensorType;
-import play.data.DynamicForm;
-import play.data.Form;
-import play.libs.Json;
-import play.mvc.*;
-import util.APICall;
-import util.APICall.ResponseType;
-import views.html.*;
-
-public class SensorTypeController extends Controller {
-	final static Form<SensorType> sensorTypeForm = Form.form(SensorType.class);
-
-	public static Result sensorTypes() {
-		return ok(sensorTypes.render(SensorType.all(), sensorTypeForm));
-	}
-
-	public static Result newSensorType() {
-		Form<SensorType> st = sensorTypeForm.bindFromRequest();
-
-		ObjectNode jsonData = Json.newObject();
-
-		try {
-
-			String sensorTypeName = st.field("sensorTypeName").value();
-
-			// should not contain spaces
-			if (sensorTypeName != null && !sensorTypeName.isEmpty()
-					&& !sensorTypeName.contains(" ")) {
-				jsonData.put("sensorTypeName", sensorTypeName);
-			}
-			jsonData.put("manufacturer", st.field("manufacturer").value());
-
-			String version = st.field("version").value();
-			if (version != null && !version.isEmpty()) {
-				jsonData.put("version", Double.valueOf(version));
-			}
-			String maximumValue = st.field("maximumValue").value();
-			if (maximumValue != null && !maximumValue.isEmpty()) {
-				jsonData.put("maximumValue", Double.valueOf(maximumValue));
-			}
-			String minimumValue = st.field("minimumValue").value();
-			if (minimumValue != null && !minimumValue.isEmpty()) {
-				jsonData.put("minimumValue", Double.valueOf(minimumValue));
-			}
-			String unit = st.field("unit").value();
-			if (unit != null && !unit.isEmpty()) {
-				jsonData.put("unit", unit);
-			}
-			String interpreter = st.field("interpreter").value();
-			if (interpreter != null && !interpreter.isEmpty()) {
-				jsonData.put("interpreter", interpreter);
-			}
-			jsonData.put("sensorCategoryName", st.field("sensorCategoryName")
-					.value());
-			jsonData.put("sensorTypeUserDefinedFields",
-					st.field("sensorTypeUserDefinedFields").value());
-
-			// create the item by calling the API
-			JsonNode response = SensorType.create(jsonData);
-
-			// flash the response message
-			Application.flashMsg(response);
-		} catch (IllegalStateException e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall
-					.createResponse(ResponseType.CONVERSIONERROR));
-		} catch (Exception e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall.createResponse(ResponseType.UNKNOWN));
-		}
-
-		return redirect("/sensorTypes");
-	}
-
-	public static Result editSensorType() {
-		DynamicForm df = DynamicForm.form().bindFromRequest();
-		ObjectNode jsonData = Json.newObject();
-		try {
-			String sensorTypeName = df.field("pk").value();
-
-			if (sensorTypeName != null && !sensorTypeName.isEmpty()) {
-				jsonData.put("sensorTypeName", sensorTypeName);
-			}
-
-			String editField = df.field("name").value();  
-			if (editField != null && !editField.isEmpty()) {
-				jsonData.put(editField, df.field("value").value());
-			}
-			
-			// Call the edit() method
-			JsonNode response = SensorType.edit(jsonData);
-
-			// flash the response message
-			Application.flashMsg(response);
-
-		} catch (IllegalStateException e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall
-					.createResponse(ResponseType.CONVERSIONERROR));
-		} catch (Exception e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall.createResponse(ResponseType.UNKNOWN));
-		}
-		return ok("updated");
-	}
-	
-	public static Result deleteSensorType() {
-		DynamicForm df = DynamicForm.form().bindFromRequest();
-		String sensorTypeName = df.field("idHolder").value();
-
-		// Call the delete() method
-		JsonNode response = SensorType.delete(sensorTypeName);
-
-		// flash the response message
-		Application.flashMsg(response);
-
-		return redirect("/sensorTypes");
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/247a7178/app/views/deviceTypes.scala.html
----------------------------------------------------------------------
diff --git a/app/views/deviceTypes.scala.html b/app/views/deviceTypes.scala.html
deleted file mode 100644
index 98e93dc..0000000
--- a/app/views/deviceTypes.scala.html
+++ /dev/null
@@ -1,102 +0,0 @@
-
-@(deviceTypes: List[metadata.DeviceType], deviceTypeForm: play.data.Form[metadata.DeviceType])
-
-@import helper._
-
-@scripts = {
-	<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
-}
-
-@main("DeviceTypes", scripts) {
-    
-    @flash_message()
-    
-    <h1>@deviceTypes.size() Devices Types</h1>
-    <table class="table table-striped table-bordered table-condensed">
-	    <tr>
-	    	<td>Device Type Name</td>   
-	    	<td>Manufacturer</td>
-	    	<td>Version</td>
-	    	<td>Sensor Type Names</td>
-	        <td>User Defined Fields</td>
-	    						
-	    	@if(session.get("email")){
-	    		<td>Operation</td>
-	    	}
-	    </tr>
-
-    	@for(deviceType <- deviceTypes) {
-    	<tr>
-            <td>@deviceType.getDeviceTypeName()</td>
-            <td>@deviceType.getManufacturer()</td>
-            <td>@deviceType.getVersion()</td>
-	    	<td>@deviceType.getSensorTypeNames()</td>
-            <td>
-            <span class="@deviceType.getDeviceTypeName() editable"
-            	data-name='deviceTypeUserDefinedFields'>
-            	@deviceType.getDeviceTypeUserDefinedFields()
-            </span>
-            </td>
-	    	@if(session.get("email")){
-            		
-	              	<td class="operation">
-						<input type="button" class="edit-btn btn btn-primary" value="Edit" 
-							data-pk='@deviceType.getDeviceTypeName()' 
-							data-url='@routes.DeviceTypeController.editDeviceType()' 
-						>						
-             			@form(routes.DeviceTypeController.deleteDeviceType()){
-               		 		<input name="idHolder" type="hidden" value="@deviceType.getDeviceTypeName()">
-        							<input type="submit"  class="btn btn-danger" value="Delete" onclick="return confirm('Are you sure you want to delete this item?')">
-            			}
-               			
-            		</td>
-            }
-    	</tr>
-        }
-    </table>
-    
-    @if(session.get("email")){
-    <h2>Add a new device type</h2>
-
-	    @form(action = routes.DeviceTypeController.newDeviceType()) {
-	        
-	            @inputText(
-	                deviceTypeForm("deviceTypeName"), 
-	                '_label -> "Device Type Name * (Please DO NOT contain spaces)",                 
-	                '_error -> deviceTypeForm.globalError                                
-	            )
-	            @inputText(
-	                deviceTypeForm("manufacturer"), 
-	                '_label -> "Manufacturer", 
-	                '_error -> deviceTypeForm.globalError                                
-	            )
-	            @inputText(
-	                deviceTypeForm("version"), 
-	                '_label -> "Version",
-	                '_error -> deviceTypeForm.globalError                                
-	            )
-	            @inputText(
-	            	deviceTypeForm("deviceTypeUserDefinedFields"),
-	            	'_label -> "User Defined Fields",
-	            	'_error -> deviceTypeForm.globalError
-	            )
-	            <dt>
-	            	<label>Sensor Type Name</label>
-	            </dt>
-	            <dd>
-		            <select id="sensorTypeNames" name="sensorTypeNames" multiple>
-		            	@for(sensorTypeName <- metadata.SensorType.allSensorTypeName()) {
-		            		<option value="@sensorTypeName">@sensorTypeName</option>
-		            	}
-		            </select>
-	            </dd>
-	           
-	      
-	        <div class="actions">
-	            <input type="submit" class="btn primary" value="Register">
-	            <a href="@routes.DeviceTypeController.deviceTypes()" class="btn">Cancel</a>
-	        </div>
-	        
-	    }
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/247a7178/app/views/header.scala.html
----------------------------------------------------------------------
diff --git a/app/views/header.scala.html b/app/views/header.scala.html
index c270786..80d13c3 100644
--- a/app/views/header.scala.html
+++ b/app/views/header.scala.html
@@ -24,9 +24,9 @@
 						<ul class="dropdown-menu">
 							<li><a href="@routes.SensorCategoryController.sensorCategories()">1. Sensor
 									Categories</a></li>
-							<li><a href="@routes.SensorTypeController.sensorTypes()">2. Sensor
+							<li><a href="">2. Sensor
 									Types</a></li>
-							<li><a href="@routes.DeviceTypeController.deviceTypes()">3. Device Types</a></li>							
+							<li><a href="">3. Device Types</a></li>							
 							<li><a href="@routes.DeviceController.devices()">4. Devices</a></li>
 							<li><a href="@routes.SensorController.sensors()">5. Sensors</a></li>
 						</ul></li>

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/247a7178/app/views/sensorTypes.scala.html
----------------------------------------------------------------------
diff --git a/app/views/sensorTypes.scala.html b/app/views/sensorTypes.scala.html
deleted file mode 100644
index dced489..0000000
--- a/app/views/sensorTypes.scala.html
+++ /dev/null
@@ -1,136 +0,0 @@
-
-@(sensorTypes: List[metadata.SensorType], sensorTypeForm: play.data.Form[metadata.SensorType])
-
-@import helper._
-@import helper.twitterBootstrap._
-
-@scripts = {
-	<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
-}
-
-@main("Sensor Types", scripts) {
-    
-    @flash_message()
-    
-    <h1>@sensorTypes.size() Sensor Types</h1>
-    <table class="table table-striped table-bordered table-condensed">
-    <tr>
-    	<td>Sensor Type Name</td>
-    	<td>Manufacturer</td>
-    	<td>Version</td>
-    	<td>Max Value</td>
-    	<td>Min Value</td>
-    	<td>Unit</td>
-    	<td>Interpreter</td>
-    	<td>Sensor Category</td>
-    	<td>User Defined Fields</td>
-    	
-    	
-    	@if(session.get("email")){
-    	<td>Operation</td>
-    	}
-    </tr>
-
-        @for(sensorType <- sensorTypes) {
-    <tr id="@sensorType.getId()">
-            <td>@sensorType.getSensorTypeName()</td>
-                <td>@sensorType.getManufacturer()</td>
-                <td>@sensorType.getVersion()</td>
-                <td>@sensorType.getMaxValue()</td>
-                <td>@sensorType.getMinValue()</td>
-                <td>@sensorType.getUnit()</td>
-                <td>@sensorType.getInterpreter()</td>
-                <td>@sensorType.getSensorCategoryName()</td>
-                <td>
-	                <span class="@sensorType.getSensorTypeName() editable"
-	                	data-name='sensorTypeUserDefinedFields'>
-	                	@sensorType.getSensorTypeUserDefinedFields()
-	                </span>
-                </td>
-                
-    			@if(session.get("email")){
-
-	              	<td class="operation">
-						
-						<input type="button" class="edit-btn btn btn-primary" value="Edit" 
-							data-pk='@sensorType.getSensorTypeName()' 
-							data-url='@routes.SensorTypeController.editSensorType()' 
-						>
-						
-						
-	               		 @form(routes.SensorTypeController.deleteSensorType()){
-	               		 	<input name="idHolder" type="hidden" value="@sensorType.getSensorTypeName()">
-	        				<input type="submit"  class="btn btn-danger" value="Delete" onclick="return confirm('Are you sure you want to delete this item?')">
-	            		}
-	          		</td>
-           			
-            	}
-    </tr>
-        }
-    </table>
-    
-    
-    @if(session.get("email")){
-    <h2>Add a new sensor type</h2>
-    
-    @form(routes.SensorTypeController.newSensorType()) {
-         
-        @inputText(
-                sensorTypeForm("sensorTypeName"), 
-                '_label -> "Sensor Type Name * (Please DO NOT contain spaces)",     
-                'size -> 30,
-                'placeholder-> "the name of this sensor type",           
-                '_error -> sensorTypeForm.globalError                                
-        )
-        @inputText(
-                sensorTypeForm("manufacturer"), 
-                '_label -> "Manufacturer",  
-                'size -> 30,
-                'placeholder-> "the name of Manufacturer",               
-                '_error -> sensorTypeForm.globalError                                
-        )
-        @inputText(
-                sensorTypeForm("version"), 
-                '_label -> "Version",
-                'placeholder-> 1.0,                 
-                '_error -> sensorTypeForm.globalError                                
-        )
-        @inputText(
-                sensorTypeForm("maximumValue"), 
-                '_label -> "Max Value",
-                '_error -> sensorTypeForm.globalError                                
-        )
-        @inputText(
-                sensorTypeForm("minimumValue"), 
-                '_label -> "Min Value",                 
-                '_error -> sensorTypeForm.globalError                                
-        )
-        @inputText(
-                sensorTypeForm("unit"), 
-                '_label -> "Unit",                 
-                'placeholder-> "Celsius",                 
-                '_error -> sensorTypeForm.globalError                                
-        )
-        @inputText(
-                sensorTypeForm("interpreter"), 
-                '_label -> "Interpreter",                 
-                '_error -> sensorTypeForm.globalError                                
-        )
-        @select(
-        		sensorTypeForm("sensorCategoryName"), 
-                options(metadata.SensorCategory.allSensorCategoryName()),
-     			'_label -> "Sensor Category",
-                '_error -> sensorTypeForm.globalError
-        		)
-        		
-         @inputText(
-                sensorTypeForm("sensorTypeUserDefinedFields"), 
-                '_label -> "User Defined Fields",                     
-                '_error -> sensorTypeForm.globalError                                
-        )
-        <input class="btn" type="submit" value="Register">
-        <a href="@routes.SensorTypeController.sensorTypes()" class="btn">Cancel</a>
-        
-    }
- 		}   
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/247a7178/conf/routes
----------------------------------------------------------------------
diff --git a/conf/routes b/conf/routes
index 59a4927..62c756a 100644
--- a/conf/routes
+++ b/conf/routes
@@ -35,18 +35,6 @@ POST        /solve/report                                        controllers.Bug
 # Map static resources from the /public folder to the /assets URL path
 GET         /assets/*file                                        controllers.Assets.at(path="/public", file)
 
-# sensor_types
-GET         /sensorTypes                                         controllers.SensorTypeController.sensorTypes()
-POST        /new/sensorTypes                                     controllers.SensorTypeController.newSensorType()
-POST        /delete/sensorTypes                                  controllers.SensorTypeController.deleteSensorType()
-POST        /edit/sensorTypes                                    controllers.SensorTypeController.editSensorType()
-
-# device_types
-GET         /deviceTypes                                         controllers.DeviceTypeController.deviceTypes()
-POST        /new/deviceTypes                                     controllers.DeviceTypeController.newDeviceType()
-POST        /delete/deviceTypes                                  controllers.DeviceTypeController.deleteDeviceType()
-POST        /edit/deviceTypes                                    controllers.DeviceTypeController.editDeviceType()
-
 # devices
 GET         /devices                                             controllers.DeviceController.devices()
 POST        /new/devices                                         controllers.DeviceController.newDevice()


[42/50] [abbrv] incubator-cmda git commit: add comment to all views package

Posted by xi...@apache.org.
add comment to all views package


Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/94545d6f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/94545d6f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/94545d6f

Branch: refs/heads/master
Commit: 94545d6f155240618aadd7b8c984a92e5d44f5b9
Parents: 07a31d1
Author: cat1021 <lo...@gmail.com>
Authored: Fri Sep 4 16:28:51 2015 -0700
Committer: cat1021 <lo...@gmail.com>
Committed: Fri Sep 4 16:28:51 2015 -0700

----------------------------------------------------------------------
 app/views/main.scala.html | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/94545d6f/app/views/main.scala.html
----------------------------------------------------------------------
diff --git a/app/views/main.scala.html b/app/views/main.scala.html
index e919a4c..7bda335 100644
--- a/app/views/main.scala.html
+++ b/app/views/main.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @(title: String)(content: Html)
 
 <!DOCTYPE html>


[36/50] [abbrv] incubator-cmda git commit: Merge branch 'master' of https://github.com/cmusv-sc/ApacheCMDA-Frontend.git

Posted by xi...@apache.org.
Merge branch 'master' of https://github.com/cmusv-sc/ApacheCMDA-Frontend.git

Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/42e1e0a1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/42e1e0a1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/42e1e0a1

Branch: refs/heads/master
Commit: 42e1e0a1dd98ecff62aa357ae8bdee9f2bfcc352
Parents: 081668f 19897da
Author: mingqi830 <mq...@andrew.cmu.edu>
Authored: Fri Sep 4 16:13:33 2015 -0700
Committer: mingqi830 <mq...@andrew.cmu.edu>
Committed: Fri Sep 4 16:13:33 2015 -0700

----------------------------------------------------------------------
 app/controllers/AboutusController.java        |  25 +-
 app/controllers/AccountController.java        |  63 +--
 app/controllers/Application.java              |  29 +-
 app/controllers/BugReportController.java      |  41 +-
 app/controllers/ClimateServiceController.java | 533 +++++++--------------
 app/controllers/HttpHelper.java               |  20 +-
 app/controllers/dataSetController.java        |  19 +-
 app/util/Constants.java                       |   2 +-
 app/views/climate/header.scala.html           |   2 +-
 conf/routes                                   |   2 +-
 10 files changed, 206 insertions(+), 530 deletions(-)
----------------------------------------------------------------------



[03/50] [abbrv] incubator-cmda git commit: Change project name

Posted by xi...@apache.org.
Change project name

Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/6c887ad9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/6c887ad9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/6c887ad9

Branch: refs/heads/master
Commit: 6c887ad9eee07e16f95df9c08e4423cd3170238b
Parents: 011075b
Author: mingqi830 <mq...@andrew.cmu.edu>
Authored: Wed Sep 2 15:09:53 2015 -0700
Committer: mingqi830 <mq...@andrew.cmu.edu>
Committed: Wed Sep 2 15:09:53 2015 -0700

----------------------------------------------------------------------
 build.sbt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/6c887ad9/build.sbt
----------------------------------------------------------------------
diff --git a/build.sbt b/build.sbt
index e82b353..af199b0 100644
--- a/build.sbt
+++ b/build.sbt
@@ -1,4 +1,4 @@
-name := "CMUSDS"
+name := "ApacheCMDA_Frontend"
 
 version := "1.0-SNAPSHOT"
 


[20/50] [abbrv] incubator-cmda git commit: delete comments

Posted by xi...@apache.org.
delete comments


Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/f22b3e32
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/f22b3e32
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/f22b3e32

Branch: refs/heads/master
Commit: f22b3e328ff266519ea0db6c63e2a03bb017146a
Parents: aa8b627
Author: cat1021 <lo...@gmail.com>
Authored: Wed Sep 2 17:00:04 2015 -0700
Committer: cat1021 <lo...@gmail.com>
Committed: Wed Sep 2 17:00:04 2015 -0700

----------------------------------------------------------------------
 app/models/metadata/TwoDVarZonalMean.java       |    4 +-
 ...rencePlotTwoTimeAveragedVariables.scala.html | 2056 ++++++++----------
 .../climate/TwoDVariableZonelMean.scala.html    |  520 ++---
 app/views/climate/climateServices.scala.html    |    2 +-
 .../climate/conditionalSampling.scala.html      | 1130 ++++------
 .../climate/conditionalSampling2Var.scala.html  |  743 +++----
 app/views/climate/correlationMap.scala.html     |  451 ++--
 app/views/climate/regridAndDownload.scala.html  |  270 +--
 .../scatterAndHistogramTwoVariable.scala.html   |  867 +++-----
 ...reeDVariableAerageVerticalProfile.scala.html |  519 ++---
 .../climate/threeDVariableTwoDSlice.scala.html  |  521 ++---
 .../climate/threeDVariableZonalMean.scala.html  |  521 ++---
 app/views/climate/twoDVariableMap.scala.html    |  582 ++---
 .../climate/twoDVariableTimeSeries.scala.html   |  463 ++--
 14 files changed, 2876 insertions(+), 5773 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/f22b3e32/app/models/metadata/TwoDVarZonalMean.java
----------------------------------------------------------------------
diff --git a/app/models/metadata/TwoDVarZonalMean.java b/app/models/metadata/TwoDVarZonalMean.java
index b94a28e..45af27e 100644
--- a/app/models/metadata/TwoDVarZonalMean.java
+++ b/app/models/metadata/TwoDVarZonalMean.java
@@ -49,9 +49,7 @@ public class TwoDVarZonalMean {
 		this.selectMonths = selectMonths;
 	}
 	public void changeSelectMonths(){
-//		if(month.isEmpty()){
-//			this.selectMonths = "select none";
-//		}
+
 		if(month.contains("1")&&month.contains("2")&&month.contains("3")&&month.contains("4")&&month.contains("5")&&month.contains("6")&&month.contains("7")&&month.contains("8")&&month.contains("9")&&month.contains("10")&&month.contains("11")&&month.contains("12")){
 			this.selectMonths = "select all";
 		}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/f22b3e32/app/views/climate/DifferencePlotTwoTimeAveragedVariables.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/DifferencePlotTwoTimeAveragedVariables.scala.html b/app/views/climate/DifferencePlotTwoTimeAveragedVariables.scala.html
index e49ff23..0a64039 100644
--- a/app/views/climate/DifferencePlotTwoTimeAveragedVariables.scala.html
+++ b/app/views/climate/DifferencePlotTwoTimeAveragedVariables.scala.html
@@ -1,363 +1,323 @@
-@(parameters: metadata.DiffPlotTwoTimeAveragedVar)
-
-@import helper._
-
+@(parameters: metadata.DiffPlotTwoTimeAveragedVar) @import helper._
 <link rel="stylesheet"
 	href='@routes.Assets.at("stylesheets/livefitler.css")'>
-	
 @scripts = {
-	<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
-	<script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
-	<script type="text/javascript" src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
-	<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js"></script>
-	<script type="text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
-	<script type="text/javascript" src='@routes.Assets.at("javascripts/xmisc.js")'></script>
-	<script type="text/javascript">
+<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
+<script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
+<script type="text/javascript"
+	src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
+<script type="text/javascript" src="https:
+	<script type="
+	text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
+<script type="text/javascript"
+	src='@routes.Assets.at("javascripts/xmisc.js")'></script>
+<script type="text/javascript">
 	var Response = null;
     var variable1 = "";
     var variable2 = "";
-
-
-    // called on load or reload
     window.onload = function() {
-    	
-    changeDataSource();
-    select_data1(1);
-    changeDataSource1();
-    select_data1(2);
-    changeVariableName();
-    select_var1(1);
-    changeVariableName1();
-    select_var1(2);
-      // no data to download yet
-     // disable_download_button();
-
-    var imageUrl = $('#image').text();
-    $('#purpose').html($('#executionPurpose').text());
-    $('#Image').html('<img src="'+imageUrl+'" width=680 />');
-    $('#data_url').html($('#dataURL').text());
-    $('#Response').html($('serviceResponseText').text());
+	    changeDataSource();
+	    select_data1(1);
+	    changeDataSource1();
+	    select_data1(2);
+	    changeVariableName();
+	    select_var1(1);
+	    changeVariableName1();
+	    select_var1(2);
+	    var imageUrl = $('#image').text();
+	    $('#purpose').html($('#executionPurpose').text());
+	    $('#Image').html('<img src="'+imageUrl+'" width=680 />');
+	    $('#data_url').html($('#dataURL').text());
+	    $('#Response').html($('serviceResponseText').text());
     }
-
     function changeVariableName1(){
-    var var_string = $('#variableName2').text();
-    var x=document.getElementById("var2");
-    if (var_string == "clt")
-    x.options[1].selected=true;
-    else if (var_string == "ts")
-    x.options[2].selected=true;
-    else if (var_string == "tos")
-    x.options[3].selected=true;
-    else if (var_string == "pr")
-    x.options[0].selected=true;
-    else if (var_string == "uas")
-    x.options[4].selected=true;
-    else if (var_string == "vas")
-    x.options[5].selected=true;
-    else if (var_string == "sfcWind")
-    x.options[6].selected=true;
-    else if (var_string == "zos")
-    x.options[7].selected=true;
-    else if (var_string == "lai")
-    x.options[8].selected=true;
-    else if (var_string == "zl")
-    x.options[9].selected=true;
-    else if (var_string == "zo")
-    x.options[10].selected=true;
-    else if (var_string == "ohc700")
-    x.options[11].selected=true;
-    else if (var_string == "ohc2000")
-    x.options[12].selected=true;
-    else if (var_string == "rlds")
-    x.options[13].selected=true;
-    else if (var_string == "rsds")
-    x.options[14].selected=true;
-    else if (var_string == "rlus")
-    x.options[15].selected=true;
-    else if (var_string == "rsus")
-    x.options[16].selected=true;
-    else if (var_string == "rldscs")
-    x.options[17].selected=true;
-    else if (var_string == "rsdscs")
-    x.options[18].selected=true;
-    else if (var_string == "rsuscs")
-    x.options[19].selected=true;
-    else if (var_string == "rsdt")
-    x.options[20].selected=true;
-    else if (var_string == "rlutcs")
-    x.options[21].selected=true;
-    else if (var_string == "rlut")
-    x.options[22].selected=true;
-    else if (var_string == "rsutcs")
-    x.options[23].selected=true;
-    else if (var_string == "rsut")
-    x.options[24].selected=true;
-    }
-
+	    var var_string = $('#variableName2').text();
+	    var x=document.getElementById("var2");
+	    if (var_string == "clt")
+	    x.options[1].selected=true;
+	    else if (var_string == "ts")
+	    x.options[2].selected=true;
+	    else if (var_string == "tos")
+	    x.options[3].selected=true;
+	    else if (var_string == "pr")
+	    x.options[0].selected=true;
+	    else if (var_string == "uas")
+	    x.options[4].selected=true;
+	    else if (var_string == "vas")
+	    x.options[5].selected=true;
+	    else if (var_string == "sfcWind")
+	    x.options[6].selected=true;
+	    else if (var_string == "zos")
+	    x.options[7].selected=true;
+	    else if (var_string == "lai")
+	    x.options[8].selected=true;
+	    else if (var_string == "zl")
+	    x.options[9].selected=true;
+	    else if (var_string == "zo")
+	    x.options[10].selected=true;
+	    else if (var_string == "ohc700")
+	    x.options[11].selected=true;
+	    else if (var_string == "ohc2000")
+	    x.options[12].selected=true;
+	    else if (var_string == "rlds")
+	    x.options[13].selected=true;
+	    else if (var_string == "rsds")
+	    x.options[14].selected=true;
+	    else if (var_string == "rlus")
+	    x.options[15].selected=true;
+	    else if (var_string == "rsus")
+	    x.options[16].selected=true;
+	    else if (var_string == "rldscs")
+	    x.options[17].selected=true;
+	    else if (var_string == "rsdscs")
+	    x.options[18].selected=true;
+	    else if (var_string == "rsuscs")
+	    x.options[19].selected=true;
+	    else if (var_string == "rsdt")
+	    x.options[20].selected=true;
+	    else if (var_string == "rlutcs")
+	    x.options[21].selected=true;
+	    else if (var_string == "rlut")
+	    x.options[22].selected=true;
+	    else if (var_string == "rsutcs")
+	    x.options[23].selected=true;
+	    else if (var_string == "rsut")
+	    x.options[24].selected=true;
+	}
     function changeVariableName(){
-    var var_string = $('#variableName1').text();
-    var x=document.getElementById("var1");
-    if (var_string == "clt")
-    x.options[1].selected=true;
-    else if (var_string == "ts")
-    x.options[2].selected=true;
-    else if (var_string == "tos")
-    x.options[3].selected=true;
-    else if (var_string == "pr")
-    x.options[0].selected=true;
-    else if (var_string == "uas")
-    x.options[4].selected=true;
-    else if (var_string == "vas")
-    x.options[5].selected=true;
-    else if (var_string == "sfcWind")
-    x.options[6].selected=true;
-    else if (var_string == "zos")
-    x.options[7].selected=true;
-    else if (var_string == "lai")
-    x.options[8].selected=true;
-    else if (var_string == "zl")
-    x.options[9].selected=true;
-    else if (var_string == "zo")
-    x.options[10].selected=true;
-    else if (var_string == "ohc700")
-    x.options[11].selected=true;
-    else if (var_string == "ohc2000")
-    x.options[12].selected=true;
-    else if (var_string == "rlds")
-    x.options[13].selected=true;
-    else if (var_string == "rsds")
-    x.options[14].selected=true;
-    else if (var_string == "rlus")
-    x.options[15].selected=true;
-    else if (var_string == "rsus")
-    x.options[16].selected=true;
-    else if (var_string == "rldscs")
-    x.options[17].selected=true;
-    else if (var_string == "rsdscs")
-    x.options[18].selected=true;
-    else if (var_string == "rsuscs")
-    x.options[19].selected=true;
-    else if (var_string == "rsdt")
-    x.options[20].selected=true;
-    else if (var_string == "rlutcs")
-    x.options[21].selected=true;
-    else if (var_string == "rlut")
-    x.options[22].selected=true;
-    else if (var_string == "rsutcs")
-    x.options[23].selected=true;
-    else if (var_string == "rsut")
-    x.options[24].selected=true;
+	    var var_string = $('#variableName1').text();
+	    var x=document.getElementById("var1");
+	    if (var_string == "clt")
+	    x.options[1].selected=true;
+	    else if (var_string == "ts")
+	    x.options[2].selected=true;
+	    else if (var_string == "tos")
+	    x.options[3].selected=true;
+	    else if (var_string == "pr")
+	    x.options[0].selected=true;
+	    else if (var_string == "uas")
+	    x.options[4].selected=true;
+	    else if (var_string == "vas")
+	    x.options[5].selected=true;
+	    else if (var_string == "sfcWind")
+	    x.options[6].selected=true;
+	    else if (var_string == "zos")
+	    x.options[7].selected=true;
+	    else if (var_string == "lai")
+	    x.options[8].selected=true;
+	    else if (var_string == "zl")
+	    x.options[9].selected=true;
+	    else if (var_string == "zo")
+	    x.options[10].selected=true;
+	    else if (var_string == "ohc700")
+	    x.options[11].selected=true;
+	    else if (var_string == "ohc2000")
+	    x.options[12].selected=true;
+	    else if (var_string == "rlds")
+	    x.options[13].selected=true;
+	    else if (var_string == "rsds")
+	    x.options[14].selected=true;
+	    else if (var_string == "rlus")
+	    x.options[15].selected=true;
+	    else if (var_string == "rsus")
+	    x.options[16].selected=true;
+	    else if (var_string == "rldscs")
+	    x.options[17].selected=true;
+	    else if (var_string == "rsdscs")
+	    x.options[18].selected=true;
+	    else if (var_string == "rsuscs")
+	    x.options[19].selected=true;
+	    else if (var_string == "rsdt")
+	    x.options[20].selected=true;
+	    else if (var_string == "rlutcs")
+	    x.options[21].selected=true;
+	    else if (var_string == "rlut")
+	    x.options[22].selected=true;
+	    else if (var_string == "rsutcs")
+	    x.options[23].selected=true;
+	    else if (var_string == "rsut")
+	    x.options[24].selected=true;
     }
-
-
     function changeDataSource1(){
-
-    var dataSource = $('#source2').text();
-
-    dataSource = dataSource.toUpperCase();
-    //alert(dataSource);
-    //dataSource = "NASA_QuikSCAT";
-    var x = document.getElementById("data2");
-    if(dataSource == "NASA_MODIS" ){
-    x.options[13].selected=true;
-    }
-    else if(dataSource == "NASA_AMSRE" ){
-    x.options[14].selected=true;
-    }
-    else if(dataSource == "NASA_TRMM" ){
-    x.options[15].selected=true;
-    }
-    else if(dataSource == "NASA_GPCP" ){
-    x.options[16].selected=true;
-    }
-    else if(dataSource == "NASA_QUIKSCAT" ){
-    x.options[17].selected=true;
-    }
-    else if(dataSource == "NASA_AVISO" ){
-    x.options[18].selected=true;
-    }
-    else if(dataSource == "NASA_GRACE" ){
-    x.options[19].selected=true;
-    }
-    else if(dataSource == "NOAA_NODC" ){
-    x.options[20].selected=true;
-    }
-    else if(dataSource == "NASA_CERES" ){
-    x.options[21].selected=true;
-    }
-    else if(dataSource == "NASA_AIRS" ){
-    x.options[22].selected=true;
-    }
-    else if(dataSource == "NASA_MLS" ){
-    x.options[23].selected=true;
-    }
-    else if(dataSource == "NASA_ARGO" ){
-    x.options[24].selected=true;
-    }
-    else if(dataSource == "CCCMA_CANESM2" ){
-    x.options[0].selected=true;
-    }
-
-    else if(dataSource == "GFDL_ESM2G" ){
-    x.options[1].selected=true;
-    }
-    else if(dataSource == "GISS_E2-H" ){
-    x.options[2].selected=true;
-    }
-    else if(dataSource == "GISS_E2-R" ){
-    x.options[3].selected=true;
-    }
-    else if(dataSource == "NCAR_CAM5" ){
-    x.options[4].selected=true;
-    }
-    else if(dataSource == "NCC_NORESM" ){
-    x.options[5].selected=true;
-    }
-    else if(dataSource == "UKMO_HADGEM2-ES" ){
-    x.options[6].selected=true;
-    }
-    else if(dataSource == "CCCMA_CANAM4" ){
-    x.options[7].selected=true;
-    }
-    else if(dataSource == "CSIRO_MK3.6" ){
-    x.options[8].selected=true;
-    }
-    else if(dataSource == "GFDL_CM3" ){
-    x.options[9].selected=true;
-    }
-    else if(dataSource == "IPSL_CM5A-LR" ){
-    x.options[10].selected=true;
+	    var dataSource = $('#source2').text();
+	    dataSource = dataSource.toUpperCase();
+	    var x = document.getElementById("data2");
+	    if(dataSource == "NASA_MODIS" ){
+	    x.options[13].selected=true;
+	    }
+	    else if(dataSource == "NASA_AMSRE" ){
+	    x.options[14].selected=true;
+	    }
+	    else if(dataSource == "NASA_TRMM" ){
+	    x.options[15].selected=true;
+	    }
+	    else if(dataSource == "NASA_GPCP" ){
+	    x.options[16].selected=true;
+	    }
+	    else if(dataSource == "NASA_QUIKSCAT" ){
+	    x.options[17].selected=true;
+	    }
+	    else if(dataSource == "NASA_AVISO" ){
+	    x.options[18].selected=true;
+	    }
+	    else if(dataSource == "NASA_GRACE" ){
+	    x.options[19].selected=true;
+	    }
+	    else if(dataSource == "NOAA_NODC" ){
+	    x.options[20].selected=true;
+	    }
+	    else if(dataSource == "NASA_CERES" ){
+	    x.options[21].selected=true;
+	    }
+	    else if(dataSource == "NASA_AIRS" ){
+	    x.options[22].selected=true;
+	    }
+	    else if(dataSource == "NASA_MLS" ){
+	    x.options[23].selected=true;
+	    }
+	    else if(dataSource == "NASA_ARGO" ){
+	    x.options[24].selected=true;
+	    }
+	    else if(dataSource == "CCCMA_CANESM2" ){
+	    x.options[0].selected=true;
+	    }
+	    else if(dataSource == "GFDL_ESM2G" ){
+	    x.options[1].selected=true;
+	    }
+	    else if(dataSource == "GISS_E2-H" ){
+	    x.options[2].selected=true;
+	    }
+	    else if(dataSource == "GISS_E2-R" ){
+	    x.options[3].selected=true;
+	    }
+	    else if(dataSource == "NCAR_CAM5" ){
+	    x.options[4].selected=true;
+	    }
+	    else if(dataSource == "NCC_NORESM" ){
+	    x.options[5].selected=true;
+	    }
+	    else if(dataSource == "UKMO_HADGEM2-ES" ){
+	    x.options[6].selected=true;
+	    }
+	    else if(dataSource == "CCCMA_CANAM4" ){
+	    x.options[7].selected=true;
+	    }
+	    else if(dataSource == "CSIRO_MK3.6" ){
+	    x.options[8].selected=true;
+	    }
+	    else if(dataSource == "GFDL_CM3" ){
+	    x.options[9].selected=true;
+	    }
+	    else if(dataSource == "IPSL_CM5A-LR" ){
+	    x.options[10].selected=true;
+	    }
+	    else if(dataSource == "MIROC_MIROC5" ){
+	    x.options[11].selected=true;
+	    }
+	    else if(dataSource == "UKMO_HADGEM2-A" ){
+	    x.options[12].selected=true;
+	    }
+	    else if(dataSource == "ECMWF_INTERIM" ){
+	    x.options[25].selected=true;
+	    }
     }
-    else if(dataSource == "MIROC_MIROC5" ){
-    x.options[11].selected=true;
-    }
-    else if(dataSource == "UKMO_HADGEM2-A" ){
-    x.options[12].selected=true;
-    }
-    else if(dataSource == "ECMWF_INTERIM" ){
-    x.options[25].selected=true;
-    }
-    //$('#data option:contains('+dataSource+')').prop({selected: true});
-    }
-
     function changeDataSource(){
-
-    var dataSource = $('#source1').text();
-
-    dataSource = dataSource.toUpperCase();
-    //alert(dataSource);
-    //dataSource = "NASA_QuikSCAT";
-    var x = document.getElementById("data1");
-    if(dataSource == "NASA_MODIS" ){
-    x.options[13].selected=true;
-    }
-    else if(dataSource == "NASA_AMSRE" ){
-    x.options[14].selected=true;
-    }
-    else if(dataSource == "NASA_TRMM" ){
-    x.options[15].selected=true;
-    }
-    else if(dataSource == "NASA_GPCP" ){
-    x.options[16].selected=true;
-    }
-    else if(dataSource == "NASA_QUIKSCAT" ){
-    x.options[17].selected=true;
-    }
-    else if(dataSource == "NASA_AVISO" ){
-    x.options[18].selected=true;
-    }
-    else if(dataSource == "NASA_GRACE" ){
-    x.options[19].selected=true;
-    }
-    else if(dataSource == "NOAA_NODC" ){
-    x.options[20].selected=true;
-    }
-    else if(dataSource == "NASA_CERES" ){
-    x.options[21].selected=true;
-    }
-    else if(dataSource == "NASA_AIRS" ){
-    x.options[22].selected=true;
-    }
-    else if(dataSource == "NASA_MLS" ){
-    x.options[23].selected=true;
-    }
-    else if(dataSource == "NASA_ARGO" ){
-    x.options[24].selected=true;
-    }
-    else if(dataSource == "CCCMA_CANESM2" ){
-    x.options[0].selected=true;
-    }
-
-    else if(dataSource == "GFDL_ESM2G" ){
-    x.options[1].selected=true;
-    }
-    else if(dataSource == "GISS_E2-H" ){
-    x.options[2].selected=true;
-    }
-    else if(dataSource == "GISS_E2-R" ){
-    x.options[3].selected=true;
-    }
-    else if(dataSource == "NCAR_CAM5" ){
-    x.options[4].selected=true;
-    }
-    else if(dataSource == "NCC_NORESM" ){
-    x.options[5].selected=true;
-    }
-    else if(dataSource == "UKMO_HADGEM2-ES" ){
-    x.options[6].selected=true;
-    }
-    else if(dataSource == "CCCMA_CANAM4" ){
-    x.options[7].selected=true;
+	    var dataSource = $('#source1').text();
+	    dataSource = dataSource.toUpperCase();
+	    var x = document.getElementById("data1");
+	    if(dataSource == "NASA_MODIS" ){
+	    x.options[13].selected=true;
+	    }
+	    else if(dataSource == "NASA_AMSRE" ){
+	    x.options[14].selected=true;
+	    }
+	    else if(dataSource == "NASA_TRMM" ){
+	    x.options[15].selected=true;
+	    }
+	    else if(dataSource == "NASA_GPCP" ){
+	    x.options[16].selected=true;
+	    }
+	    else if(dataSource == "NASA_QUIKSCAT" ){
+	    x.options[17].selected=true;
+	    }
+	    else if(dataSource == "NASA_AVISO" ){
+	    x.options[18].selected=true;
+	    }
+	    else if(dataSource == "NASA_GRACE" ){
+	    x.options[19].selected=true;
+	    }
+	    else if(dataSource == "NOAA_NODC" ){
+	    x.options[20].selected=true;
+	    }
+	    else if(dataSource == "NASA_CERES" ){
+	    x.options[21].selected=true;
+	    }
+	    else if(dataSource == "NASA_AIRS" ){
+	    x.options[22].selected=true;
+	    }
+	    else if(dataSource == "NASA_MLS" ){
+	    x.options[23].selected=true;
+	    }
+	    else if(dataSource == "NASA_ARGO" ){
+	    x.options[24].selected=true;
+	    }
+	    else if(dataSource == "CCCMA_CANESM2" ){
+	    x.options[0].selected=true;
+	    }
+	    else if(dataSource == "GFDL_ESM2G" ){
+	    x.options[1].selected=true;
+	    }
+	    else if(dataSource == "GISS_E2-H" ){
+	    x.options[2].selected=true;
+	    }
+	    else if(dataSource == "GISS_E2-R" ){
+	    x.options[3].selected=true;
+	    }
+	    else if(dataSource == "NCAR_CAM5" ){
+	    x.options[4].selected=true;
+	    }
+	    else if(dataSource == "NCC_NORESM" ){
+	    x.options[5].selected=true;
+	    }
+	    else if(dataSource == "UKMO_HADGEM2-ES" ){
+	    x.options[6].selected=true;
+	    }
+	    else if(dataSource == "CCCMA_CANAM4" ){
+	    x.options[7].selected=true;
+	    }
+	    else if(dataSource == "CSIRO_MK3.6" ){
+	    x.options[8].selected=true;
+	    }
+	    else if(dataSource == "GFDL_CM3" ){
+	    x.options[9].selected=true;
+	    }
+	    else if(dataSource == "IPSL_CM5A-LR" ){
+	    x.options[10].selected=true;
+	    }
+	    else if(dataSource == "MIROC_MIROC5" ){
+	    x.options[11].selected=true;
+	    }
+	    else if(dataSource == "UKMO_HADGEM2-A" ){
+	    x.options[12].selected=true;
+	    }
+	    else if(dataSource == "ECMWF_INTERIM" ){
+	    x.options[25].selected=true;
+	    }
     }
-    else if(dataSource == "CSIRO_MK3.6" ){
-    x.options[8].selected=true;
-    }
-    else if(dataSource == "GFDL_CM3" ){
-    x.options[9].selected=true;
-    }
-    else if(dataSource == "IPSL_CM5A-LR" ){
-    x.options[10].selected=true;
-    }
-    else if(dataSource == "MIROC_MIROC5" ){
-    x.options[11].selected=true;
-    }
-    else if(dataSource == "UKMO_HADGEM2-A" ){
-    x.options[12].selected=true;
-    }
-    else if(dataSource == "ECMWF_INTERIM" ){
-    x.options[25].selected=true;
-    }
-    //$('#data option:contains('+dataSource+')').prop({selected: true});
-    }
-
-
-    // disable download data button
-    function disable_download_button()
-    {
-//      var x=document.getElementById("download_data");
-//      x.disabled=false;
-    }
-
-    // enable download data button
     function enable_download_button()
     {
       var x=document.getElementById("download_data");
       x.disabled=false;
     }
-
-
-    // disable all vars1 in dropdown menu
     function unset_vars1(ID)
     {
       var x;
-
       if (ID == 1) {
         x=document.getElementById("var1");
       }
       else if (ID == 2) {
         x=document.getElementById("var2");
       }
-
       x.options[0].disabled=true;
       x.options[1].disabled=true;
       x.options[2].disabled=true;
@@ -392,9 +352,6 @@
       x.options[31].disabled=true;
       x.options[32].disabled=true;
     }
-
-
-    // disable pressure level box for 2D var
     function disable_pres1(ID)
     {
       var x;
@@ -404,12 +361,9 @@
       else if (ID == 2) {
         x=document.getElementById("pres2");
       }
-
       x.value = "N/A";
       x.disabled=true;
     }
-
-    // enable pressure level box for 3D var
     function enable_pres1(ID)
     {
       var x;
@@ -419,369 +373,321 @@
       else if (ID == 2) {
         x=document.getElementById("pres2");
       }
-
       x.value = "500";
       x.disabled=false;
     }
-
-    // form variable1 or variable2 string based on "var" dropdown selection
     function select_var1(ID)
     {
       var var_string;
-
       if (ID == 1) {
         var_string = $("#var1").val();
       }
       else if (ID == 2) {
         var_string = $("#var2").val();
+    }
+    disable_download_button();  
+    if (var_string == "Total Cloud Fraction") { 
+      if (ID == 1) {
+        variable1 = "clt";  
       }
-
-      // alert("var_string: " + var_string)
-
-      // disable the download button because of this change  
-      disable_download_button();  
-  
-      if (var_string == "Total Cloud Fraction") { 
-        if (ID == 1) {
-          variable1 = "clt";  // a 2D var
-        }
-        else if (ID == 2) {
-          variable2 = "clt";  // a 2D var
-        }
-        // disable pressure level box for 2D var
-        disable_pres1(ID);
-        // alert("variable1: " + variable1)
-      }
-      else if (var_string == "Surface Temperature") {
-        if (ID == 1) {
-          variable1 = "ts";  
-        }
-        else if (ID == 2) {
-          variable2 = "ts";  
-        }
-        // disable pressure level box for 2D var
-        disable_pres1(ID);
-      }
-      else if (var_string == "Sea Surface Temperature") { 
-        if (ID == 1) {
-          variable1 = "tos";  
-        }
-        else if (ID == 2) {
-          variable2 = "tos";  
-        }
-        // disable pressure level box for 2D var
-        disable_pres1(ID);
-      }
-      else if (var_string == "Precipitation Flux") { 
-        if (ID == 1) {
-          variable1 = "pr";  
-        }
-        else if (ID == 2) {
-          variable2 = "pr";  
-        }
-        // disable pressure level box for 2D var
-        disable_pres1(ID);
-      }
-      else if (var_string == "Eastward Near-Surface Wind") { 
-        if (ID == 1) {
-          variable1 = "uas";  
-        }
-        else if (ID == 2) {
-          variable2 = "uas";  
-        }
-        // disable pressure level box for 2D var
-        disable_pres1(ID);
-      }
-      else if (var_string == "Northward Near-Surface Wind") {  
-        if (ID == 1) {
-          variable1 = "vas";  
-        }
-        else if (ID == 2) {
-          variable2 = "vas";  
-        }
-        // disable pressure level box for 2D var
-        disable_pres1(ID);
-      }
-      else if (var_string == "Near-Surface Wind Speed") { 
-        if (ID == 1) {
-          variable1 = "sfcWind";  
-        }
-        else if (ID == 2) {
-          variable2 = "sfcWind";  
-        }
-        // disable pressure level box for 2D var
-        disable_pres1(ID);
-      }
-      else if (var_string == "Sea Surface Height") { 
-        if (ID == 1) {
-          variable1 = "zos";  
-        }
-        else if (ID == 2) {
-          variable2 = "zos";  
-        }
-        // disable pressure level box for 2D var
-        disable_pres1(ID);
-      }
-      else if (var_string == "Leaf Area Index") { 
-        if (ID == 1) {
-          variable1 = "lai";  
-        }
-        else if (ID == 2) {
-          variable2 = "lai";  
-        }
-        // disable pressure level box for 2D var
-        disable_pres1(ID);
-      }
-      else if (var_string == "Equivalent Water Height Over Land") {
-        if (ID == 1) {
-          variable1 = "zl";  
-        }
-        else if (ID == 2) {
-          variable2 = "zl";  
-        }
-        // disable pressure level box for 2D var
-        disable_pres1(ID);
-      }
-      else if (var_string == "Equivalent Water Height Over Ocean") {
-        if (ID == 1) {
-          variable1 = "zo";
-        }
-        else if (ID == 2) {
-          variable2 = "zo";
-        }
-        // disable pressure level box for 2D var
-        disable_pres1(ID);
-      }
-      else if (var_string == "Ocean Heat Content Anomaly within 700 m Depth") {
-        if (ID == 1) {
-          variable1 = "ohc700";
-        }
-        else if (ID == 2) {
-          variable2 = "ohc700";
-        }
-        // disable pressure level box for 2D var
-        disable_pres1(ID);
-      }
-      else if (var_string == "Ocean Heat Content Anomaly within 2000 m Depth") {
-        if (ID == 1) {
-          variable1 = "ohc2000";
-        }
-        else if (ID == 2) {
-          variable2 = "ohc2000";
-        }
-        // disable pressure level box for 2D var
-        disable_pres1(ID);
-      }
-      else if (var_string == "Surface Downwelling Longwave Radiation") {
-        if (ID == 1) {
-          variable1 = "rlds";
-        }
-        else if (ID == 2) {
-          variable2 = "rlds";
-        }
-        // disable pressure level box for 2D var
-        disable_pres1(ID);
-      }
-      else if (var_string == "Surface Downwelling Shortwave Radiation") {
-        if (ID == 1) {
-          variable1 = "rsds";
-        }
-        else if (ID == 2) {
-          variable2 = "rsds";
-        }
-        // disable pressure level box for 2D var
-        disable_pres1(ID);
-      }
-      else if (var_string == "Surface Upwelling Longwave Radiation") {
-        if (ID == 1) {
-          variable1 = "rlus";
-        }
-        else if (ID == 2) {
-          variable2 = "rlus";
-        }
-        // disable pressure level box for 2D var
-        disable_pres1(ID);
-      }
-      else if (var_string == "Surface Upwelling Shortwave Radiation") {
-        if (ID == 1) {
-          variable1 = "rsus";
-        }
-        else if (ID == 2) {
-          variable2 = "rsus";
-        }
-        // disable pressure level box for 2D var
-        disable_pres1(ID);
-      }
-      else if (var_string == "Surface Downwelling Clear-Sky Longwave Radiation") {
-        if (ID == 1) {
-          variable1 = "rldscs";
-        }
-        else if (ID == 2) {
-          variable2 = "rldscs";
-        }
-        // disable pressure level box for 2D var
-        disable_pres1(ID);
-      }
-      else if (var_string == "Surface Downwelling Clear-Sky Shortwave Radiation") {
-        if (ID == 1) {
-          variable1 = "rsdscs";
-        }
-        else if (ID == 2) {
-          variable2 = "rsdscs";
-        }
-        // disable pressure level box for 2D var
-        disable_pres1(ID);
-      }
-      else if (var_string == "Surface Upwelling Clear-Sky Shortwave Radiation") {
-        if (ID == 1) {
-          variable1 = "rsuscs";
-        }
-        else if (ID == 2) {
-          variable2 = "rsuscs";
-        }
-        // disable pressure level box for 2D var
-        disable_pres1(ID);
-      }
-      else if (var_string == "TOA Incident Shortwave Radiation") {
-        if (ID == 1) {
-          variable1 = "rsdt";
-        }
-        else if (ID == 2) {
-          variable2 = "rsdt";
-        }
-        // disable pressure level box for 2D var
-        disable_pres1(ID);
-      }
-      else if (var_string == "TOA Outgoing Clear-Sky Longwave Radiation") {
-        if (ID == 1) {
-          variable1 = "rlutcs";
-        }
-        else if (ID == 2) {
-          variable2 = "rlutcs";
-        }
-        // disable pressure level box for 2D var
-        disable_pres1(ID);
-      }
-      else if (var_string == "TOA Outgoing Longwave Radiation") {
-        if (ID == 1) {
-          variable1 = "rlut";
-        }
-        else if (ID == 2) {
-          variable2 = "rlut";
-        }
-        // disable pressure level box for 2D var
-        disable_pres1(ID);
-      }
-      else if (var_string == "TOA Outgoing Clear-Sky Shortwave Radiation") {
-        if (ID == 1) {
-          variable1 = "rsutcs";
-        }
-        else if (ID == 2) {
-          variable2 = "rsutcs";
-        }
-        // disable pressure level box for 2D var
-        disable_pres1(ID);
-      }
-      else if (var_string == "TOA Outgoing Shortwave Radiation") {
-        if (ID == 1) {
-          variable1 = "rsut";
-        }
-        else if (ID == 2) {
-          variable2 = "rsut";
-        }
-        // disable pressure level box for 2D var
-        disable_pres1(ID);
-      }
-      else if (var_string == "Air Temperature") {
-        if (ID == 1) {
-          variable1 = "ta";
-        }
-        else if (ID == 2) {
-          variable2 = "ta";
-        }
-        // enable pressure level box for 3D var
-        enable_pres1(ID);
-      }
-      else if (var_string == "Specific Humidity") {
-        if (ID == 1) {
-          variable1 = "hus";
-        }
-        else if (ID == 2) {
-          variable2 = "hus";
-        }
-        // enable pressure level box for 3D var
-        enable_pres1(ID);
-      }
-      else if (var_string == "Cloud Ice Water Content") {
-        if (ID == 1) {
-          variable1 = "cli";
-        }
-        else if (ID == 2) {
-          variable2 = "cli";
-        }
-        // enable pressure level box for 3D var
-        enable_pres1(ID);
-      }
-      else if (var_string == "Cloud Liquid Water Content") {
-        if (ID == 1) {
-          variable1 = "clw";
-        }
-        else if (ID == 2) {
-          variable2 = "clw";
-        }
-        // enable pressure level box for 3D var
-        enable_pres1(ID);
-      }
-      else if (var_string == "Ocean Temperature") {
-        if (ID == 1) {
-          variable1 = "ot";
-        }
-        else if (ID == 2) {
-          variable2 = "ot";
-        }
-        // enable pressure level box for 3D var
-        enable_pres1(ID);
-      }
-      else if (var_string == "Ocean Salinity") {
-        if (ID == 1) {
-          variable1 = "os";
-        }
-        else if (ID == 2) {
-          variable2 = "os";
-        }
-        // enable pressure level box for 3D var
-        enable_pres1(ID);
-      }
-      else if (var_string == "Vertical Wind Velocity") {
-        if (ID == 1) {
-          variable1 = "wap";
-        }
-        else if (ID == 2) {
-          variable2 = "wap";
-        }
-        // enable pressure level box for 3D var
-        enable_pres1(ID);
-      }
-      else if (var_string == "Relative Humidity") {
-        if (ID == 1) {
-          variable1 = "hur";
-        }
-        else if (ID == 2) {
-          variable2 = "hur";
-        }
-        // enable pressure level box for 3D var
-        enable_pres1(ID);
+      else if (ID == 2) {
+        variable2 = "clt";  
       }
-      // alert("variable1: " + variable1)
+      disable_pres1(ID);
+    }
+     else if (var_string == "Surface Temperature") {
+       if (ID == 1) {
+         variable1 = "ts";  
+       }
+       else if (ID == 2) {
+         variable2 = "ts";  
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Sea Surface Temperature") { 
+       if (ID == 1) {
+         variable1 = "tos";  
+       }
+       else if (ID == 2) {
+         variable2 = "tos";  
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Precipitation Flux") { 
+       if (ID == 1) {
+         variable1 = "pr";  
+       }
+       else if (ID == 2) {
+         variable2 = "pr";  
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Eastward Near-Surface Wind") { 
+       if (ID == 1) {
+         variable1 = "uas";  
+       }
+       else if (ID == 2) {
+         variable2 = "uas";  
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Northward Near-Surface Wind") {  
+       if (ID == 1) {
+         variable1 = "vas";  
+       }
+       else if (ID == 2) {
+         variable2 = "vas";  
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Near-Surface Wind Speed") { 
+       if (ID == 1) {
+         variable1 = "sfcWind";  
+       }
+       else if (ID == 2) {
+         variable2 = "sfcWind";  
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Sea Surface Height") { 
+       if (ID == 1) {
+         variable1 = "zos";  
+       }
+       else if (ID == 2) {
+         variable2 = "zos";  
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Leaf Area Index") { 
+       if (ID == 1) {
+         variable1 = "lai";  
+       }
+       else if (ID == 2) {
+         variable2 = "lai";  
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Equivalent Water Height Over Land") {
+       if (ID == 1) {
+         variable1 = "zl";  
+       }
+       else if (ID == 2) {
+         variable2 = "zl";  
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Equivalent Water Height Over Ocean") {
+       if (ID == 1) {
+         variable1 = "zo";
+       }
+       else if (ID == 2) {
+         variable2 = "zo";
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Ocean Heat Content Anomaly within 700 m Depth") {
+       if (ID == 1) {
+         variable1 = "ohc700";
+       }
+       else if (ID == 2) {
+         variable2 = "ohc700";
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Ocean Heat Content Anomaly within 2000 m Depth") {
+       if (ID == 1) {
+         variable1 = "ohc2000";
+       }
+       else if (ID == 2) {
+         variable2 = "ohc2000";
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Surface Downwelling Longwave Radiation") {
+       if (ID == 1) {
+         variable1 = "rlds";
+       }
+       else if (ID == 2) {
+         variable2 = "rlds";
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Surface Downwelling Shortwave Radiation") {
+       if (ID == 1) {
+         variable1 = "rsds";
+       }
+       else if (ID == 2) {
+         variable2 = "rsds";
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Surface Upwelling Longwave Radiation") {
+       if (ID == 1) {
+         variable1 = "rlus";
+       }
+       else if (ID == 2) {
+         variable2 = "rlus";
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Surface Upwelling Shortwave Radiation") {
+       if (ID == 1) {
+         variable1 = "rsus";
+       }
+       else if (ID == 2) {
+         variable2 = "rsus";
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Surface Downwelling Clear-Sky Longwave Radiation") {
+       if (ID == 1) {
+         variable1 = "rldscs";
+       }
+       else if (ID == 2) {
+         variable2 = "rldscs";
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Surface Downwelling Clear-Sky Shortwave Radiation") {
+       if (ID == 1) {
+         variable1 = "rsdscs";
+       }
+       else if (ID == 2) {
+         variable2 = "rsdscs";
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Surface Upwelling Clear-Sky Shortwave Radiation") {
+       if (ID == 1) {
+         variable1 = "rsuscs";
+       }
+       else if (ID == 2) {
+         variable2 = "rsuscs";
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "TOA Incident Shortwave Radiation") {
+       if (ID == 1) {
+         variable1 = "rsdt";
+       }
+       else if (ID == 2) {
+         variable2 = "rsdt";
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "TOA Outgoing Clear-Sky Longwave Radiation") {
+       if (ID == 1) {
+         variable1 = "rlutcs";
+       }
+       else if (ID == 2) {
+         variable2 = "rlutcs";
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "TOA Outgoing Longwave Radiation") {
+       if (ID == 1) {
+         variable1 = "rlut";
+       }
+       else if (ID == 2) {
+         variable2 = "rlut";
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "TOA Outgoing Clear-Sky Shortwave Radiation") {
+       if (ID == 1) {
+         variable1 = "rsutcs";
+       }
+       else if (ID == 2) {
+         variable2 = "rsutcs";
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "TOA Outgoing Shortwave Radiation") {
+       if (ID == 1) {
+         variable1 = "rsut";
+       }
+       else if (ID == 2) {
+         variable2 = "rsut";
+       }
+       disable_pres1(ID);
+     }
+     else if (var_string == "Air Temperature") {
+       if (ID == 1) {
+         variable1 = "ta";
+       }
+       else if (ID == 2) {
+         variable2 = "ta";
+       }
+       enable_pres1(ID);
+     }
+     else if (var_string == "Specific Humidity") {
+       if (ID == 1) {
+         variable1 = "hus";
+       }
+       else if (ID == 2) {
+         variable2 = "hus";
+       }
+       enable_pres1(ID);
+     }
+     else if (var_string == "Cloud Ice Water Content") {
+       if (ID == 1) {
+         variable1 = "cli";
+       }
+       else if (ID == 2) {
+         variable2 = "cli";
+       }
+       enable_pres1(ID);
+     }
+     else if (var_string == "Cloud Liquid Water Content") {
+       if (ID == 1) {
+         variable1 = "clw";
+       }
+       else if (ID == 2) {
+         variable2 = "clw";
+       }
+       enable_pres1(ID);
+     }
+     else if (var_string == "Ocean Temperature") {
+       if (ID == 1) {
+         variable1 = "ot";
+       }
+       else if (ID == 2) {
+         variable2 = "ot";
+       }
+       enable_pres1(ID);
+     }
+     else if (var_string == "Ocean Salinity") {
+       if (ID == 1) {
+         variable1 = "os";
+       }
+       else if (ID == 2) {
+         variable2 = "os";
+       }
+       enable_pres1(ID);
+     }
+     else if (var_string == "Vertical Wind Velocity") {
+       if (ID == 1) {
+         variable1 = "wap";
+       }
+       else if (ID == 2) {
+         variable2 = "wap";
+       }
+       enable_pres1(ID);
+     }
+     else if (var_string == "Relative Humidity") {
+       if (ID == 1) {
+         variable1 = "hur";
+       }
+       else if (ID == 2) {
+         variable2 = "hur";
+       }
+       enable_pres1(ID);
+     }
     }
-
-
-    // set up "var1" dropdown based status of "data1" dropdown
     function select_data1(ID)
     {
       var data_string;
       var x;
-
       if (ID == 1) {
         data_string = $("#data1").val();
         x = document.getElementById("var1");
@@ -790,106 +696,64 @@
         data_string = $("#data2").val();
         x = document.getElementById("var2");
       }
-
-      // alert(ID);
-      // alert(data_string);
-
-      // disable the download button because of this change
       disable_download_button();
-
-      // disable corresponding "var" options
       if (data_string == "NASA/AMSRE") {
-
-        unset_vars1(ID); // disable all options in "var" dropdown first
-
+        unset_vars1(ID); 
         x.options[3].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[3].disabled=false;
-
       }
       else if (data_string == "NASA/MODIS") {
-
         unset_vars1(ID);
-
         x.options[1].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[1].disabled=false;
         x.options[8].disabled=false;
-
       }
       else if (data_string == "NASA/TRMM") {
-
         unset_vars1(ID);
-
         x.options[0].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[0].disabled=false;
-
       }
       else if (data_string == "NASA/GPCP") {
-
         unset_vars1(ID);
-
         x.options[0].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[0].disabled=false;
-
       }
       else if (data_string == "NASA/QuikSCAT") {
-
         unset_vars1(ID);
-
         x.options[4].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[4].disabled=false;
         x.options[5].disabled=false;
         x.options[6].disabled=false;
-
       }
       else if (data_string == "NASA/AVISO") {
-
         unset_vars1(ID);
-
         x.options[7].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[7].disabled=false;
-
       }
       else if (data_string == "NASA/GRACE") {
-
         unset_vars1(ID);
-
         x.options[9].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[9].disabled=false;
         x.options[10].disabled=false;
-
       }
       else if (data_string == "NOAA/NODC") {
-
         unset_vars1(ID);
-
         x.options[11].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[11].disabled=false;
         x.options[12].disabled=false;
-
       }
       else if (data_string == "NASA/CERES") {
-
         unset_vars1(ID);
-
         x.options[13].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[13].disabled=false;
         x.options[14].disabled=false;
         x.options[15].disabled=false;
@@ -902,65 +766,38 @@
         x.options[22].disabled=false;
         x.options[23].disabled=false;
         x.options[24].disabled=false;
-        // The following 6 commented out
-        // per request by Benyang
-        // x.options[25].disabled=false;
-        // x.options[26].disabled=false;
-        // x.options[27].disabled=false;
-        // x.options[28].disabled=false;
-        // x.options[29].disabled=false;
-        // x.options[30].disabled=false;
-
       }
       else if (data_string == "NASA/AIRS") {
-
         unset_vars1(ID);
-
         x.options[25].selected=true;
-        enable_pres1(ID); // the selected one is 3D
-
+        enable_pres1(ID); 
         x.options[25].disabled=false;
         x.options[26].disabled=false;
-
       }
       else if (data_string == "NASA/MLS") {
-
         unset_vars1(ID);
-
         x.options[25].selected=true;
-        enable_pres1(ID); // the selected one is 3D
-
+        enable_pres1(ID); 
         x.options[25].disabled=false;
         x.options[26].disabled=false;
-
       }
       else if (data_string == "ARGO/ARGO") {
-
         unset_vars1(ID);
-
         x.options[29].selected=true;
-        enable_pres1(ID); // the selected one is 3D
-
+        enable_pres1(ID); 
         x.options[29].disabled=false;
         x.options[30].disabled=false;
-
-        // alert("in ARGO ...");
-        // alert(data_string);
       }
       else if (data_string == "CCCMA/CANAM4") {
-
         unset_vars1(ID);
-
         x.options[0].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[0].disabled=false;
         x.options[1].disabled=false;
         x.options[2].disabled=false;
         x.options[4].disabled=false;
         x.options[5].disabled=false;
         x.options[6].disabled=false;
-
         x.options[13].disabled=false;
         x.options[14].disabled=false;
         x.options[15].disabled=false;
@@ -977,22 +814,17 @@
         x.options[26].disabled=false;
         x.options[27].disabled=false;
         x.options[28].disabled=false;
-
       }
       else if (data_string == "CSIRO/MK3.6") {
-
         unset_vars1(ID);
-
         x.options[0].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[0].disabled=false;
         x.options[1].disabled=false;
         x.options[2].disabled=false;
         x.options[4].disabled=false;
         x.options[5].disabled=false;
         x.options[6].disabled=false;
-
         x.options[13].disabled=false;
         x.options[14].disabled=false;
         x.options[15].disabled=false;
@@ -1011,15 +843,11 @@
         x.options[28].disabled=false;
         x.options[31].disabled=false;
         x.options[32].disabled=false;
-
       }
       else if (data_string == "NCAR/CAM5") {
-
         unset_vars1(ID);
-
         x.options[0].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[0].disabled=false;
         x.options[1].disabled=false;
         x.options[2].disabled=false;
@@ -1029,7 +857,6 @@
         x.options[6].disabled=false;
         x.options[7].disabled=false;
         x.options[8].disabled=false;
-
         x.options[14].disabled=false;
         x.options[15].disabled=false;
         x.options[16].disabled=false;
@@ -1047,9 +874,7 @@
         x.options[28].disabled=false;
         x.options[31].disabled=false;
         x.options[32].disabled=false;
-
       }
-
       else if (data_string == "CCCMA/CANESM2" || data_string == "GFDL/ESM2G" ||
                data_string == "GISS/E2-H" || data_string == "GISS/E2-R" ||
                data_string == "NCC/NORESM" ||
@@ -1057,12 +882,9 @@
                data_string == "GFDL/CM3" || data_string == "IPSL/CM5A-LR" ||
                data_string == "MIROC/MIROC5" || data_string == "UKMO/HadGEM2-A"
               ) {
-
         unset_vars1(ID);
-
         x.options[0].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[0].disabled=false;
         x.options[1].disabled=false;
         x.options[2].disabled=false;
@@ -1072,7 +894,6 @@
         x.options[6].disabled=false;
         x.options[7].disabled=false;
         x.options[8].disabled=false;
-
         x.options[13].disabled=false;
         x.options[14].disabled=false;
         x.options[15].disabled=false;
@@ -1091,141 +912,77 @@
         x.options[28].disabled=false;
         x.options[31].disabled=false;
         x.options[32].disabled=false;
-
       }
       else if (data_string == "ECMWF/interim") {
         unset_vars1(ID);
- 
         x.options[3].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[3].disabled=false;
         x.options[31].disabled=false;
         x.options[32].disabled=false;
       }
-
-      // form variable string
       select_var1(ID);
     }
-
-
     $(document).ready(function(){
-
-//      $("a").click(function(event){
-//        alert("As you can see, the link no longer took you to jquery.com");
-//        event.preventDefault();
-//      });
-
-
-      $("#download_data").click(function(event) {
-    	  
-        var durl = $("#data_url").val();
-        //alert(durl);
-         //alert(parameters.getDataUrl());
-        window.location.assign(durl);
-      });
-
-
+    $("#download_data").click(function(event) {
+      var durl = $("#data_url").val();
+      window.location.assign(durl);
+    });
       $("#scatterPlot2V").click(function(event) {
-        // alert('****** inside scatterPlot2V()!');
         Response = null;
-
-        // no data to download yet
         disable_download_button();
-
         $("#Response").html("Calculating ...");
         $("#data_url").html("Calculating ...");
         $("#Image").html("");
-
-        // sample url: http://cmacws.jpl.nasa.gov:9002/svc/scatterPlot2V?model1=ukmo_hadgem2-a&var1=ts&pres1=200&model2=ukmo_hadgem2-a&var2=clt&pres2=200&start_time=199001&end_time=199512&lon1=0&lon2=100&lat1=-29&lat2=29
-        // form url string
-        // var url = "http://cmacws.jpl.nasa.gov:9002/svc/scatterPlot2V?";
-        //var url = "http://" + "einstein.sv.cmu.edu" + ":9002/svc/diffPlot2V?";
-        var url = "http://" + window.location.hostname + ":9002/svc/diffPlot2V?";
-        // alert("url: " + url);
-
+        var url = "http:
         var d1 = $("#data1").val();
         var model1 = d1.replace("/", "_");
         model1 = model1.toLowerCase();
-
         var arglist = "";
         arglist = arglist.concat("model1=");
         arglist = arglist.concat(model1);
-
-        // alert("arglist: " + arglist);
-
         var v1 = $("#var1").val();
         arglist = arglist.concat("&var1=");
         arglist = arglist.concat(variable1);
-
-        // alert("arglist: " + arglist);
-
         var pres1 = $("#pres1").val();
         arglist = arglist.concat("&pres1=");
         arglist = arglist.concat(pres1);
-
         var d2 = $("#data2").val();
         var model2 = d2.replace("/", "_");
         model2 = model2.toLowerCase();
-
         arglist = arglist.concat("&model2=");
         arglist = arglist.concat(model2);
-
-        // alert("arglist: " + arglist);
-
         var v2 = $("#var2").val();
         arglist = arglist.concat("&var2=");
         arglist = arglist.concat(variable2);
-
-        // alert("arglist: " + arglist);
-
         var pres2 = $("#pres2").val();
         arglist = arglist.concat("&pres2=");
         arglist = arglist.concat(pres2);
-
         var t0 = $("#t0").val();
         var t1 = $("#t1").val();
-
         t0 = t0.replace("-", "");
         t1 = t1.replace("-", "");
-
         arglist = arglist.concat("&start_time=");
         arglist = arglist.concat(t0);
-
         arglist = arglist.concat("&end_time=");
         arglist = arglist.concat(t1);
-
-        // alert("arglist: " + arglist);
-
         var lon0 = $("#lon0").val();
         var lon1 = $("#lon1").val();
         var lat0 = $("#lat0").val();
         var lat1 = $("#lat1").val();
-
         arglist = arglist.concat("&lon1=");
         arglist = arglist.concat(lon0);
-
         arglist = arglist.concat("&lon2=");
         arglist = arglist.concat(lon1);
-
         arglist = arglist.concat("&lat1=");
         arglist = arglist.concat(lat0);
-
         arglist = arglist.concat("&lat2=");
         arglist = arglist.concat(lat1);
-
-        // alert("arglist: " + arglist);
-
         var purpose = $("#purpose").val();
         arglist = arglist.concat("&purpose=");
         arglist = arglist.concat(purpose);
-
-        // url = url + encodeURIComponent(arglist);
         url = url + encodeURI(arglist);
-        // url = url + arglist;
-        // alert("url: " + url);
-
-        var urlTimeBounds = "http://" + window.location.hostname + ":9002/svc/two_time_bounds?";
+        var urlTimeBounds = "http:
         var arglistTB = "";
         arglistTB = arglistTB.concat("serviceType=");
         arglistTB = arglistTB.concat("2");
@@ -1238,8 +995,6 @@
         arglistTB = arglistTB.concat("&var2=");
         arglistTB = arglistTB.concat(variable2);
         urlTimeBounds = urlTimeBounds + encodeURI(arglistTB);
-        // alert("urlTimeBounds: " + urlTimeBounds);
-
         $.ajax({
             type: "GET",
             url: urlTimeBounds,
@@ -1247,9 +1002,7 @@
             data: null,
             success: function(data, textStatus, xhr) {
                 Response = data;
-                // alert("data: " + data);
                 if (data.success == false) {
-                    // alert(data.error);
                     Response = null;
                     var text = JSON.stringify(data, null, 4);
                     text = "Error in backend: <br>" + text; 
@@ -1258,81 +1011,56 @@
                     return;
                 }
                 var text = JSON.stringify(data, null, 4);
-                // alert("text: " + text);
-                // $("#Response").html("<pre>"+text+"</pre>");
-                // $("#Response").html(text);
-
                 var tb1 = data.time_bounds1;
                 var bds1 = String(tb1).split(",");
-                // alert("tb1: " + tb1);
-                // alert("bds1: " + bds1);
                 var lowerT1 = parseInt(bds1[0]);
-                // alert("inside ajax, lowerT1: " + lowerT1);
                 var upperT1 = parseInt(bds1[1]);
-                // alert("upperT1: " + upperT1);
-
                 var tb2 = data.time_bounds2;
                 var bds2 = String(tb2).split(",");
-                // alert("tb2: " + tb2);
-                // alert("bds2: " + bds2);
                 var lowerT2 = parseInt(bds2[0]);
-                // alert("inside ajax, lowerT2: " + lowerT2);
                 var upperT2 = parseInt(bds2[1]);
-                // alert("upperT2: " + upperT2);
-
                 var t0I = parseInt(t0);
                 var t1I = parseInt(t1);
-                // alert("t0: " + t0I);
-                // alert("t1: " + t1I);
-
                 var lowerT, upperT;
-                // compute the intersection of the two data bounds
-                if (lowerT1 == 0  || upperT1 == 0){ // no data-1
+                if (lowerT1 == 0  || upperT1 == 0){ 
                   alert("We do not have data for the data-1 source and variable configuration.");
                   return;
                 }
-                else if (lowerT2 == 0  || upperT2 == 0){ // no data-2
+                else if (lowerT2 == 0  || upperT2 == 0){ 
                   alert("We do not have data for the data-2 source and variable configuration.");
                   return;
                 }
-                else if (lowerT2 > upperT1 || lowerT1 > upperT2) { // no intersection
+                else if (lowerT2 > upperT1 || lowerT1 > upperT2) { 
                   alert("The two data sets/vars do not have a common time range.");
                   return;
                 }
-                else { // compute intersection
-                  if (lowerT1 > lowerT2) { // pick bigger lower time bound
+                else { 
+                  if (lowerT1 > lowerT2) { 
                     lowerT = lowerT1;
                   }
                   else {
                     lowerT = lowerT2;
                   }
-
-                  if (upperT1 > upperT2) { // pick smaller upper time bound
+                  if (upperT1 > upperT2) { 
                     upperT = upperT2;
                   }
                   else {
                     upperT = upperT1;
                   }
                 }
-                // alert("lowerT: " + lowerT);
-                // alert("upperT: " + upperT);
-
                 if (t0I < lowerT && t1I < lowerT ||
                     t0I > upperT && t1I > upperT) {
                   alert("We do not have data that span your time range. Try the range inside ["+lowerT+", "+upperT+"].");
                   return;
                 }
-
                 if (t0I < lowerT && t1I <= upperT) {
                   alert("Your start year-month is out of bound. It has to be in or later than " + lowerT +
                         ". We will use the range ["+lowerT+", "+t1I+"] for you.");
                 }
-
                 if (t1I > upperT && t0I >= lowerT) {
                   alert("Your end year-month is out of bound. It has to be in or earlier than " + upperT +
                         ". We will use the range ["+t0I+", "+upperT+"] for you.");
                 }
-
                 if (t0I < lowerT && t1I > upperT ) {
                   alert("Both of your start and end year-months are out of bounds. They have to be in or earlier than " + upperT +
                         ", and in or later than " + lowerT + ". We will use the range ["+lowerT+", "+upperT+"] for you.");
@@ -1341,15 +1069,10 @@
             error: function(xhr, textStatus, errorThrown) {
 		$("#Response").html("error!");
 		$("#data_url").html("error!");
-                // alert("xhr.status: "+xhr.status);
-                // alert("error status: "+textStatus);
             },
             complete: function(xhr, textStatus) {
-                //alert("complete status: "+textStatus);
             }
         });
-
-
         $.ajax({
             type: "GET",
             url: url,
@@ -1357,325 +1080,278 @@
             data: null,
             success: function(data, textStatus, xhr) {
                 Response = data;
-                // alert("data: " + data);
                 if (data.success == false) {
-                    // alert(data.error);
                     Response = null;
                     var text = JSON.stringify(data, null, 4);
                     text = "Error in backend: <br>" + text; 
-                    // $("#Response").html("<span style='color:red'>" + text + "</span>");
                     $("#Response").html(text);
                     $("#data_url").html(text);
                     return;
                 }
                 var text = JSON.stringify(data, null, 4);
-                // alert(text);
-                // $("#Response").html("<pre>"+text+"</pre>");
                 $("#Response").html(text);
-
                 var html = "<img src='"+data.url+"' width='820'/>";
-                // alert(html);
                 $("#Image").html(html);
-
-                // post dataUrl to textarea and enable download button
                 $("#data_url").html(data.dataUrl);
                 enable_download_button();
             },
             error: function(xhr, textStatus, errorThrown) {
                 $("#Response").html("error!");
                 $("#data_url").html("error!");
-                // alert("xhr.status: "+xhr.status);
-                // alert("error status: "+textStatus);
             },
             complete: function(xhr, textStatus) {
-                //alert("complete status: "+textStatus);
             }
         });
-
       });
-
     });
-    
   </script>
-  }
-  
-  @main("Parameters of ConfId", scripts){
-	
-	@flash_message()  
-	<p>
-<div id="source1" style = "display:none;">@parameters.getSource1()</div>
-<div id="variableName1" style = "display:none;">@parameters.getVaribaleName1()</div>
-<div id="pressureLevel1" style = "display:none;">@parameters.getPressureLevel1()</div>
-<div id="startYearMonth" style = "display:none;">@parameters.getStartYear()</div>
-<div id="startLat"style = "display:none;" >@parameters.getStartLat()</div>
-<div id="startLon"style = "display:none;" >@parameters.getStartLon()</div>
-<div id="source2" style = "display:none;">@parameters.getSource2()</div>
-<div id="variableName2"style = "display:none;" >@parameters.getVaribaleName2()</div>
-<div id="pressureLevel2" style = "display:none;">@parameters.getPressureLevel2()</div>
-<div id="endYearMonth" style = "display:none;">@parameters.getEndYear()</div>
-<div id="endLat" style = "display:none;">@parameters.getEndLat()</div>
-<div id="endLon" style = "display:none;">@parameters.getEndLon()</div>
-<div id="executionPurpose" style = "display:none;">@parameters.getExecutionPurpose()</div>
-<div id="image" style = "display:none;">@parameters.getImage()</div>
-<div id="dataURL" style = "display:none;">@parameters.getDataUrl()</div>
-<div id="serviceResponseText" style = "display:none;">@parameters.getServiceResponse()</div>
+} @main("Parameters of ConfId", scripts){ @flash_message()
+<p>
+<div id="source1" style="display: none;">@parameters.getSource1()</div>
+<div id="variableName1" style="display: none;">@parameters.getVaribaleName1()</div>
+<div id="pressureLevel1" style="display: none;">@parameters.getPressureLevel1()</div>
+<div id="startYearMonth" style="display: none;">@parameters.getStartYear()</div>
+<div id="startLat" style="display: none;">@parameters.getStartLat()</div>
+<div id="startLon" style="display: none;">@parameters.getStartLon()</div>
+<div id="source2" style="display: none;">@parameters.getSource2()</div>
+<div id="variableName2" style="display: none;">@parameters.getVaribaleName2()</div>
+<div id="pressureLevel2" style="display: none;">@parameters.getPressureLevel2()</div>
+<div id="endYearMonth" style="display: none;">@parameters.getEndYear()</div>
+<div id="endLat" style="display: none;">@parameters.getEndLat()</div>
+<div id="endLon" style="display: none;">@parameters.getEndLon()</div>
+<div id="executionPurpose" style="display: none;">@parameters.getExecutionPurpose()</div>
+<div id="image" style="display: none;">@parameters.getImage()</div>
+<div id="dataURL" style="display: none;">@parameters.getDataUrl()</div>
+<div id="serviceResponseText" style="display: none;">@parameters.getServiceResponse()</div>
 <table border="1">
-
-<tr>
-<td colspan="4">
-<center>
-<b>Service: Difference Plot of Two Time Averaged Variables</b><br><br>
-This service calculates the differences between two specified variables and displays the lat-lon maps of the two variables and their differences. <br><br>
-</center>
-</td>
-</tr>
-
-<tr>
-<td colspan="2">
-<center>
-data 1
-</center>
-</td>
-
-<td colspan="2">
-<center>
-data 2
-</center>
-</td>
-</tr>
-
-<tr>
-<td>source:</td><td><select name="data1", id="data1" onchange="select_data1(1)">
-<optgroup label="Model: Historical">
-<option>CCCMA/CANESM2</option>
-<option>GFDL/ESM2G</option>
-<option>GISS/E2-H</option>
-<option>GISS/E2-R</option>
-<option>NCAR/CAM5</option>
-<option>NCC/NORESM</option>
-<option>UKMO/HadGEM2-ES</option>
-</optgroup>
-<optgroup label="Model: AMIP">
-<option>CCCMA/CANAM4</option>
-<option>CSIRO/MK3.6</option>
-<option>GFDL/CM3</option>
-<option>IPSL/CM5A-LR</option>
-<option>MIROC/MIROC5</option>
-<option>UKMO/HadGEM2-A</option>
-</optgroup>
-<!-- <option>NASA/obs4MIPs</option>  -->
-<optgroup label="Observation">
-<option>NASA/MODIS</option>
-<option>NASA/AMSRE</option>
-<option>NASA/TRMM</option>
-<option>NASA/GPCP</option>
-<option>NASA/QuikSCAT</option>
-<option>NASA/AVISO</option>
-<option>NASA/GRACE</option>
-<option>NOAA/NODC</option>
-<option>NASA/CERES</option>
-<option>NASA/AIRS</option>
-<option>NASA/MLS</option>
-<option>ARGO/ARGO</option>
-</optgroup>
-<optgroup label="Reanalysis">
-<option>ECMWF/interim</option>
-</optgroup>
-</select></td>
-
-<td>source:</td><td><select name="data2", id="data2" onchange="select_data1(2)">
-<optgroup label="Model: Historical">
-<option  >CCCMA/CANESM2</option>
-<option >GFDL/ESM2G</option>
-<option >GISS/E2-H</option>
-<option >GISS/E2-R</option>
-<option>NCAR/CAM5</option>
-<option>NCC/NORESM</option>
-<option>UKMO/HadGEM2-ES</option>
-</optgroup>
-<optgroup label="Model: AMIP">
-<option>CCCMA/CANAM4</option>
-<option>CSIRO/MK3.6</option>
-<option>GFDL/CM3</option>
-<option>IPSL/CM5A-LR</option>
-<option>MIROC/MIROC5</option>
-<option>UKMO/HadGEM2-A</option>
-</optgroup>
-<!-- <option>NASA/obs4MIPs</option>  -->
-<optgroup label="Observation">
-<option>NASA/MODIS</option>
-<option>NASA/AMSRE</option>
-<option>NASA/TRMM</option>
-<option>NASA/GPCP</option>
-<option>NASA/QuikSCAT</option>
-<option>NASA/AVISO</option>
-<option>NASA/GRACE</option>
-<option>NOAA/NODC</option>
-<option>NASA/CERES</option>
-<option>NASA/AIRS</option>
-<option>NASA/MLS</option>
-<option>ARGO/ARGO</option>
-</optgroup>
-<optgroup label="Reanalysis">
-<option>ECMWF/interim</option>
-</optgroup>
-</select></td>
-
-</tr>
-
-<tr>
-
-<td>variable name:</td><td><select name="var1", id="var1" onchange="select_var1(1)">
-<option>Precipitation Flux</option>
-<option>Total Cloud Fraction</option>
-<option>Surface Temperature</option>
-<option>Sea Surface Temperature</option>
-<option>Eastward Near-Surface Wind</option>
-<option>Northward Near-Surface Wind</option>
-<option>Near-Surface Wind Speed</option>
-<option>Sea Surface Height</option>
-<option>Leaf Area Index</option>
-<option>Equivalent Water Height Over Land</option>
-<option>Equivalent Water Height Over Ocean</option>
-<option>Ocean Heat Content Anomaly within 700 m Depth</option>
-<option>Ocean Heat Content Anomaly within 2000 m Depth</option>
-<option>Surface Downwelling Longwave Radiation</option>
-<option>Surface Downwelling Shortwave Radiation</option>
-<option>Surface Upwelling Longwave Radiation</option>
-<option>Surface Upwelling Shortwave Radiation</option>
-<option>Surface Downwelling Clear-Sky Longwave Radiation</option>
-<option>Surface Downwelling Clear-Sky Shortwave Radiation</option>
-<option>Surface Upwelling Clear-Sky Shortwave Radiation</option>
-<option>TOA Incident Shortwave Radiation</option>
-<option>TOA Outgoing Longwave Radiation</option>
-<option>TOA Outgoing Shortwave Radiation</option>
-<option>TOA Outgoing Clear-Sky Longwave Radiation</option>
-<option>TOA Outgoing Clear-Sky Shortwave Radiation</option>
-<option>Air Temperature</option>
-<option>Specific Humidity</option>
-<option>Cloud Ice Water Content</option>
-<option>Cloud Liquid Water Content</option>
-<option>Ocean Temperature</option>
-<option>Ocean Salinity</option>
-<option>Vertical Wind Velocity</option>
-<option>Relative Humidity</option>
-</select>
-</td>
-
-
-<td>variable name:</td><td><select name="var2", id="var2" onchange="select_var1(2)">
-<option>Precipitation Flux</option>
-<option>Total Cloud Fraction</option>
-<option>Surface Temperature</option>
-<option>Sea Surface Temperature</option>
-<option>Eastward Near-Surface Wind</option>
-<option>Northward Near-Surface Wind</option>
-<option>Near-Surface Wind Speed</option>
-<option>Sea Surface Height</option>
-<option>Leaf Area Index</option>
-<option>Equivalent Water Height Over Land</option>
-<option>Equivalent Water Height Over Ocean</option>
-<option>Ocean Heat Content Anomaly within 700 m Depth</option>
-<option>Ocean Heat Content Anomaly within 2000 m Depth</option>
-<option>Surface Downwelling Longwave Radiation</option>
-<option>Surface Downwelling Shortwave Radiation</option>
-<option>Surface Upwelling Longwave Radiation</option>
-<option>Surface Upwelling Shortwave Radiation</option>
-<option>Surface Downwelling Clear-Sky Longwave Radiation</option>
-<option>Surface Downwelling Clear-Sky Shortwave Radiation</option>
-<option>Surface Upwelling Clear-Sky Shortwave Radiation</option>
-<option>TOA Incident Shortwave Radiation</option>
-<option>TOA Outgoing Longwave Radiation</option>
-<option>TOA Outgoing Shortwave Radiation</option>
-<option>TOA Outgoing Clear-Sky Longwave Radiation</option>
-<option>TOA Outgoing Clear-Sky Shortwave Radiation</option>
-<option>Air Temperature</option>
-<option>Specific Humidity</option>
-<option>Cloud Ice Water Content</option>
-<option>Cloud Liquid Water Content</option>
-<option>Ocean Temperature</option>
-<option>Ocean Salinity</option>
-<option>Vertical Wind Velocity</option>
-<option>Relative Humidity</option>
-</select>
-</td>
-
-</tr>
-
-<tr>
-
-<td>
-atmosphere pressure level (hPa) <br> or ocean pressure level (dbar)
-</td>
-<td>
-<input id="pres1" value="500" alt="pressure"/>
-</td>
-
-<td>
-atmosphere pressure level (hPa) <br> or ocean pressure level (dbar)
-</td>
-<td>
-<input id="pres2" value="500" alt="pressure"/>
-</td>
-
-</tr>
-
-<tr>
-</tr>
-
-<tr>
-<td>start year-month:</td><td><input id="t0" value=@parameters.getStartYear() alt="start"/></td>
-<td>end year-month:</td><td><input id="t1" value=@parameters.getEndYear() alt="end"/></td>
-</tr>
-
-
-<tr>
-<td>start lat (deg):</td><td><input id="lat0" value=@parameters.getStartLat()></td>
-<td>end lat (deg):</td><td><input id="lat1" value=@parameters.getEndLat()></td>
-</tr>
-
-<tr>
-<td>start lon (deg):</td><td><input id="lon0" value=@parameters.getStartLon()></td>
-<td>end lon (deg):</td><td><input id="lon1" value=@parameters.getEndLon()></td>
-</tr>
-
-<tr>
-<td colspan="1">
-Execution purpose
-</td>
-<td colspan="3">
-<form>
-<textarea name="purpose" id="purpose" rows="4" cols="50"> </textarea>
-</form>
-</td>
-</tr>
-
-<tr>
-<td colspan="2" align="center"><input id="scatterPlot2V" type="submit" value="            Run  Again            " style="height:28px"/></td>
-<form>
-<td colspan="2" align="center"><input id="download_data" type="button" value="Download Data" style="height:28px"/>
-</td>
-</form>
-
-</tr>
-
-<tr>
-<td colspan="4">
-<div id="Image">Image Here</div>
-</td>
-</tr>
-
-<tr>
-<td colspan="4" align="center">
-<textarea readonly id="data_url" cols="89" rows="2">Data URL Here</textarea>
-</td>
-</tr>
-
-<tr>
-<td colspan="4" align="center">
-<textarea id="Response" cols="89" rows="6">Service Response Text Here</textarea>
-</td>
-</tr>
-
+	<tr>
+		<td colspan="4">
+			<center>
+				<b>Service: Difference Plot of Two Time Averaged Variables</b><br>
+				<br> This service calculates the differences between two
+				specified variables and displays the lat-lon maps of the two
+				variables and their differences. <br>
+				<br>
+			</center>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="2">
+			<center>data 1</center>
+		</td>
+		<td colspan="2">
+			<center>data 2</center>
+		</td>
+	</tr>
+	<tr>
+		<td>source:</td>
+		<td><select name="data1" , id="data1" onchange="select_data1(1)">
+				<optgroup label="Model: Historical">
+					<option>CCCMA/CANESM2</option>
+					<option>GFDL/ESM2G</option>
+					<option>GISS/E2-H</option>
+					<option>GISS/E2-R</option>
+					<option>NCAR/CAM5</option>
+					<option>NCC/NORESM</option>
+					<option>UKMO/HadGEM2-ES</option>
+				</optgroup>
+				<optgroup label="Model: AMIP">
+					<option>CCCMA/CANAM4</option>
+					<option>CSIRO/MK3.6</option>
+					<option>GFDL/CM3</option>
+					<option>IPSL/CM5A-LR</option>
+					<option>MIROC/MIROC5</option>
+					<option>UKMO/HadGEM2-A</option>
+				</optgroup>
+				<optgroup label="Observation">
+					<option>NASA/MODIS</option>
+					<option>NASA/AMSRE</option>
+					<option>NASA/TRMM</option>
+					<option>NASA/GPCP</option>
+					<option>NASA/QuikSCAT</option>
+					<option>NASA/AVISO</option>
+					<option>NASA/GRACE</option>
+					<option>NOAA/NODC</option>
+					<option>NASA/CERES</option>
+					<option>NASA/AIRS</option>
+					<option>NASA/MLS</option>
+					<option>ARGO/ARGO</option>
+				</optgroup>
+				<optgroup label="Reanalysis">
+					<option>ECMWF/interim</option>
+				</optgroup>
+		</select></td>
+		<td>source:</td>
+		<td><select name="data2" , id="data2" onchange="select_data1(2)">
+				<optgroup label="Model: Historical">
+					<option>CCCMA/CANESM2</option>
+					<option>GFDL/ESM2G</option>
+					<option>GISS/E2-H</option>
+					<option>GISS/E2-R</option>
+					<option>NCAR/CAM5</option>
+					<option>NCC/NORESM</option>
+					<option>UKMO/HadGEM2-ES</option>
+				</optgroup>
+				<optgroup label="Model: AMIP">
+					<option>CCCMA/CANAM4</option>
+					<option>CSIRO/MK3.6</option>
+					<option>GFDL/CM3</option>
+					<option>IPSL/CM5A-LR</option>
+					<option>MIROC/MIROC5</option>
+					<option>UKMO/HadGEM2-A</option>
+				</optgroup>
+				<optgroup label="Observation">
+					<option>NASA/MODIS</option>
+					<option>NASA/AMSRE</option>
+					<option>NASA/TRMM</option>
+					<option>NASA/GPCP</option>
+					<option>NASA/QuikSCAT</option>
+					<option>NASA/AVISO</option>
+					<option>NASA/GRACE</option>
+					<option>NOAA/NODC</option>
+					<option>NASA/CERES</option>
+					<option>NASA/AIRS</option>
+					<option>NASA/MLS</option>
+					<option>ARGO/ARGO</option>
+				</optgroup>
+				<optgroup label="Reanalysis">
+					<option>ECMWF/interim</option>
+				</optgroup>
+		</select></td>
+	</tr>
+	<tr>
+		<td>variable name:</td>
+		<td><select name="var1" , id="var1" onchange="select_var1(1)">
+				<option>Precipitation Flux</option>
+				<option>Total Cloud Fraction</option>
+				<option>Surface Temperature</option>
+				<option>Sea Surface Temperature</option>
+				<option>Eastward Near-Surface Wind</option>
+				<option>Northward Near-Surface Wind</option>
+				<option>Near-Surface Wind Speed</option>
+				<option>Sea Surface Height</option>
+				<option>Leaf Area Index</option>
+				<option>Equivalent Water Height Over Land</option>
+				<option>Equivalent Water Height Over Ocean</option>
+				<option>Ocean Heat Content Anomaly within 700 m Depth</option>
+				<option>Ocean Heat Content Anomaly within 2000 m Depth</option>
+				<option>Surface Downwelling Longwave Radiation</option>
+				<option>Surface Downwelling Shortwave Radiation</option>
+				<option>Surface Upwelling Longwave Radiation</option>
+				<option>Surface Upwelling Shortwave Radiation</option>
+				<option>Surface Downwelling Clear-Sky Longwave Radiation</option>
+				<option>Surface Downwelling Clear-Sky Shortwave Radiation</option>
+				<option>Surface Upwelling Clear-Sky Shortwave Radiation</option>
+				<option>TOA Incident Shortwave Radiation</option>
+				<option>TOA Outgoing Longwave Radiation</option>
+				<option>TOA Outgoing Shortwave Radiation</option>
+				<option>TOA Outgoing Clear-Sky Longwave Radiation</option>
+				<option>TOA Outgoing Clear-Sky Shortwave Radiation</option>
+				<option>Air Temperature</option>
+				<option>Specific Humidity</option>
+				<option>Cloud Ice Water Content</option>
+				<option>Cloud Liquid Water Content</option>
+				<option>Ocean Temperature</option>
+				<option>Ocean Salinity</option>
+				<option>Vertical Wind Velocity</option>
+				<option>Relative Humidity</option>
+		</select></td>
+		<td>variable name:</td>
+		<td><select name="var2" , id="var2" onchange="select_var1(2)">
+				<option>Precipitation Flux</option>
+				<option>Total Cloud Fraction</option>
+				<option>Surface Temperature</option>
+				<option>Sea Surface Temperature</option>
+				<option>Eastward Near-Surface Wind</option>
+				<option>Northward Near-Surface Wind</option>
+				<option>Near-Surface Wind Speed</option>
+				<option>Sea Surface Height</option>
+				<option>Leaf Area Index</option>
+				<option>Equivalent Water Height Over Land</option>
+				<option>Equivalent Water Height Over Ocean</option>
+				<option>Ocean Heat Content Anomaly within 700 m Depth</option>
+				<option>Ocean Heat Content Anomaly within 2000 m Depth</option>
+				<option>Surface Downwelling Longwave Radiation</option>
+				<option>Surface Downwelling Shortwave Radiation</option>
+				<option>Surface Upwelling Longwave Radiation</option>
+				<option>Surface Upwelling Shortwave Radiation</option>
+				<option>Surface Downwelling Clear-Sky Longwave Radiation</option>
+				<option>Surface Downwelling Clear-Sky Shortwave Radiation</option>
+				<option>Surface Upwelling Clear-Sky Shortwave Radiation</option>
+				<option>TOA Incident Shortwave Radiation</option>
+				<option>TOA Outgoing Longwave Radiation</option>
+				<option>TOA Outgoing Shortwave Radiation</option>
+				<option>TOA Outgoing Clear-Sky Longwave Radiation</option>
+				<option>TOA Outgoing Clear-Sky Shortwave Radiation</option>
+				<option>Air Temperature</option>
+				<option>Specific Humidity</option>
+				<option>Cloud Ice Water Content</option>
+				<option>Cloud Liquid Water Content</option>
+				<option>Ocean Temperature</option>
+				<option>Ocean Salinity</option>
+				<option>Vertical Wind Velocity</option>
+				<option>Relative Humidity</option>
+		</select></td>
+	</tr>
+	<tr>
+		<td>atmosphere pressure level (hPa) <br> or ocean pressure
+			level (dbar)
+		</td>
+		<td><input id="pres1" value="500" alt="pressure" /></td>
+		<td>atmosphere pressure level (hPa) <br> or ocean pressure
+			level (dbar)
+		</td>
+		<td><input id="pres2" value="500" alt="pressure" /></td>
+	</tr>
+	<tr>
+	</tr>
+	<tr>
+		<td>start year-month:</td>
+		<td><input id="t0" value=@parameters.getStartYear() alt="start" /></td>
+		<td>end year-month:</td>
+		<td><input id="t1" value=@parameters.getEndYear() alt="end" /></td>
+	</tr>
+	<tr>
+		<td>start lat (deg):</td>
+		<td><input id="lat0" value=@parameters.getStartLat()></td>
+		<td>end lat (deg):</td>
+		<td><input id="lat1" value=@parameters.getEndLat()></td>
+	</tr>
+	<tr>
+		<td>start lon (deg):</td>
+		<td><input id="lon0" value=@parameters.getStartLon()></td>
+		<td>end lon (deg):</td>
+		<td><input id="lon1" value=@parameters.getEndLon()></td>
+	</tr>
+	<tr>
+		<td colspan="1">Execution purpose</td>
+		<td colspan="3">
+			<form>
+				<textarea name="purpose" id="purpose" rows="4" cols="50"> </textarea>
+			</form>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="2" align="center"><input id="scatterPlot2V"
+			type="submit" value="            Run  Again            "
+			style="height: 28px" /></td>
+		<form>
+			<td colspan="2" align="center"><input id="download_data"
+				type="button" value="Download Data" style="height: 28px" /></td>
+		</form>
+	</tr>
+	<tr>
+		<td colspan="4">
+			<div id="Image">Image Here</div>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="4" align="center"><textarea readonly id="data_url"
+				cols="89" rows="2">Data URL Here</textarea></td>
+	</tr>
+	<tr>
+		<td colspan="4" align="center"><textarea id="Response" cols="89"
+				rows="6">Service Response Text Here</textarea></td>
+	</tr>
 </table>
-}
\ No newline at end of file
+}


[15/50] [abbrv] incubator-cmda git commit: delete comments

Posted by xi...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/f22b3e32/app/views/climate/threeDVariableTwoDSlice.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/threeDVariableTwoDSlice.scala.html b/app/views/climate/threeDVariableTwoDSlice.scala.html
index e6421df..24273f2 100644
--- a/app/views/climate/threeDVariableTwoDSlice.scala.html
+++ b/app/views/climate/threeDVariableTwoDSlice.scala.html
@@ -1,23 +1,18 @@
-@(parameters: metadata.ThreeDVar2DSlice)
-
-@import helper._
-
+@(parameters: metadata.ThreeDVar2DSlice) @import helper._
 <link rel="stylesheet"
 	href='@routes.Assets.at("stylesheets/livefitler.css")'>
-	
 @scripts = {
-	<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
-	<script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
-	<script type="text/javascript" src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
-	<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js"></script>
-	<script type="text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
-	<script type="text/javascript" src="@routes.Assets.at("javascripts/xmisc.js")"></script>
-	<script type="text/javascript">
-	
+<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
+<script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
+<script type="text/javascript"
+	src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
+<script type="text/javascript" src="https:
+	<script type="
+	text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
+<script type="text/javascript" src="@routes.Assets.at("javascripts/xmisc.js")"></script>
+<script type="text/javascript">
 	 var Response = null;
     var variable = "";
-
-    // called on load or reload
     window.onload = function() {
       changeMonths();
       changeDataSource();
@@ -47,23 +42,16 @@
         $('#radioLog').prop( "checked", true );
       }
     }
-
-
-    // disable download data button
     function disable_download_button()
     {
       var x=document.getElementById("download_data");
       x.disabled=true;
     }
-
-
-    // enable download data button
     function enable_download_button()
     {
       var x=document.getElementById("download_data");
       x.disabled=false;
     }         
-    
     function changeMonths(){
       var months = $("#monthsPara").text();
       var temp = months.split(", ");
@@ -95,8 +83,6 @@
         }
       }
     }
-    
-    // select all months in the checkboxes
     function select_all_months()
     {
         document.getElementById('Jan').checked = true;
@@ -112,8 +98,6 @@
         document.getElementById('Nov').checked = true;
         document.getElementById('Dec').checked = true;
     }
-
-    // see if no month is selected
     function no_month_check()
     {
         if (document.getElementById('Jan').checked == false &&
@@ -128,14 +112,11 @@
            document.getElementById('Oct').checked == false &&
            document.getElementById('Nov').checked == false &&
            document.getElementById('Dec').checked == false) {
-           // alert("No month check!");
            return true;
           }
         else
            return false;
     }
-
-    // unselect all months in the checkboxes
     function reset_months()
     {
         document.getElementById('Jan').checked = false;
@@ -151,12 +132,9 @@
         document.getElementById('Nov').checked = false;
         document.getElementById('Dec').checked = false;
     }
-
-    // enable all vars in dropdown menu
     function reset_vars()
     {
       var x=document.getElementById("var");
-
       x.options[0].disabled=false;
       x.options[1].disabled=false;
       x.options[2].disabled=false;
@@ -166,15 +144,10 @@
       x.options[6].disabled=false;
       x.options[7].disabled=false;
     }
-
-    // form variable string based on "var" dropdown selection
     function select_var()
     {
       var var_string = $("#var").val();
-
-      // disable the download button because of this change
       disable_download_button();
-
       if (var_string == "Air Temperature")
         variable = "ta";
       else if (var_string == "Specific Humidity")
@@ -191,28 +164,15 @@
         variable = "wap";
       else if (var_string == "Relative Humidity")
         variable = "hur";
-
-      // alert("variable: " + variable)
     }
-
-    // set up "var" dropdown based status of "data" dropdown
     function select_data()
     {
       var data_string = $("#data").val();
       var x=document.getElementById("var");
-
-      // disable the download button because of this change
       disable_download_button();
-
-      // enable all options in "var" dropdown first
       reset_vars();
-
-      // alert(data_string);
-
-      // disable corresponding "var" options
       if (data_string == "NASA/AIRS") {
         x.options[0].selected=true;
-        //x.options[1].selected=true;
         x.options[2].disabled=true;
         x.options[3].disabled=true;
         x.options[4].disabled=true;
@@ -222,7 +182,6 @@
       }
       else if (data_string == "NASA/MLS") {
         x.options[0].selected=true;
-        //x.options[1].selected=true;
         x.options[2].disabled=true;
         x.options[3].disabled=true;
         x.options[4].disabled=true;
@@ -236,7 +195,6 @@
         x.options[2].disabled=true;
         x.options[3].disabled=true;
         x.options[4].selected=true;
-        //x.options[5].selected=true;
         x.options[6].disabled=true;
         x.options[7].disabled=true;
       }
@@ -247,26 +205,17 @@
         x.options[3].disabled=true;
         x.options[4].disabled=true;
         x.options[5].disabled=true;
-        //x.options[6].disabled=true;
-        //x.options[7].disabled=true;
         x.options[6].selected=true;
       }
-      else { // models
+      else { 
         x.options[0].selected=true;
-        //x.options[1].selected=true;
-        //x.options[2].selected=true;
-        //x.options[3].selected=true;
         x.options[4].disabled=true;
         x.options[5].disabled=true;
       }
-
-      // form variable string
       select_var();
     }
-    
     function changeDataSource(){
       var dataSource = $('#dataSource').text();
-      //dataSource = "NASA_QuikSCAT";
       var x = document.getElementById("data");
       if(dataSource == "NASA_AIRS" ){
         x.options[0].selected=true;
@@ -319,9 +268,7 @@
       else if(dataSource == "ECMWF_interim" ){
         x.options[16].selected=true;
       }
-        //$('#data option:contains('+dataSource+')').prop({selected: true});
     }
-    
     function changeVariableName(){
       var var_string = $('#variableName').text();
       var x = document.getElementById("var");
@@ -342,229 +289,145 @@
         else if (var_string == "hur")
           x.options[7].selected=true;
     }
-
-    // select checkboxes based on "months" dropdown
     function select_months()
     {
       var s1=document.getElementById("months");
-      // alert(s1.selectedIndex);
-      // alert(s1.options[s1.selectedIndex].value);
-
-      // disable the download button because of this change
       disable_download_button();
-
-      // "select none"
       if (s1.selectedIndex == 1) {
         reset_months();
       }
-      // "select all"
       if (s1.selectedIndex == 0) {
         select_all_months();
       }
-      // "summer"
       if (s1.selectedIndex == 2) {
         reset_months();
         document.getElementById('Jun').checked = true;
         document.getElementById('Jul').checked = true;
         document.getElementById('Aug').checked = true;
       }
-      // "autumn"
       if (s1.selectedIndex == 3) {
         reset_months();
         document.getElementById('Sep').checked = true;
         document.getElementById('Oct').checked = true;
         document.getElementById('Nov').checked = true;
       }
-      // "winter"
       if (s1.selectedIndex == 4) {
         reset_months();
         document.getElementById('Dec').checked = true;
         document.getElementById('Jan').checked = true;
         document.getElementById('Feb').checked = true;
       }
-      // "spring"
       if (s1.selectedIndex == 5) {
         reset_months();
         document.getElementById('Mar').checked = true;
         document.getElementById('Apr').checked = true;
         document.getElementById('May').checked = true;
       }
-        
     }
-
     $(document).ready(function(){
-
-      /*$("a").click(function(event){
-        alert("As you can see, the link no longer took you to jquery.com");
-        event.preventDefault();
-      });*/
-
-
       $("#download_data").click(function(event) {
         var durl = $("#data_url").val();
-        // alert(durl);
         window.location.assign(durl);
       });
-
-
       $("#twodvarmap").click(function(event) {
 	Response = null;
-
-        // no data to download yet
         disable_download_button();
-
-        // flag error if no month box is checked
         if (no_month_check()) {
-           // $("#Response").html("<span style='color:red'>Error: please check at least one month.</span>");
            $("#Response").html("Error: please check at least one month.");
            $("#Image").html("");
            return;
         }
-
         $("#Response").html("Calculating ...");
         $("#data_url").html("Calculating ...");
         $("#Image").html("");
-
-        // sample url: http://cmacws.jpl.nasa.gov:9002/svc/twoDimSlice3D?model=UKMO_HadGEM2-ES&var=hus&start_time=199001&end_time=199512&pr=80000&lon1=0&lon2=20&lat1=-29&lat2=29&months=1,2,3,4,5,6,7,8,9,10,11,12
-
-        // form url string
-        // var url = "http://cmacws.jpl.nasa.gov:9002/svc/twoDimSlice3D?";
-        var url = "http://" + window.location.hostname + ":9002/svc/twoDimSlice3D?";
-        // alert(url);
-
+        var url = "http:
         var d1 = $("#data").val();
         var model1 = d1.replace("/", "_");
-
         var arglist = "";
         arglist = arglist.concat("model=");
         arglist = arglist.concat(model1);
-
         var v1 = $("#var").val();
         arglist = arglist.concat("&var=");
         arglist = arglist.concat(variable);
-
         var t0 = $("#t0").val();
         var t1 = $("#t1").val();
-
         t0 = t0.replace("-", "");
         t1 = t1.replace("-", "");
-
         arglist = arglist.concat("&start_time=");
         arglist = arglist.concat(t0);
-
         arglist = arglist.concat("&end_time=");
         arglist = arglist.concat(t1);
-
         var pres = $("#pres").val();
-        // alert("variable: " + variable);
-
-        // when variable is the 3D Ocean Salinity or Ocean Temperature
         if (variable == 'ot' || variable == 'os')
-          pres = pres * 10000;  // convert from dbar on GUI
-        // when variable is 2D
+          pres = pres * 10000;  
         else
-          pres = pres * 100;  // convert from hPa on GUI
-
+          pres = pres * 100;  
         arglist = arglist.concat("&pr=");
         arglist = arglist.concat(pres);
-
         var lon0 = $("#lon0").val();
         var lon1 = $("#lon1").val();
         var lat0 = $("#lat0").val();
         var lat1 = $("#lat1").val();
-
         arglist = arglist.concat("&lon1=");
         arglist = arglist.concat(lon0);
-
         arglist = arglist.concat("&lon2=");
         arglist = arglist.concat(lon1);
-
         arglist = arglist.concat("&lat1=");
         arglist = arglist.concat(lat0);
-
         arglist = arglist.concat("&lat2=");
         arglist = arglist.concat(lat1);
-
         var s1 = document.getElementById('months');
-
-        // get months checked by client
         var month_str = "";
-
         var mm = document.getElementById('Jan');
         if (mm.checked == true)
           month_str = month_str.concat(",1");
-
         var mm = document.getElementById('Feb');
         if (mm.checked == true)
           month_str = month_str.concat(",2");
-
         var mm = document.getElementById('Mar');
         if (mm.checked == true)
           month_str = month_str.concat(",3");
-
         var mm = document.getElementById('Apr');
         if (mm.checked == true)
           month_str = month_str.concat(",4");
-
         var mm = document.getElementById('May');
         if (mm.checked == true)
           month_str = month_str.concat(",5");
-
         var mm = document.getElementById('Jun');
         if (mm.checked == true)
           month_str = month_str.concat(",6");
-
         var mm = document.getElementById('Jul');
         if (mm.checked == true)
           month_str = month_str.concat(",7");
-
         var mm = document.getElementById('Aug');
         if (mm.checked == true)
           month_str = month_str.concat(",8");
-
         var mm = document.getElementById('Sep');
         if (mm.checked == true)
           month_str = month_str.concat(",9");
-
         var mm = document.getElementById('Oct');
         if (mm.checked == true)
           month_str = month_str.concat(",10");
-
         var mm = document.getElementById('Nov');
         if (mm.checked == true)
           month_str = month_str.concat(",11");
-
         var mm = document.getElementById('Dec');
         if (mm.checked == true)
           month_str = month_str.concat(",12");
-
-        // remove the leading ','
         month_str = month_str.substr(1);
-        // alert(month_str);
-
         arglist = arglist.concat("&months=");
         arglist = arglist.concat(month_str);
-        // alert("arglist: " + arglist);
-
         arglist = arglist.concat("&scale=");
         var z = document.getElementById("radioLin").checked;
-        // alert(z);
         if (z == true)
           arglist = arglist.concat('0');
         else
           arglist = arglist.concat('4');
-
         var purpose = $("#purpose").val();
         arglist = arglist.concat("&purpose=");
         arglist = arglist.concat(purpose);
-
-        // url = url + encodeURIComponent(arglist);
         url = url + encodeURI(arglist);
-        // url = url + arglist;
-        //alert("url: " + url);
-
-
-        var urlTimeBounds = "http://" + window.location.hostname + ":9002/svc/time_bounds?";
+        var urlTimeBounds = "http:
         var arglistTB = "";
         arglistTB = arglistTB.concat("serviceType=");
         arglistTB = arglistTB.concat("1");
@@ -573,8 +436,6 @@
         arglistTB = arglistTB.concat("&var=");
         arglistTB = arglistTB.concat(variable);
         urlTimeBounds = urlTimeBounds + encodeURI(arglistTB);
-        // alert("urlTimeBounds: " + urlTimeBounds);
-
         $.ajax({
             type: "GET",
             url: urlTimeBounds,
@@ -582,9 +443,7 @@
             data: null,
             success: function(data, textStatus, xhr) {
                 Response = data;
-                // alert("data: " + data);
                 if (data.success == false) {
-                    // alert(data.error);
                     Response = null;
                     var text = JSON.stringify(data, null, 4);
                     text = "Error in backend: <br>" + text; 
@@ -593,44 +452,29 @@
                     return;
                 }
                 var text = JSON.stringify(data, null, 4);
-                // alert("text: " + text);
-                // $("#Response").html("<pre>"+text+"</pre>");
-                // $("#Response").html(text);
-
                 var tb = data.time_bounds;
                 var bds = String(tb).split(",");
-                // alert("tb: " + tb);
-                // alert("bds: " + bds);
                 var lowerT = parseInt(bds[0]);
                 var upperT = parseInt(bds[1]);
-                // alert("lowerT: " + lowerT);
-                // alert("upperT: " + upperT);
                 var t0I = parseInt(t0);
                 var t1I = parseInt(t1);
-                // alert("t0: " + t0I);
-                // alert("t1: " + t1I);
-
                 if ( lowerT == 0 && upperT ==0 ) {
                   alert("We do not have data for this source and variable configuration.");
                   return;
                 }
-
                 if (t0I < lowerT && t1I < lowerT ||
                     t0I > upperT && t1I > upperT) {
                   alert("We do not have data that span your time range. Try the range inside ["+lowerT+", "+upperT+"].");
                   return;
                 }
-
                 if (t0I < lowerT && t1I <= upperT) {
                   alert("Your start year-month is out of bound. It has to be in or later than " + lowerT +
                         ". We will use the range ["+lowerT+", "+t1I+"] for you.");
                 }
-
                 if (t1I > upperT && t0I >= lowerT) {
                   alert("Your end year-month is out of bound. It has to be in or earlier than " + upperT +
                         ". We will use the range ["+t0I+", "+upperT+"] for you.");
                 }
-
                 if (t0I < lowerT && t1I > upperT ) {
                   alert("Both of your start and end year-months are out of bounds. They have to be in or earlier than " + upperT +
                         ", and in or later than " + lowerT + ". We will use the range ["+lowerT+", "+upperT+"] for you.");
@@ -639,15 +483,10 @@
             error: function(xhr, textStatus, errorThrown) {
 		$("#Response").html("error!");
 		$("#data_url").html("error!");
-                // alert("xhr.status: "+xhr.status);
-                // alert("error status: "+textStatus);
             },
             complete: function(xhr, textStatus) {
-                //alert("complete status: "+textStatus);
             }
         });
-
-
         $.ajax({
             type: "GET",
             url: url,
@@ -655,53 +494,33 @@
             data: null,
             success: function(data, textStatus, xhr) {
                 Response = data;
-                // alert("data: " + data);
                 if (data.success == false) {
-                    // alert(data.error);
                     Response = null;
                     var text = JSON.stringify(data, null, 4);
                     text = "Error in backend: <br>" + text; 
-                    // $("#Response").html("<span style='color:red'>" + text + "</span>");
                     $("#Response").html(text);
                     $("#data_url").html(text);
                     return;
                 }
                 var text = JSON.stringify(data, null, 4);
-                // alert(text);
-                // $("#Response").html("<pre>"+text+"</pre>");
                 $("#Response").html(text);
-
                 var html1 = "<img src='"+data.url+"' width='680'/>";
-                // alert(html1);
                 $("#Image").html(html1);
-
-                // post dataUrl to textarea and enable download button
                 $("#data_url").html(data.dataUrl);
                 enable_download_button();
             },
             error: function(xhr, textStatus, errorThrown) {
 		$("#Response").html("error!");
 		$("#data_url").html("error!");
-                // alert("xhr.status: "+xhr.status);
-                // alert("error status: "+textStatus);
             },
             complete: function(xhr, textStatus) {
-                //alert("complete status: "+textStatus);
             }
         });
-
       });
-
-
     });
-    
   </script>
-  }
-  
-  @main("Parameters of ConfId", scripts){
-	
-	@flash_message()   
-	<p>
+} @main("Parameters of ConfId", scripts){ @flash_message()
+<p>
 <div id="dataSource" style="display: none;">@parameters.getDataSource()</div>
 <div id="variableName" style="display: none;">@parameters.getVariableName()</div>
 <div id="startYearMonth" style="display: none;">@parameters.getStartYearMonth()</div>
@@ -719,160 +538,154 @@
 <div id="dataURL" style="display: none;">@parameters.getDataURL()</div>
 <div id="serviceResponseText" style="display: none;">@parameters.getServiceResponseText()</div>
 <table border="1" width="800" align="center">
-
-<tr>
-<td colspan="4">
-<center>
-<b>Service: 3-D Variable 2-D Slice</b><br><br>
-This service generates a slice map of a 3-dimensional variable at a selected pressure level. <br>
-Select a data source, a variable name, a time range, a spatial range, and a pressure level below.<br><br>
-</center>
-</td>
-</tr>
-
-<tr>
-<td>data source:</td><td><select name="data", id="data" onchange="select_data()">
-<optgroup label="Observation">
-<option selected="NASA/AIRS">NASA/AIRS</option>
-<option>NASA/MLS</option>
-<option>ARGO/ARGO</option>
-</optgroup>
-<optgroup label="Model: Historical">
-<option>CCCMA/CANESM2</option>
-<option>GFDL/ESM2G</option>
-<option>GISS/E2-H</option>
-<option>GISS/E2-R</option>
-<option>NCAR/CAM5</option>
-<option>NCC/NORESM</option>
-<option>UKMO/HadGEM2-ES</option>
-</optgroup>
-<optgroup label="Model: AMIP">
-<option>CCCMA/CANAM4</option>
-<option>CSIRO/MK3.6</option>
-<option>GFDL/CM3</option>
-<option>IPSL/CM5A-LR</option>
-<option>MIROC/MIROC5</option>
-<option>UKMO/HadGEM2-A</option>
-</optgroup>
-</optgroup>
-<optgroup label="Reanalysis">
-<option>ECMWF/interim</option>
-</select></td>
-
-<td>variable name:</td><td><select name="var", id="var" onchange="select_var()">
-<option>Air Temperature</option> 
-<option>Specific Humidity</option>
-<option>Cloud Ice Water Content</option>
-<option>Cloud Liquid Water Content</option>
-<option>Ocean Temperature</option>
-<option>Ocean Salinity</option>
-<option>Vertical Wind Velocity</option>
-<option>Relative Humidity</option>
-</select></td>
-</tr>
-
-<tr>
-<td>start year-month:</td><td><input id="t0" value="2004-01" alt="start"/></td>
-<td>end year-month:</td><td><input id="t1" value="2004-12" alt="end"/></td>
-</tr>
-
-<tr>
-<td>select months:</td>
-<td><select name="months" id="months" onchange="select_months()">
-<option id="all">select all</option>
-<option id="none">select none</option>
-<option id="summer">Summer:Jun-Jul-Aug</option>
-<option id="autum">Autumn:Sep-Oct-Nov</option>
-<option id="winter">Winter:Dec-Jan-Feb</option>
-<option id="spring">Spring:Mar-Apr-May</option> </select>
-</td>
-<td>
-atmosphere pressure level (hPa) <br> or ocean pressure level (dbar)
-</td>
-<td>
-<input id="pres" value="500" alt="pressure"/>
-</td>
-</tr>
-
-<tr>
-<td>
-<label><input type="checkbox" name="option1" id="Jan" value="Jan" /> Jan<br></label>
-<label><input type="checkbox" name="option1" id="Feb" value="Feb" /> Feb<br></label>
-<label><input type="checkbox" name="option1" id="Mar" value="Mar" /> Mar<br></label>
-</td>
-<td>
-<label><input type="checkbox" name="option1" id="Apr" value="Apr" /> Apr<br></label>
-<label><input type="checkbox" name="option1" id="May" value="May" /> May<br></label>
-<label><input type="checkbox" name="option1" id="Jun" value="Jun" /> Jun<br></label>
-</td>
-<td>
-<label><input type="checkbox" name="option1" id="Jul" value="Jul" /> Jul<br></label>
-<label><input type="checkbox" name="option1" id="Aug" value="Aug" /> Aug<br></label>
-<label><input type="checkbox" name="option1" id="Sep" value="Sep" /> Sep<br></label>
-</td>
-<td>
-<label><input type="checkbox" name="option1" id="Oct" value="Oct" /> Oct<br></label>
-<label><input type="checkbox" name="option1" id="Nov" value="Nov" /> Nov<br></label>
-<label><input type="checkbox" name="option1" id="Dec" value="Dec" /> Dec<br></label>
-</td>
-</tr>
-
-<tr>
-<td>start lat (deg):</td><td><input id="lat0" value="-90"/></td>
-<td>end lat (deg):</td><td><input id="lat1" value="90"/></td>
-</tr>
-
-<tr>
-<td>start lon (deg):</td><td><input id="lon0" value="0"/></td>
-<td>end lon (deg):</td><td><input id="lon1" value="360"/></td>
-</tr>
-
-<tr>
-<td colspan="1">
-color scale:
-</td>
-<td colspan="3">
-<form> <input type="radio" name="scale1" value="linear" id="radioLin" checked>linear
-<input type="radio" name="scale1" value="logarithmic" id="radioLog">logarithmic
-</form>
-</td>
-</tr>
-
-<tr>
-<td colspan="1">
-Execution purpose
-</td>
-<td colspan="3">
-<form>
-<textarea name="purpose" id="purpose" rows="4" cols="50"> </textarea>
-</form>
-</td>
-</tr>
-
-<tr>
-<td colspan="2" align="center"><input id="twodvarmap" type="submit" value="            Run Again            " style="height:28px"/></td>
-<form>
-<td colspan="2" align="center"><input id="download_data" type="button" value="Download Data" style="height:28px"/>
-</td>
-</form>
-</tr>
-
-<tr>
-<td colspan="4">
-<div id="Image">Image Here</div>
-</td>
-</tr>
-<tr>
-<td colspan="4" align="center">
-<textarea readonly id="data_url" cols="89" rows="2">Data URL Here</textarea>
-</td>
-</tr>
-<tr>
-<td colspan="4" align="center">
-<textarea readonly id="Response" cols="89" rows="6">Service Response Text Here</textarea>
-</td>
-</tr>
-</p>
-
+	<tr>
+		<td colspan="4">
+			<center>
+				<b>Service: 3-D Variable 2-D Slice</b><br>
+				<br> This service generates a slice map of a 3-dimensional
+				variable at a selected pressure level. <br> Select a data
+				source, a variable name, a time range, a spatial range, and a
+				pressure level below.<br>
+				<br>
+			</center>
+		</td>
+	</tr>
+	<tr>
+		<td>data source:</td>
+		<td><select name="data" , id="data" onchange="select_data()">
+				<optgroup label="Observation">
+					<option selected="NASA/AIRS">NASA/AIRS</option>
+					<option>NASA/MLS</option>
+					<option>ARGO/ARGO</option>
+				</optgroup>
+				<optgroup label="Model: Historical">
+					<option>CCCMA/CANESM2</option>
+					<option>GFDL/ESM2G</option>
+					<option>GISS/E2-H</option>
+					<option>GISS/E2-R</option>
+					<option>NCAR/CAM5</option>
+					<option>NCC/NORESM</option>
+					<option>UKMO/HadGEM2-ES</option>
+				</optgroup>
+				<optgroup label="Model: AMIP">
+					<option>CCCMA/CANAM4</option>
+					<option>CSIRO/MK3.6</option>
+					<option>GFDL/CM3</option>
+					<option>IPSL/CM5A-LR</option>
+					<option>MIROC/MIROC5</option>
+					<option>UKMO/HadGEM2-A</option>
+				</optgroup>
+				</optgroup>
+				<optgroup label="Reanalysis">
+					<option>ECMWF/interim</option>
+		</select></td>
+		<td>variable name:</td>
+		<td><select name="var" , id="var" onchange="select_var()">
+				<option>Air Temperature</option>
+				<option>Specific Humidity</option>
+				<option>Cloud Ice Water Content</option>
+				<option>Cloud Liquid Water Content</option>
+				<option>Ocean Temperature</option>
+				<option>Ocean Salinity</option>
+				<option>Vertical Wind Velocity</option>
+				<option>Relative Humidity</option>
+		</select></td>
+	</tr>
+	<tr>
+		<td>start year-month:</td>
+		<td><input id="t0" value="2004-01" alt="start" /></td>
+		<td>end year-month:</td>
+		<td><input id="t1" value="2004-12" alt="end" /></td>
+	</tr>
+	<tr>
+		<td>select months:</td>
+		<td><select name="months" id="months" onchange="select_months()">
+				<option id="all">select all</option>
+				<option id="none">select none</option>
+				<option id="summer">Summer:Jun-Jul-Aug</option>
+				<option id="autum">Autumn:Sep-Oct-Nov</option>
+				<option id="winter">Winter:Dec-Jan-Feb</option>
+				<option id="spring">Spring:Mar-Apr-May</option>
+		</select></td>
+		<td>atmosphere pressure level (hPa) <br> or ocean pressure
+			level (dbar)
+		</td>
+		<td><input id="pres" value="500" alt="pressure" /></td>
+	</tr>
+	<tr>
+		<td><label><input type="checkbox" name="option1" id="Jan"
+				value="Jan" /> Jan<br></label> <label><input type="checkbox"
+				name="option1" id="Feb" value="Feb" /> Feb<br></label> <label><input
+				type="checkbox" name="option1" id="Mar" value="Mar" /> Mar<br></label>
+		</td>
+		<td><label><input type="checkbox" name="option1" id="Apr"
+				value="Apr" /> Apr<br></label> <label><input type="checkbox"
+				name="option1" id="May" value="May" /> May<br></label> <label><input
+				type="checkbox" name="option1" id="Jun" value="Jun" /> Jun<br></label>
+		</td>
+		<td><label><input type="checkbox" name="option1" id="Jul"
+				value="Jul" /> Jul<br></label> <label><input type="checkbox"
+				name="option1" id="Aug" value="Aug" /> Aug<br></label> <label><input
+				type="checkbox" name="option1" id="Sep" value="Sep" /> Sep<br></label>
+		</td>
+		<td><label><input type="checkbox" name="option1" id="Oct"
+				value="Oct" /> Oct<br></label> <label><input type="checkbox"
+				name="option1" id="Nov" value="Nov" /> Nov<br></label> <label><input
+				type="checkbox" name="option1" id="Dec" value="Dec" /> Dec<br></label>
+		</td>
+	</tr>
+	<tr>
+		<td>start lat (deg):</td>
+		<td><input id="lat0" value="-90" /></td>
+		<td>end lat (deg):</td>
+		<td><input id="lat1" value="90" /></td>
+	</tr>
+	<tr>
+		<td>start lon (deg):</td>
+		<td><input id="lon0" value="0" /></td>
+		<td>end lon (deg):</td>
+		<td><input id="lon1" value="360" /></td>
+	</tr>
+	<tr>
+		<td colspan="1">color scale:</td>
+		<td colspan="3">
+			<form>
+				<input type="radio" name="scale1" value="linear" id="radioLin"
+					checked>linear <input type="radio" name="scale1"
+					value="logarithmic" id="radioLog">logarithmic
+			</form>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="1">Execution purpose</td>
+		<td colspan="3">
+			<form>
+				<textarea name="purpose" id="purpose" rows="4" cols="50"> </textarea>
+			</form>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="2" align="center"><input id="twodvarmap"
+			type="submit" value="            Run Again            "
+			style="height: 28px" /></td>
+		<form>
+			<td colspan="2" align="center"><input id="download_data"
+				type="button" value="Download Data" style="height: 28px" /></td>
+		</form>
+	</tr>
+	<tr>
+		<td colspan="4">
+			<div id="Image">Image Here</div>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="4" align="center"><textarea readonly id="data_url"
+				cols="89" rows="2">Data URL Here</textarea></td>
+	</tr>
+	<tr>
+		<td colspan="4" align="center"><textarea readonly id="Response"
+				cols="89" rows="6">Service Response Text Here</textarea></td>
+	</tr>
+	</p>
 </table>
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/f22b3e32/app/views/climate/threeDVariableZonalMean.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/threeDVariableZonalMean.scala.html b/app/views/climate/threeDVariableZonalMean.scala.html
index fb4c924..1ecc918 100644
--- a/app/views/climate/threeDVariableZonalMean.scala.html
+++ b/app/views/climate/threeDVariableZonalMean.scala.html
@@ -1,31 +1,25 @@
-@(parameters: metadata.ThreeDVarZonalMean)
-
-@import helper._
-
+@(parameters: metadata.ThreeDVarZonalMean) @import helper._
 <link rel="stylesheet"
 	href='@routes.Assets.at("stylesheets/livefitler.css")'>
-	
 @scripts = {
-	<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
-	<script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
-	<script type="text/javascript" src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
-	<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js"></script>
-	<script type="text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
-	<script type="text/javascript" src="@routes.Assets.at("javascripts/xmisc.js")"></script>
-	<script type="text/javascript">
+<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
+<script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
+<script type="text/javascript"
+	src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
+<script type="text/javascript" src="https:
+	<script type="
+	text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
+<script type="text/javascript" src="@routes.Assets.at("javascripts/xmisc.js")"></script>
+<script type="text/javascript">
 	var Response = null;
     var variable = "";
-
-    // called on load or reload
     window.onload = function() {
       changeMonths();
       changeDataSource();
       select_data();
       changeVariableName();
       select_var();
-
       enable_download_button();
-      // no data to download yet
       $('#t0').val($('#startYearMonth').text());
       $('#t1').val($('#endYearMonth').text());
       $('#pres').val($('#pressureRange').text());
@@ -55,23 +49,16 @@
         $('#radioLog2').prop("checked", true);
       }
     }
-
-
-    // disable download data button
     function disable_download_button()
     {
       var x=document.getElementById("download_data");
       x.disabled=true;
     }
-
-
-    // enable download data button
     function enable_download_button()
     {
       var x=document.getElementById("download_data");
       x.disabled=false;
     }
-
     function changeMonths(){
       var months = $("#monthsPara").text();
       var temp = months.split(", ");
@@ -103,8 +90,6 @@
         }
       }
     }
-    
-    // select all months in the checkboxes
     function select_all_months()
     {
         document.getElementById('Jan').checked = true;
@@ -120,8 +105,6 @@
         document.getElementById('Nov').checked = true;
         document.getElementById('Dec').checked = true;
     }
-
-    // see if no month is selected
     function no_month_check()
     {
         if (document.getElementById('Jan').checked == false &&
@@ -136,14 +119,11 @@
            document.getElementById('Oct').checked == false &&
            document.getElementById('Nov').checked == false &&
            document.getElementById('Dec').checked == false) {
-           // alert("No month check!");
            return true;
           }
         else
            return false;
     }
-
-    // unselect all months in the checkboxes
     function reset_months()
     {
         document.getElementById('Jan').checked = false;
@@ -159,12 +139,9 @@
         document.getElementById('Nov').checked = false;
         document.getElementById('Dec').checked = false;
     }
-
-    // enable all vars in dropdown menu
     function reset_vars()
     {
       var x=document.getElementById("var");
-
       x.options[0].disabled=false;
       x.options[1].disabled=false;
       x.options[2].disabled=false;
@@ -174,15 +151,10 @@
       x.options[6].disabled=false;
       x.options[7].disabled=false;
     }
-
-    // form variable string based on "var" dropdown selection
     function select_var()
     {
       var var_string = $("#var").val();
-
-      // disable the download button because of this change
       disable_download_button();
-
       if (var_string == "Air Temperature")
         variable = "ta";
       else if (var_string == "Specific Humidity")
@@ -199,28 +171,15 @@
         variable = "wap";
       else if (var_string == "Relative Humidity")
         variable = "hur";
-
-      // alert("variable: " + variable)
     }
-
-    // set up "var" dropdown based status of "data" dropdown
     function select_data()
     {
       var data_string = $("#data").val();
       var x=document.getElementById("var");
-
-      // disable the download button because of this change
       disable_download_button();
-
-      // enable all options in "var" dropdown first
       reset_vars();
-
-      // alert(data_string);
-
-      // disable corresponding "var" options
       if (data_string == "NASA/AIRS") {
         x.options[0].selected=true;
-        //x.options[1].selected=true;
         x.options[2].disabled=true;
         x.options[3].disabled=true;
         x.options[4].disabled=true;
@@ -230,7 +189,6 @@
       }
       else if (data_string == "NASA/MLS") {
         x.options[0].selected=true;
-        //x.options[1].selected=true;
         x.options[2].disabled=true;
         x.options[3].disabled=true;
         x.options[4].disabled=true;
@@ -244,7 +202,6 @@
         x.options[2].disabled=true;
         x.options[3].disabled=true;
         x.options[4].selected=true;
-        //x.options[5].selected=true;
         x.options[6].disabled=true;
         x.options[7].disabled=true;
       }
@@ -255,26 +212,17 @@
         x.options[3].disabled=true;
         x.options[4].disabled=true;
         x.options[5].disabled=true;
-        //x.options[6].disabled=true;
-        //x.options[7].disabled=true;
         x.options[6].selected=true;
       }
       else {
         x.options[0].selected=true;
-        //x.options[1].selected=true;
-        //x.options[2].selected=true;
-        //x.options[3].selected=true;
         x.options[4].disabled=true;
         x.options[5].disabled=true;
       }
-
-      // form variable string
       select_var();
     }
-
     function changeDataSource(){
       var dataSource = $('#dataSource').text();
-      //dataSource = "NASA_QuikSCAT";
       var x = document.getElementById("data");
       if(dataSource == "NASA_AIRS" ){
         x.options[0].selected=true;
@@ -327,9 +275,7 @@
       else if(dataSource == "ECMWF_interim" ){
         x.options[16].selected=true;
       }
-        //$('#data option:contains('+dataSource+')').prop({selected: true});
     }
-    
     function changeVariableName(){
       var var_string = $('#variableName').text();
       var x = document.getElementById("var");
@@ -350,121 +296,80 @@
         else if (var_string == "hur")
           x.options[7].selected=true;
     }
-    
-    // select checkboxes based on "months" dropdown
     function select_months()
     {
       var s1=document.getElementById("months");
-      // alert(s1.selectedIndex);
-      // alert(s1.options[s1.selectedIndex].value);
-
-      // disable the download button because of this change
       disable_download_button();
-
-      // "select none"
       if (s1.selectedIndex == 1) {
         reset_months();
       }
-      // "select all"
       if (s1.selectedIndex == 0) {
         select_all_months();
       }
-      // "summer"
       if (s1.selectedIndex == 2) {
         reset_months();
         document.getElementById('Jun').checked = true;
         document.getElementById('Jul').checked = true;
         document.getElementById('Aug').checked = true;
       }
-      // "autumn"
       if (s1.selectedIndex == 3) {
         reset_months();
         document.getElementById('Sep').checked = true;
         document.getElementById('Oct').checked = true;
         document.getElementById('Nov').checked = true;
       }
-      // "winter"
       if (s1.selectedIndex == 4) {
         reset_months();
         document.getElementById('Dec').checked = true;
         document.getElementById('Jan').checked = true;
         document.getElementById('Feb').checked = true;
       }
-      // "spring"
       if (s1.selectedIndex == 5) {
         reset_months();
         document.getElementById('Mar').checked = true;
         document.getElementById('Apr').checked = true;
         document.getElementById('May').checked = true;
       }
-        
     }
-
     $(document).ready(function(){
-
       $("#download_data").click(function(event) {
         var durl = $("#data_url").val();
-         //alert(durl);
         window.location.assign(durl);
       });
-         
-
       $("#threedvarzonalmean").click(function(event) {
 	Response = null;
-
-        // no data to download yet
         disable_download_button();
-   
-        // flag error if no month box is checked
         if (no_month_check()) {
-           // $("#Response").html("<span style='color:red'>Error: please check at least one month.</span>");
            $("#Response").html("Error: please check at least one month.");
            $("#Image").html("");
            return;
         }
-
         $("#Response").html("Calculating ...");
         $("#data_url").html("Calculating ...");
         $("#Image").html("");
-
-        // sample url: http://cmacws.jpl.nasa.gov:9002/svc/threeDimZonalMean?model=ukmo_hadgem2-a&var=ts&start_time=199001&end_time=199512&lat1=-29&lat2=29&pres1=90&pres2=20months=1,2,4,5,6,10,12
-
-        // form url string
-        var url = "http://" + window.location.hostname + ":9002/svc/threeDimZonalMean?";
-        // alert(url);
-
+        var url = "http:
         var d1 = $("#data").val();
         var model1 = d1.replace("/", "_");
-
         var arglist = "";
         arglist = arglist.concat("model=");
         arglist = arglist.concat(model1);
-
         var v1 = $("#var").val();
         arglist = arglist.concat("&var=");
         arglist = arglist.concat(variable);
-
         var t0 = $("#t0").val();
         var t1 = $("#t1").val();
-
         t0 = t0.replace("-", "");
         t1 = t1.replace("-", "");
-
         arglist = arglist.concat("&start_time=");
         arglist = arglist.concat(t0);
-
         arglist = arglist.concat("&end_time=");
         arglist = arglist.concat(t1);
-
         var lat0 = $("#lat0").val();
         var lat1 = $("#lat1").val();
-
         arglist = arglist.concat("&lat1=");
         arglist = arglist.concat(lat0);
-
         arglist = arglist.concat("&lat2=");
         arglist = arglist.concat(lat1);
-
         var pres = $("#pres").val();
         var splitty = pres.split(',');
         if (splitty.length != 2) {
@@ -474,119 +379,81 @@
         else {
           pres1 = splitty[0];
           pres2 = splitty[1];
-
-          // alert("variable: " + variable);
-
-          // when variable is the 3D Ocean Salinity or Ocean Temperature
           if (variable == 'ot' || variable == 'os') {
-            pres1 = pres1 * 10000;  // convert from dbar on GUI
-            pres2 = pres2 * 10000;  // convert from dbar on GUI
+            pres1 = pres1 * 10000;  
+            pres2 = pres2 * 10000;  
           }
-          // when variable is 2D
           else {
-            pres1 = pres1 * 100;  // convert from hPa on GUI
-            pres2 = pres2 * 100;  // convert from hPa on GUI
+            pres1 = pres1 * 100;  
+            pres2 = pres2 * 100;  
           }
         }
-
         arglist = arglist.concat("&pres1=");
         arglist = arglist.concat(pres1);
-
         arglist = arglist.concat("&pres2=");
         arglist = arglist.concat(pres2);
-
         var s1 = document.getElementById('months');
-
-        // get months checked by client
         var month_str = "";
-
         var mm = document.getElementById('Jan');
         if (mm.checked == true)
           month_str = month_str.concat(",1");
-
         var mm = document.getElementById('Feb');
         if (mm.checked == true)
           month_str = month_str.concat(",2");
-
         var mm = document.getElementById('Mar');
         if (mm.checked == true)
           month_str = month_str.concat(",3");
-
         var mm = document.getElementById('Apr');
         if (mm.checked == true)
           month_str = month_str.concat(",4");
-
         var mm = document.getElementById('May');
         if (mm.checked == true)
           month_str = month_str.concat(",5");
-
         var mm = document.getElementById('Jun');
         if (mm.checked == true)
           month_str = month_str.concat(",6");
-
         var mm = document.getElementById('Jul');
         if (mm.checked == true)
           month_str = month_str.concat(",7");
-
         var mm = document.getElementById('Aug');
         if (mm.checked == true)
           month_str = month_str.concat(",8");
-
         var mm = document.getElementById('Sep');
         if (mm.checked == true)
           month_str = month_str.concat(",9");
-
         var mm = document.getElementById('Oct');
         if (mm.checked == true)
           month_str = month_str.concat(",10");
-
         var mm = document.getElementById('Nov');
         if (mm.checked == true)
           month_str = month_str.concat(",11");
-
         var mm = document.getElementById('Dec');
         if (mm.checked == true)
           month_str = month_str.concat(",12");
-
-        // remove the leading ','
         month_str = month_str.substr(1);
-        // alert(month_str);
-
         arglist = arglist.concat("&months=");
         arglist = arglist.concat(month_str);
-        // alert("arglist: " + arglist);
-
         arglist = arglist.concat("&scale=");
         var y = document.getElementById("radioLin").checked;
         var yval;
         var z = document.getElementById("radioLin2").checked;
         var zval;
-        // alert(y);
         if (y == true)
           yval = 0;
         else
           yval = 2;
-
         if (z == true)
           zval = 0;
         else
           zval = 4;
-
         var scale1 =  yval + zval;
         var scale1_str =  scale1.toString();
-
         arglist = arglist.concat(scale1_str);
-
         var purpose = $("#purpose").val();
         arglist = arglist.concat("&purpose=");
         arglist = arglist.concat(purpose);
-
-        // url = url + encodeURIComponent(arglist);
         url = url + encodeURI(arglist);
-        // url = url + arglist;
-        // alert("url: " + url);
-
-        var urlTimeBounds = "http://" + window.location.hostname + ":9002/svc/time_bounds?";
+        var urlTimeBounds = "http:
         var arglistTB = "";
         arglistTB = arglistTB.concat("serviceType=");
         arglistTB = arglistTB.concat("1");
@@ -595,8 +462,6 @@
         arglistTB = arglistTB.concat("&var=");
         arglistTB = arglistTB.concat(variable);
         urlTimeBounds = urlTimeBounds + encodeURI(arglistTB);
-        // alert("urlTimeBounds: " + urlTimeBounds);
-
         $.ajax({
             type: "GET",
             url: urlTimeBounds,
@@ -604,9 +469,7 @@
             data: null,
             success: function(data, textStatus, xhr) {
                 Response = data;
-                // alert("data: " + data);
                 if (data.success == false) {
-                    // alert(data.error);
                     Response = null;
                     var text = JSON.stringify(data, null, 4);
                     text = "Error in backend: <br>" + text; 
@@ -615,44 +478,29 @@
                     return;
                 }
                 var text = JSON.stringify(data, null, 4);
-                // alert("text: " + text);
-                // $("#Response").html("<pre>"+text+"</pre>");
-                // $("#Response").html(text);
-
                 var tb = data.time_bounds;
                 var bds = String(tb).split(",");
-                // alert("tb: " + tb);
-                // alert("bds: " + bds);
                 var lowerT = parseInt(bds[0]);
                 var upperT = parseInt(bds[1]);
-                // alert("lowerT: " + lowerT);
-                // alert("upperT: " + upperT);
                 var t0I = parseInt(t0);
                 var t1I = parseInt(t1);
-                // alert("t0: " + t0I);
-                // alert("t1: " + t1I);
-
                 if ( lowerT == 0 && upperT ==0 ) {
                   alert("We do not have data for this source and variable configuration.");
                   return;
                 }
-
                 if (t0I < lowerT && t1I < lowerT ||
                     t0I > upperT && t1I > upperT) {
                   alert("We do not have data that span your time range. Try the range inside ["+lowerT+", "+upperT+"].");
                   return;
                 }
-
                 if (t0I < lowerT && t1I <= upperT) {
                   alert("Your start year-month is out of bound. It has to be in or later than " + lowerT +
                         ". We will use the range ["+lowerT+", "+t1I+"] for you.");
                 }
-
                 if (t1I > upperT && t0I >= lowerT) {
                   alert("Your end year-month is out of bound. It has to be in or earlier than " + upperT +
                         ". We will use the range ["+t0I+", "+upperT+"] for you.");
                 }
-
                 if (t0I < lowerT && t1I > upperT ) {
                   alert("Both of your start and end year-months are out of bounds. They have to be in or earlier than " + upperT +
                         ", and in or later than " + lowerT + ". We will use the range ["+lowerT+", "+upperT+"] for you.");
@@ -661,14 +509,10 @@
             error: function(xhr, textStatus, errorThrown) {
 		$("#Response").html("error!");
 		$("#data_url").html("error!");
-                // alert("xhr.status: "+xhr.status);
-                // alert("error status: "+textStatus);
             },
             complete: function(xhr, textStatus) {
-                //alert("complete status: "+textStatus);
             }
         });
-
         $.ajax({
             type: "GET",
             url: url,
@@ -676,52 +520,33 @@
             data: null,
             success: function(data, textStatus, xhr) {
                 Response = data;
-                // alert("data: " + data);
                 if (data.success == false) {
-                    // alert(data.error);
                     Response = null;
                     var text = JSON.stringify(data, null, 4);
                     text = "Error in backend: <br>" + text; 
-                    // $("#Response").html("<span style='color:red'>" + text + "</span>");
                     $("#Response").html(text);
                     $("#data_url").html(text);
                     return;
                 }
                 var text = JSON.stringify(data, null, 4);
-                // alert(text);
-                // $("#Response").html("<pre>"+text+"</pre>");
                 $("#Response").html(text);
-
                 var html1 = "<img src='"+data.url+"' width='680'/>";
-                // alert(html1);
                 $("#Image").html(html1);
-
-                // post dataUrl to textarea and enable download button
                 $("#data_url").html(data.dataUrl);
                 enable_download_button();
             },
             error: function(xhr, textStatus, errorThrown) {
 		$("#Response").html("error!");
                 $("#data_url").html("error!");
-                // alert("xhr.status: "+xhr.status);
-                // alert("error status: "+textStatus);
             },
             complete: function(xhr, textStatus) {
-                //alert("complete status: "+textStatus);
             }
         });
-
       });
-
-
     });
-    
   </script>
-  }
-  @main("Parameters of ConfId", scripts){
-	
-	@flash_message()   
-	<p>
+} @main("Parameters of ConfId", scripts){ @flash_message()
+<p>
 <div id="dataSource" style="display: none;">@parameters.getDataSource()</div>
 <div id="variableName" style="display: none;">@parameters.getVariableName()</div>
 <div id="startYearMonth" style="display: none;">@parameters.getStartYearMonth()</div>
@@ -738,163 +563,155 @@
 <div id="dataURL" style="display: none;">@parameters.getDataURL()</div>
 <div id="serviceResponseText" style="display: none;">@parameters.getServiceResponseText()</div>
 <table border="1" WIDTH="800" align="center">
-
-<tr>
-<td colspan="4">
-<center>
-<b>Service: 3-D Variable Zonal Mean</b> <br><br>
-This service generates a contour plot of zonal-mean vertical profiles of a 3-dimensional variable. <br>
-Select a data source, a variable name, a time range, and a pressure range below.<br><br>
-
-</center>
-</td>
-</tr>
-
-<tr>
-<td>data source:</td><td><select name="data", id="data" onchange="select_data()">
-<optgroup label="Observation">
-<option selected="NASA/AIRS">NASA/AIRS</option>
-<option>NASA/MLS</option>
-<option>ARGO/ARGO</option>
-</optgroup>
-<optgroup label="Model: Historical">
-<option>CCCMA/CANESM2</option>
-<option>GFDL/ESM2G</option>
-<option>GISS/E2-H</option>
-<option>GISS/E2-R</option>
-<option>NCAR/CAM5</option>
-<option>NCC/NORESM</option>
-<option>UKMO/HadGEM2-ES</option>
-</optgroup>
-<optgroup label="Model: AMIP">
-<option>CCCMA/CANAM4</option>
-<option>CSIRO/MK3.6</option>
-<option>GFDL/CM3</option>
-<option>IPSL/CM5A-LR</option>
-<option>MIROC/MIROC5</option>
-<option>UKMO/HadGEM2-A</option>
-</optgroup>
-<optgroup label="Reanalysis">
-<option>ECMWF/interim</option>
-</select></td>
-
-<td>variable name:</td><td><select name="var", id="var" onchange="select_var()">
-<option>Air Temperature</option>
-<option>Specific Humidity</option>
-<option>Cloud Ice Water Content</option>
-<option>Cloud Liquid Water Content</option>
-<option>Ocean Temperature</option>
-<option>Ocean Salinity</option>
-<option>Vertical Wind Velocity</option>
-<option>Relative Humidity</option>
-</select></td>
-
-</tr>
-
-<tr>
-<td>start year-month:</td><td><input id="t0" value="2004-01" alt="start"/></td>
-<td>end year-month:</td><td><input id="t1" value="2004-12" alt="end"/></td>
-</tr>
-
-<tr>
-<td>select months:</td>
-<td><select name="months" id="months" onchange="select_months()">
-<option id="all">select all</option>
-<option id="none">select none</option>
-<option id="summer">Summer:Jun-Jul-Aug</option>
-<option id="autum">Autumn:Sep-Oct-Nov</option>
-<option id="winter">Winter:Dec-Jan-Feb</option>
-<option id="spring">Spring:Mar-Apr-May</option> </select>
-</td>
-<td>   
-atmosphere pressure range (hPa) <br> or ocean pressure range (dbar):
-</td>
-<td><input id="pres" value="200,900" alt="pressure"/></td>
-</tr>
-
-<tr>
-<td>
-<label><input type="checkbox" name="option1" id="Jan" value="Jan" /> Jan<br></label>
-<label><input type="checkbox" name="option1" id="Feb" value="Feb" /> Feb<br></label>
-<label><input type="checkbox" name="option1" id="Mar" value="Mar" /> Mar<br></label>
-</td>
-<td>
-<label><input type="checkbox" name="option1" id="Apr" value="Apr" /> Apr<br></label>
-<label><input type="checkbox" name="option1" id="May" value="May" /> May<br></label>
-<label><input type="checkbox" name="option1" id="Jun" value="Jun" /> Jun<br></label>
-</td>
-<td>
-<label><input type="checkbox" name="option1" id="Jul" value="Jul" /> Jul<br></label>
-<label><input type="checkbox" name="option1" id="Aug" value="Aug" /> Aug<br></label>
-<label><input type="checkbox" name="option1" id="Sep" value="Sep" /> Sep<br></label>
-</td>
-<td>
-<label><input type="checkbox" name="option1" id="Oct" value="Oct" /> Oct<br></label>
-<label><input type="checkbox" name="option1" id="Nov" value="Nov" /> Nov<br></label>
-<label><input type="checkbox" name="option1" id="Dec" value="Dec" /> Dec<br></label>
-</td>
-</tr>
-
-<tr>
-<td>start lat (deg):</td><td><input id="lat0" value="-90"/></td>
-<td>end lat (deg):</td><td><input id="lat1" value="90"/></td>
-</tr>
-
-<tr>
-<td colspan="1">
-pressure level scale:
-</td>
-<td colspan="1">
-<form> <input type="radio" name="scale1" value="linear" id="radioLin">linear
-<input type="radio" name="scale1" value="logarithmic" id="radioLog" checked>logarithmic
-</form>
-</td>
-<td colspan="1">
-color scale:
-</td>
-<td colspan="1">
-<form> <input type="radio" name="scale2" value="linear" id="radioLin2" checked>linear
-<input type="radio" name="scale2" value="logarithmic" id="radioLog2">logarithmic
-</form>
-</td>
-</tr>
-
-<tr>
-<td colspan="1">
-Execution purpose
-</td>
-<td colspan="3">
-<form>
-<textarea name="purpose" id="purpose" rows="4" cols="50"> </textarea>
-</form>
-</td>
-</tr>
-
-<tr>
-<td colspan="2" align="center"><input id="threedvarzonalmean" type="submit" value="            Run  Again            " style="height:28px"/></td>
-<form>
-<td colspan="2" align="center"><input id="download_data" type="button" value="Download Data" style="height:28px"/>
-</td>
-</form>
-
-</tr>
-
-<tr>
-<td colspan="4">
-<div id="Image">Image Here</div>
-</td>
-</tr>
-<tr>
-<td colspan="4" align="center">
-<textarea readonly id="data_url" cols="89" rows="2">Data URL Here</textarea>
-</td>
-</tr>
-<tr>
-<td colspan="4" align="center">
-<textarea readonly id="Response" cols="89" rows="6">Service Response Text Here</textarea>
-</td>
-</tr>
-</p>
-
+	<tr>
+		<td colspan="4">
+			<center>
+				<b>Service: 3-D Variable Zonal Mean</b> <br>
+				<br> This service generates a contour plot of zonal-mean
+				vertical profiles of a 3-dimensional variable. <br> Select a
+				data source, a variable name, a time range, and a pressure range
+				below.<br>
+				<br>
+			</center>
+		</td>
+	</tr>
+	<tr>
+		<td>data source:</td>
+		<td><select name="data" , id="data" onchange="select_data()">
+				<optgroup label="Observation">
+					<option selected="NASA/AIRS">NASA/AIRS</option>
+					<option>NASA/MLS</option>
+					<option>ARGO/ARGO</option>
+				</optgroup>
+				<optgroup label="Model: Historical">
+					<option>CCCMA/CANESM2</option>
+					<option>GFDL/ESM2G</option>
+					<option>GISS/E2-H</option>
+					<option>GISS/E2-R</option>
+					<option>NCAR/CAM5</option>
+					<option>NCC/NORESM</option>
+					<option>UKMO/HadGEM2-ES</option>
+				</optgroup>
+				<optgroup label="Model: AMIP">
+					<option>CCCMA/CANAM4</option>
+					<option>CSIRO/MK3.6</option>
+					<option>GFDL/CM3</option>
+					<option>IPSL/CM5A-LR</option>
+					<option>MIROC/MIROC5</option>
+					<option>UKMO/HadGEM2-A</option>
+				</optgroup>
+				<optgroup label="Reanalysis">
+					<option>ECMWF/interim</option>
+		</select></td>
+		<td>variable name:</td>
+		<td><select name="var" , id="var" onchange="select_var()">
+				<option>Air Temperature</option>
+				<option>Specific Humidity</option>
+				<option>Cloud Ice Water Content</option>
+				<option>Cloud Liquid Water Content</option>
+				<option>Ocean Temperature</option>
+				<option>Ocean Salinity</option>
+				<option>Vertical Wind Velocity</option>
+				<option>Relative Humidity</option>
+		</select></td>
+	</tr>
+	<tr>
+		<td>start year-month:</td>
+		<td><input id="t0" value="2004-01" alt="start" /></td>
+		<td>end year-month:</td>
+		<td><input id="t1" value="2004-12" alt="end" /></td>
+	</tr>
+	<tr>
+		<td>select months:</td>
+		<td><select name="months" id="months" onchange="select_months()">
+				<option id="all">select all</option>
+				<option id="none">select none</option>
+				<option id="summer">Summer:Jun-Jul-Aug</option>
+				<option id="autum">Autumn:Sep-Oct-Nov</option>
+				<option id="winter">Winter:Dec-Jan-Feb</option>
+				<option id="spring">Spring:Mar-Apr-May</option>
+		</select></td>
+		<td>atmosphere pressure range (hPa) <br> or ocean pressure
+			range (dbar):
+		</td>
+		<td><input id="pres" value="200,900" alt="pressure" /></td>
+	</tr>
+	<tr>
+		<td><label><input type="checkbox" name="option1" id="Jan"
+				value="Jan" /> Jan<br></label> <label><input type="checkbox"
+				name="option1" id="Feb" value="Feb" /> Feb<br></label> <label><input
+				type="checkbox" name="option1" id="Mar" value="Mar" /> Mar<br></label>
+		</td>
+		<td><label><input type="checkbox" name="option1" id="Apr"
+				value="Apr" /> Apr<br></label> <label><input type="checkbox"
+				name="option1" id="May" value="May" /> May<br></label> <label><input
+				type="checkbox" name="option1" id="Jun" value="Jun" /> Jun<br></label>
+		</td>
+		<td><label><input type="checkbox" name="option1" id="Jul"
+				value="Jul" /> Jul<br></label> <label><input type="checkbox"
+				name="option1" id="Aug" value="Aug" /> Aug<br></label> <label><input
+				type="checkbox" name="option1" id="Sep" value="Sep" /> Sep<br></label>
+		</td>
+		<td><label><input type="checkbox" name="option1" id="Oct"
+				value="Oct" /> Oct<br></label> <label><input type="checkbox"
+				name="option1" id="Nov" value="Nov" /> Nov<br></label> <label><input
+				type="checkbox" name="option1" id="Dec" value="Dec" /> Dec<br></label>
+		</td>
+	</tr>
+	<tr>
+		<td>start lat (deg):</td>
+		<td><input id="lat0" value="-90" /></td>
+		<td>end lat (deg):</td>
+		<td><input id="lat1" value="90" /></td>
+	</tr>
+	<tr>
+		<td colspan="1">pressure level scale:</td>
+		<td colspan="1">
+			<form>
+				<input type="radio" name="scale1" value="linear" id="radioLin">linear
+				<input type="radio" name="scale1" value="logarithmic" id="radioLog"
+					checked>logarithmic
+			</form>
+		</td>
+		<td colspan="1">color scale:</td>
+		<td colspan="1">
+			<form>
+				<input type="radio" name="scale2" value="linear" id="radioLin2"
+					checked>linear <input type="radio" name="scale2"
+					value="logarithmic" id="radioLog2">logarithmic
+			</form>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="1">Execution purpose</td>
+		<td colspan="3">
+			<form>
+				<textarea name="purpose" id="purpose" rows="4" cols="50"> </textarea>
+			</form>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="2" align="center"><input id="threedvarzonalmean"
+			type="submit" value="            Run  Again            "
+			style="height: 28px" /></td>
+		<form>
+			<td colspan="2" align="center"><input id="download_data"
+				type="button" value="Download Data" style="height: 28px" /></td>
+		</form>
+	</tr>
+	<tr>
+		<td colspan="4">
+			<div id="Image">Image Here</div>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="4" align="center"><textarea readonly id="data_url"
+				cols="89" rows="2">Data URL Here</textarea></td>
+	</tr>
+	<tr>
+		<td colspan="4" align="center"><textarea readonly id="Response"
+				cols="89" rows="6">Service Response Text Here</textarea></td>
+	</tr>
+	</p>
 </table>
-}
\ No newline at end of file
+}


[48/50] [abbrv] incubator-cmda git commit: modify model package1

Posted by xi...@apache.org.
modify model package1


Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/f90e7328
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/f90e7328
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/f90e7328

Branch: refs/heads/master
Commit: f90e73283b669daa48054ec26403311fef5490ca
Parents: 25673e4 33b4c3e
Author: cat1021 <lo...@gmail.com>
Authored: Fri Sep 4 16:50:46 2015 -0700
Committer: cat1021 <lo...@gmail.com>
Committed: Fri Sep 4 16:50:46 2015 -0700

----------------------------------------------------------------------
 app/models/User.java | 209 +++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 186 insertions(+), 23 deletions(-)
----------------------------------------------------------------------



[12/50] [abbrv] incubator-cmda git commit: Fix home page bugs

Posted by xi...@apache.org.
Fix home page bugs

Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/1afa2537
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/1afa2537
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/1afa2537

Branch: refs/heads/master
Commit: 1afa253748b1b9e7342782f492eae3a8b2445bd5
Parents: cabc2e6
Author: mingqi830 <mq...@andrew.cmu.edu>
Authored: Wed Sep 2 16:48:17 2015 -0700
Committer: mingqi830 <mq...@andrew.cmu.edu>
Committed: Wed Sep 2 16:48:17 2015 -0700

----------------------------------------------------------------------
 app/controllers/Application.java | 25 +------------------------
 conf/routes                      |  5 -----
 2 files changed, 1 insertion(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/1afa2537/app/controllers/Application.java
----------------------------------------------------------------------
diff --git a/app/controllers/Application.java b/app/controllers/Application.java
index 6a10767..53686f5 100644
--- a/app/controllers/Application.java
+++ b/app/controllers/Application.java
@@ -30,7 +30,7 @@ public class Application extends Controller {
 	//final static Form<SensorType> sensorTypeForm = Form.form(SensorType.class);
 	
     public static Result index() {
-        return ok(index.render());
+        return ok(index.render(""));
     }
 
     // -- Authentication
@@ -48,29 +48,6 @@ public class Application extends Controller {
         }
         
     }
-
-    /** Login page. */
-    public static Result login() {
-        return ok( login.render(form(Login.class)) );
-    }
-    
-    /**  Handle login form submission. */
-    public static Result authenticate() {
-        Form<Login> loginForm = form(Login.class).bindFromRequest();
-        if(loginForm.hasErrors())
-            return badRequest(login.render(loginForm));
-        else {
-            session("email", loginForm.get().email);
-            return redirect( routes.Application.index() );
-        }
-    }
-
-    /** Logout and clean the session. */
-    public static Result logout() {
-        session().clear();
-        flash("success", "You've been logged out");
-        return redirect( routes.Application.index() );
-    }
     
     public static void flashMsg(JsonNode jsonNode){
 		Iterator<Entry<String, JsonNode>> it = jsonNode.fields();

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/1afa2537/conf/routes
----------------------------------------------------------------------
diff --git a/conf/routes b/conf/routes
index 0c7b33e..54ae3dc 100644
--- a/conf/routes
+++ b/conf/routes
@@ -20,11 +20,6 @@ POST        /syncData                                            controllers.Acc
 GET 		/searchAndGenerateWorkflow							 controllers.AccountController.getSearchAndGenerateWorkflow()
 GET 		/generateWorkflowGetData							 controllers.AccountController.getJsonData()
 
-# Authentication
-GET         /login                                               controllers.Application.login()
-POST        /login                                               controllers.Application.authenticate()
-GET         /logout                                              controllers.Application.logout()
-
 # BugReporting
 GET         /bugs                                                controllers.BugReportController.reports()
 GET         /newReport                                           controllers.BugReportController.newReport()


[23/50] [abbrv] incubator-cmda git commit: Fix the url of the services

Posted by xi...@apache.org.
Fix the url of the services

Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/a88e3323
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/a88e3323
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/a88e3323

Branch: refs/heads/master
Commit: a88e33236e10291807c50c753407968751aa5bee
Parents: 7d2aacc
Author: mingqi830 <mq...@andrew.cmu.edu>
Authored: Thu Sep 3 17:00:16 2015 -0700
Committer: mingqi830 <mq...@andrew.cmu.edu>
Committed: Thu Sep 3 17:00:16 2015 -0700

----------------------------------------------------------------------
 .../climate/TwoDVariableZonelMean.scala.html    | 15 ++++++-----
 .../climate/threeDVariableTwoDSlice.scala.html  | 15 ++++++-----
 .../climate/threeDVariableZonalMean.scala.html  | 15 ++++++-----
 app/views/climate/twoDVariableMap.scala.html    | 12 +++++----
 .../climate/twoDVariableTimeSeries.scala.html   | 26 +++++++++++---------
 5 files changed, 48 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a88e3323/app/views/climate/TwoDVariableZonelMean.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/TwoDVariableZonelMean.scala.html b/app/views/climate/TwoDVariableZonelMean.scala.html
index 7fc50b0..74bb104 100644
--- a/app/views/climate/TwoDVariableZonelMean.scala.html
+++ b/app/views/climate/TwoDVariableZonelMean.scala.html
@@ -6,10 +6,13 @@
 <script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
 <script type="text/javascript"
 	src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
-<script type="text/javascript" src="https:
-	<script type="
-	text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
-<script type="text/javascript" src="@routes.Assets.at("javascripts/xmisc.js")"></script>
+<script type="text/javascript"
+	src="https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js"></script>
+<script type="
+	text/javascript"
+	src='@routes.Assets.at("javascripts/json2.js")'></script>
+<script
+	type='text/javascript" src="@routes.Assets.at("javascripts/xmisc.js")'></script>
 <script type="text/javascript">
     var Response = null;
     var variable = "";
@@ -666,7 +669,7 @@
         $("#Response").html("Calculating ...");
         $("#data_url").html("Calculating ...");
         $("#Image").html("");
-        var url = "http:
+        var url = "http://" + window.location.hostname + ":9002/svc/twoDimZonalMean?";
         var d1 = $("#data").val();
         var model1 = d1.replace("/", "_");
         var arglist = "";
@@ -740,7 +743,7 @@
         arglist = arglist.concat("&purpose=");
         arglist = arglist.concat(purpose);
         url = url + encodeURI(arglist);
-        var urlTimeBounds = "http:
+        var urlTimeBounds = "http://" + window.location.hostname + ":9002/svc/time_bounds?";
         var arglistTB = "";
         arglistTB = arglistTB.concat("serviceType=");
         arglistTB = arglistTB.concat("1");

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a88e3323/app/views/climate/threeDVariableTwoDSlice.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/threeDVariableTwoDSlice.scala.html b/app/views/climate/threeDVariableTwoDSlice.scala.html
index 24273f2..9fbcbc1 100644
--- a/app/views/climate/threeDVariableTwoDSlice.scala.html
+++ b/app/views/climate/threeDVariableTwoDSlice.scala.html
@@ -6,10 +6,13 @@
 <script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
 <script type="text/javascript"
 	src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
-<script type="text/javascript" src="https:
-	<script type="
-	text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
-<script type="text/javascript" src="@routes.Assets.at("javascripts/xmisc.js")"></script>
+<script type="text/javascript"
+	src="https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js"></script>
+<script type="
+	text/javascript"
+	src='@routes.Assets.at("javascripts/json2.js")'></script>
+<script type="text/javascript"
+	src='@routes.Assets.at("javascripts/xmisc.js")'></script>
 <script type="text/javascript">
 	 var Response = null;
     var variable = "";
@@ -340,7 +343,7 @@
         $("#Response").html("Calculating ...");
         $("#data_url").html("Calculating ...");
         $("#Image").html("");
-        var url = "http:
+        var url = "http://" + window.location.hostname + ":9002/svc/twoDimSlice3D?";
         var d1 = $("#data").val();
         var model1 = d1.replace("/", "_");
         var arglist = "";
@@ -427,7 +430,7 @@
         arglist = arglist.concat("&purpose=");
         arglist = arglist.concat(purpose);
         url = url + encodeURI(arglist);
-        var urlTimeBounds = "http:
+        var urlTimeBounds = "http://" + window.location.hostname + ":9002/svc/time_bounds?";
         var arglistTB = "";
         arglistTB = arglistTB.concat("serviceType=");
         arglistTB = arglistTB.concat("1");

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a88e3323/app/views/climate/threeDVariableZonalMean.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/threeDVariableZonalMean.scala.html b/app/views/climate/threeDVariableZonalMean.scala.html
index 1ecc918..c336e97 100644
--- a/app/views/climate/threeDVariableZonalMean.scala.html
+++ b/app/views/climate/threeDVariableZonalMean.scala.html
@@ -6,10 +6,13 @@
 <script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
 <script type="text/javascript"
 	src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
-<script type="text/javascript" src="https:
-	<script type="
-	text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
-<script type="text/javascript" src="@routes.Assets.at("javascripts/xmisc.js")"></script>
+<script type="text/javascript"
+	src="https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js"></script>
+<script type="
+	text/javascript"
+	src='@routes.Assets.at("javascripts/json2.js")'></script>
+<script type="text/javascript"
+	src='@routes.Assets.at("javascripts/xmisc.js")'></script>
 <script type="text/javascript">
 	var Response = null;
     var variable = "";
@@ -347,7 +350,7 @@
         $("#Response").html("Calculating ...");
         $("#data_url").html("Calculating ...");
         $("#Image").html("");
-        var url = "http:
+        var url = "http://" + window.location.hostname + ":9002/svc/threeDimZonalMean?";
         var d1 = $("#data").val();
         var model1 = d1.replace("/", "_");
         var arglist = "";
@@ -453,7 +456,7 @@
         arglist = arglist.concat("&purpose=");
         arglist = arglist.concat(purpose);
         url = url + encodeURI(arglist);
-        var urlTimeBounds = "http:
+        var urlTimeBounds = "http://" + window.location.hostname + ":9002/svc/time_bounds?";
         var arglistTB = "";
         arglistTB = arglistTB.concat("serviceType=");
         arglistTB = arglistTB.concat("1");

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a88e3323/app/views/climate/twoDVariableMap.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/twoDVariableMap.scala.html b/app/views/climate/twoDVariableMap.scala.html
index eeaab63..9c6a5df 100644
--- a/app/views/climate/twoDVariableMap.scala.html
+++ b/app/views/climate/twoDVariableMap.scala.html
@@ -6,9 +6,11 @@
 <script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
 <script type="text/javascript"
 	src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
-<script type="text/javascript" src="https:
-	<script type="
-	text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
+<script type="text/javascript"
+	src="https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js"></script>
+<script type="
+	text/javascript"
+	src='@routes.Assets.at("javascripts/json2.js")'></script>
 <script type="text/javascript"
 	src='@routes.Assets.at("javascripts/xmisc.js")'></script>
 <script type="text/javascript">
@@ -685,7 +687,7 @@
         $("#Response").html("Calculating ...");
         $("#data_url").html("Calculating ...");
         $("#Image").html("");
-        var url = "http:
+        var url = "http://" + window.location.hostname + ":9002/svc/twoDimMap?";
         var d1 = $("#data").val();
         var model1 = d1.replace("/", "_");
         var arglist = "";
@@ -765,7 +767,7 @@
         arglist = arglist.concat("&purpose=");
         arglist = arglist.concat(purpose);
         url = url + encodeURI(arglist);
-        var urlTimeBounds = "http:
+        var urlTimeBounds = "http://" + window.location.hostname + ":9002/svc/time_bounds?";
         var arglistTB = "";
         arglistTB = arglistTB.concat("serviceType=");
         arglistTB = arglistTB.concat("1");

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a88e3323/app/views/climate/twoDVariableTimeSeries.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/twoDVariableTimeSeries.scala.html b/app/views/climate/twoDVariableTimeSeries.scala.html
index ecb205c..2e2ee6d 100644
--- a/app/views/climate/twoDVariableTimeSeries.scala.html
+++ b/app/views/climate/twoDVariableTimeSeries.scala.html
@@ -6,10 +6,13 @@
 <script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
 <script type="text/javascript"
 	src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
-<script type="text/javascript" src="https:
-	<script type="
-	text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
-<script type="text/javascript" src="@routes.Assets.at("javascripts/xmisc.js")"></script>
+<script type="text/javascript"
+	src="https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js"></script>
+<script type="
+	text/javascript"
+	src='@routes.Assets.at("javascripts/json2.js")'></script>
+<script type="text/javascript"
+	src='@routes.Assets.at("javascripts/xmisc.js")'></script>
 <script type="text/javascript">
 	var Response = null;
     var variable = "";
@@ -536,7 +539,7 @@
         $("#Response").html("Calculating ...");
         $("#data_url").html("Calculating ...");
         $("#Image").html("");
-        var url = "http:
+        var url = "http://" + window.location.hostname + ":9002/svc/timeSeries2D?";
         var d1 = $("#data").val();
         var model1 = d1.replace("/", "_");
         var arglist = "";
@@ -575,7 +578,7 @@
         arglist = arglist.concat("&purpose=");
         arglist = arglist.concat(purpose);
         url = url + encodeURI(arglist);
-        var urlTimeBounds = "http:
+        var urlTimeBounds = "http://" + window.location.hostname + ":9002/svc/time_bounds?";
         var arglistTB = "";
         arglistTB = arglistTB.concat("serviceType=");
         arglistTB = arglistTB.concat("1");
@@ -686,12 +689,11 @@
 	<tr>
 		<td colspan="4">
 			<center>
-				<b>Service: 2-D Variable Time Series</b><br>
-				<br> This service generates a graph of a 2-dimensional
-				variable's time series with monthly averaged values. <br>
-				Select a data source (model or observation), a variable name, a time
-				range, and a spatial range below.<br>
-				<br>
+				<b>Service: 2-D Variable Time Series</b><br> <br> This
+				service generates a graph of a 2-dimensional variable's time series
+				with monthly averaged values. <br> Select a data source (model
+				or observation), a variable name, a time range, and a spatial range
+				below.<br> <br>
 			</center>
 		</td>
 	</tr>


[28/50] [abbrv] incubator-cmda git commit: Change the home link

Posted by xi...@apache.org.
Change the home link

Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/b87c13a8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/b87c13a8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/b87c13a8

Branch: refs/heads/master
Commit: b87c13a81014d1447d30cfb3b00e24b3a177d8dd
Parents: c64222a
Author: mingqi830 <mq...@andrew.cmu.edu>
Authored: Thu Sep 3 17:17:50 2015 -0700
Committer: mingqi830 <mq...@andrew.cmu.edu>
Committed: Thu Sep 3 17:17:50 2015 -0700

----------------------------------------------------------------------
 conf/routes           | 38 +++++++++++++++++++-------------------
 public/keywords.json  |  1 -
 public/keywords1.json |  1 -
 3 files changed, 19 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/b87c13a8/conf/routes
----------------------------------------------------------------------
diff --git a/conf/routes b/conf/routes
index 54ae3dc..e7fd9d4 100644
--- a/conf/routes
+++ b/conf/routes
@@ -3,7 +3,7 @@
 # ~~~~
 
 # Home page
-GET         /home                                                controllers.Application.index()
+GET         /home                                                controllers.ClimateServiceController.home(email ?= null, vfile ?= null, dataset ?= null)
 GET 		/													 controllers.ClimateServiceController.home(email ?= null, vfile ?= null, dataset ?= null)
 # Account
 
@@ -32,25 +32,25 @@ GET         /aboutus                                             controllers.Abo
 GET         /aboutProject                                        controllers.AboutusController.aboutProject()
 
 # Climate Model
-GET		/climate			controllers.ClimateServiceController.home(email ?= null, vfile ?= null, dataset ?= null)
-GET		/climate/tutorial		controllers.ClimateServiceController.tutorial()
-GET		/climate/climateServices	controllers.ClimateServiceController.climateServices()
-GET		/climate/mostRecentlyAddedClimateServices	controllers.ClimateServiceController.mostRecentlyAddedClimateServices()
-GET		/climate/mostRecentlyUsedClimateServices	controllers.ClimateServiceController.mostRecentlyUsedClimateServices()
-GET		/climate/mostPopularClimateServices	controllers.ClimateServiceController.mostPopularClimateServices()
-POST    /climate/new/climateServices    controllers.ClimateServiceController.newClimateService()
-POST    /climate/delete/climateServices   controllers.ClimateServiceController.deleteClimateService()
-POST	/climate/download/climateServices	 controllers.ClimateServiceController.downloadClimateService()
-POST	/climate/edit/climateServices		controllers.ClimateServiceController.editClimateService()
-GET		/climate/new/climateServices		controllers.ClimateServiceController.addClimateServices()
-GET		/serviceLog/conf		controllers.ClimateServiceController.getConfigurationByConfId()
-POST    /climate/delete/serviceLog   controllers.ClimateServiceController.deleteServiceLog()
-GET		/climate/oneService		controllers.ClimateServiceController.oneService(url ?= null)
+GET			/climate											controllers.ClimateServiceController.home(email ?= null, vfile ?= null, dataset ?= null)
+GET			/climate/tutorial									controllers.ClimateServiceController.tutorial()
+GET			/climate/climateServices							controllers.ClimateServiceController.climateServices()
+GET			/climate/mostRecentlyAddedClimateServices			controllers.ClimateServiceController.mostRecentlyAddedClimateServices()
+GET			/climate/mostRecentlyUsedClimateServices			controllers.ClimateServiceController.mostRecentlyUsedClimateServices()
+GET			/climate/mostPopularClimateServices					controllers.ClimateServiceController.mostPopularClimateServices()
+POST		/climate/new/climateServices    					controllers.ClimateServiceController.newClimateService()
+POST    	/climate/delete/climateServices   					controllers.ClimateServiceController.deleteClimateService()
+POST		/climate/download/climateServices					controllers.ClimateServiceController.downloadClimateService()
+POST		/climate/edit/climateServices						controllers.ClimateServiceController.editClimateService()
+GET			/climate/new/climateServices						controllers.ClimateServiceController.addClimateServices()
+GET			/serviceLog/conf									controllers.ClimateServiceController.getConfigurationByConfId()
+POST    	/climate/delete/serviceLog   						controllers.ClimateServiceController.deleteServiceLog()
+GET			/climate/oneService									controllers.ClimateServiceController.oneService(url ?= null)
 
 #Keyword search
-GET 	    /climate/dataSets						controllers.dataSetController.datasetList()
-GET			/climate/searchDataSet 					 controllers.dataSetController.searchDataset()
-GET 		/climate/getSearchResult				 controllers.dataSetController.getSearchResult()
+GET 		/climate/dataSets									controllers.dataSetController.datasetList()
+GET			/climate/searchDataSet 					 			controllers.dataSetController.searchDataset()
+GET 		/climate/getSearchResult				 			controllers.dataSetController.getSearchResult()
 
 #Map static resources from the /public folder to the /assets URL path
-GET     /assets/*file               				controllers.Assets.at(path="/public", file)
+GET     	/assets/*file               						controllers.Assets.at(path="/public", file)

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/b87c13a8/public/keywords.json
----------------------------------------------------------------------
diff --git a/public/keywords.json b/public/keywords.json
deleted file mode 100644
index b24a192..0000000
--- a/public/keywords.json
+++ /dev/null
@@ -1 +0,0 @@
-{"id":0,"text":"Parameters","children":[{"id":1,"text":"AGRICULTURE","children":[{"id":2,"text":"AGRICULTURAL AQUATIC SCIENCES","children":[{"id":3,"text":"AQUACULTURE","children":[]},{"id":4,"text":"FISHERIES","children":[]}]},{"id":5,"text":"AGRICULTURAL CHEMICALS","children":[{"id":6,"text":"FERTILIZERS","children":[]},{"id":7,"text":"PESTICIDES","children":[]}]},{"id":8,"text":"AGRICULTURAL ENGINEERING","children":[{"id":9,"text":"AGRICULTURAL EQUIPMENT","children":[]},{"id":10,"text":"FARM STRUCTURES","children":[]}]},{"id":11,"text":"AGRICULTURAL PLANT SCIENCE","children":[{"id":12,"text":"CROPPING SYSTEMS","children":[]},{"id":13,"text":"CROP/PLANT YIELDS","children":[]},{"id":14,"text":"IRRIGATION","children":[]},{"id":15,"text":"PLANT BREEDING AND GENETICS","children":[]},{"id":16,"text":"PLANT DISEASES/DISORDERS/PESTS","children":[]},{"id":17,"text":"RECLAMATION/REVEGETATION/RESTORATION","children":[]},{"id":18,"text":"WEEDS, NOXIOUS PLANTS OR INVASIVE PLANTS","children":[
 ]}]},{"id":19,"text":"ANIMAL COMMODITIES","children":[{"id":20,"text":"DAIRY PRODUCTS","children":[]},{"id":21,"text":"LIVESTOCK PRODUCTS","children":[]},{"id":22,"text":"POULTRY PRODUCTS","children":[]}]},{"id":23,"text":"ANIMAL SCIENCE","children":[{"id":24,"text":"ANIMAL BREEDING AND GENETICS","children":[]},{"id":25,"text":"ANIMAL DISEASES/DISORDERS/PESTS","children":[]},{"id":26,"text":"ANIMAL ECOLOGY AND BEHAVIOR","children":[]},{"id":27,"text":"ANIMAL MANAGEMENT SYSTEMS","children":[]},{"id":28,"text":"ANIMAL MANURE AND WASTE","children":[]},{"id":29,"text":"ANIMAL NUTRITION","children":[]},{"id":30,"text":"ANIMAL PHYSIOLOGY AND BIOCHEMISTRY","children":[]},{"id":31,"text":"ANIMAL YIELDS","children":[]},{"id":32,"text":"APICULTURE","children":[]},{"id":33,"text":"SERICULTURE","children":[]}]},{"id":34,"text":"FEED PRODUCTS","children":[{"id":35,"text":"FEED COMPOSITION","children":[]},{"id":36,"text":"FEED CONTAMINATION AND TOXICOLOGY","children":[]},{"id":37,"text":"FEED PRO
 CESSING","children":[]},{"id":38,"text":"FEED STORAGE","children":[]}]},{"id":39,"text":"FOOD SCIENCE","children":[{"id":40,"text":"FOOD ADDITIVES","children":[]},{"id":41,"text":"FOOD CONTAMINATION AND TOXICOLOGY","children":[]},{"id":42,"text":"FOOD PACKAGING","children":[]},{"id":43,"text":"FOOD PROCESSING","children":[]},{"id":44,"text":"FOOD QUALITY","children":[]},{"id":45,"text":"FOOD STORAGE","children":[]}]},{"id":46,"text":"FOREST SCIENCE","children":[{"id":47,"text":"AFFORESTATION/REFORESTATION","children":[]},{"id":48,"text":"DEFOLIANTS","children":[]},{"id":49,"text":"FOREST CONSERVATION","children":[]},{"id":50,"text":"FOREST FIRE SCIENCE","children":[]},{"id":51,"text":"FOREST HARVESTING AND ENGINEERING","children":[]},{"id":52,"text":"FOREST MANAGEMENT","children":[]},{"id":53,"text":"FOREST MENSURATION","children":[]},{"id":54,"text":"FOREST PRODUCTS/COMMODITIES","children":[]},{"id":55,"text":"FOREST PROTECTION","children":[]},{"id":56,"text":"FOREST YIELDS","child
 ren":[]},{"id":57,"text":"REFORESTATION","children":[]}]},{"id":58,"text":"PLANT COMMODITIES","children":[{"id":59,"text":"FIELD CROP PRODUCTS","children":[]},{"id":60,"text":"FRUIT PRODUCTS","children":[]},{"id":61,"text":"HORTICULTURAL PRODUCTS","children":[]},{"id":62,"text":"VEGETABLE PRODUCTS","children":[]}]},{"id":63,"text":"SOILS","children":[{"id":64,"text":"CALCIUM","children":[]},{"id":65,"text":"CARBON","children":[]},{"id":66,"text":"CATION EXCHANGE CAPACITY","children":[]},{"id":67,"text":"DENITRIFICATION RATE","children":[]},{"id":68,"text":"ELECTRICAL CONDUCTIVITY","children":[]},{"id":69,"text":"HEAVY METALS","children":[]},{"id":70,"text":"HYDRAULIC CONDUCTIVITY","children":[]},{"id":71,"text":"MACROFAUNA","children":[]},{"id":72,"text":"MAGNESIUM","children":[]},{"id":73,"text":"MICROFAUNA","children":[]},{"id":74,"text":"MICROFLORA","children":[]},{"id":75,"text":"MICRONUTRIENTS/TRACE ELEMENTS","children":[]},{"id":76,"text":"NITROGEN","children":[]},{"id":77,"te
 xt":"ORGANIC MATTER","children":[]},{"id":78,"text":"PERMAFROST","children":[]},{"id":79,"text":"PHOSPHORUS","children":[]},{"id":80,"text":"POTASSIUM","children":[]},{"id":81,"text":"RECLAMATION/REVEGETATION/RESTORATION","children":[]},{"id":82,"text":"SOIL ABSORPTION","children":[]},{"id":83,"text":"SOIL BULK DENSITY","children":[]},{"id":84,"text":"SOIL CHEMISTRY","children":[]},{"id":85,"text":"SOIL CLASSIFICATION","children":[]},{"id":86,"text":"SOIL COLOR","children":[]},{"id":87,"text":"SOIL COMPACTION","children":[]},{"id":88,"text":"SOIL CONSISTENCE","children":[]},{"id":89,"text":"SOIL DEPTH","children":[]},{"id":90,"text":"SOIL EROSION","children":[]},{"id":91,"text":"SOIL FERTILITY","children":[]},{"id":92,"text":"SOIL GAS/AIR","children":[]},{"id":93,"text":"SOIL HEAT BUDGET","children":[]},{"id":94,"text":"SOIL HORIZONS/PROFILE","children":[]},{"id":95,"text":"SOIL IMPEDANCE","children":[]},{"id":96,"text":"SOIL INFILTRATION","children":[]},{"id":97,"text":"SOIL MECHAN
 ICS","children":[]},{"id":98,"text":"SOIL MOISTURE/WATER CONTENT","children":[]},{"id":99,"text":"SOIL PH","children":[]},{"id":100,"text":"SOIL PLASTICITY","children":[]},{"id":101,"text":"SOIL POROSITY","children":[]},{"id":102,"text":"SOIL PRODUCTIVITY","children":[]},{"id":103,"text":"SOIL RESPIRATION","children":[]},{"id":104,"text":"SOIL ROOTING DEPTH","children":[]},{"id":105,"text":"SOIL SALINITY/SOIL SODICITY","children":[]},{"id":106,"text":"SOIL STRUCTURE","children":[]},{"id":107,"text":"SOIL TEMPERATURE","children":[]},{"id":108,"text":"SOIL TEXTURE","children":[]},{"id":109,"text":"SOIL WATER HOLDING CAPACITY","children":[]},{"id":110,"text":"SULFUR","children":[]},{"id":111,"text":"THERMAL CONDUCTIVITY","children":[]}]}]},{"id":112,"text":"ATMOSPHERE","children":[{"id":113,"text":"AEROSOLS","children":[{"id":114,"text":"AEROSOL BACKSCATTER","children":[]},{"id":115,"text":"AEROSOL EXTINCTION","children":[]},{"id":116,"text":"AEROSOL OPTICAL DEPTH/THICKNESS","children"
 :[{"id":117,"text":"ANGSTROM EXPONENT","children":[]}]},{"id":118,"text":"AEROSOL PARTICLE PROPERTIES","children":[]},{"id":119,"text":"AEROSOL RADIANCE","children":[]},{"id":120,"text":"CARBONACEOUS AEROSOLS","children":[]},{"id":121,"text":"CLOUD CONDENSATION NUCLEI","children":[]},{"id":122,"text":"DUST/ASH/SMOKE","children":[]},{"id":123,"text":"NITRATE PARTICLES","children":[]},{"id":124,"text":"ORGANIC PARTICLES","children":[]},{"id":125,"text":"PARTICULATE MATTER","children":[]},{"id":126,"text":"SULFATE PARTICLES","children":[]}]},{"id":127,"text":"AIR QUALITY","children":[{"id":128,"text":"CARBON MONOXIDE","children":[]},{"id":129,"text":"EMISSIONS","children":[]},{"id":130,"text":"LEAD","children":[]},{"id":131,"text":"NITROGEN OXIDES","children":[]},{"id":132,"text":"PARTICULATES","children":[]},{"id":133,"text":"SMOG","children":[]},{"id":134,"text":"SULFUR OXIDES","children":[]},{"id":135,"text":"TROPOSPHERIC OZONE","children":[]},{"id":136,"text":"TURBIDITY","children"
 :[]},{"id":137,"text":"VISIBILITY","children":[]},{"id":138,"text":"VOLATILE ORGANIC COMPOUNDS","children":[]}]},{"id":139,"text":"ALTITUDE","children":[{"id":140,"text":"BAROMETRIC ALTITUDE","children":[]},{"id":141,"text":"GEOPOTENTIAL HEIGHT","children":[]},{"id":142,"text":"MESOPAUSE","children":[]},{"id":143,"text":"PLANETARY BOUNDARY LAYER HEIGHT","children":[]},{"id":144,"text":"STATION HEIGHT","children":[]},{"id":145,"text":"STRATOPAUSE","children":[]},{"id":146,"text":"TROPOPAUSE","children":[]}]},{"id":147,"text":"ATMOSPHERIC CHEMISTRY","children":[{"id":148,"text":"CARBON AND HYDROCARBON COMPOUNDS","children":[{"id":149,"text":"CARBON DIOXIDE","children":[]},{"id":150,"text":"CARBON MONOXIDE","children":[]},{"id":151,"text":"CHLORINATED HYDROCARBONS","children":[]},{"id":152,"text":"HYDROGEN CYANIDE","children":[]},{"id":153,"text":"HYPOCHLOROUS MONOXIDE","children":[]},{"id":154,"text":"METHANE","children":[]},{"id":155,"text":"METHYL CYANIDE","children":[]},{"id":156,"
 text":"NON-METHANE HYDROCARBONS/VOLATILE ORGANIC COMPOUNDS","children":[]}]},{"id":157,"text":"HALOCARBONS AND HALOGENS","children":[{"id":158,"text":"BROMINE MONOXIDE","children":[]},{"id":159,"text":"CARBON TETRACHLORIDE","children":[]},{"id":160,"text":"CHLORINE DIOXIDE","children":[]},{"id":161,"text":"CHLORINE MONOXIDE","children":[]},{"id":162,"text":"CHLORINE NITRATE","children":[]},{"id":163,"text":"CHLOROFLUOROCARBONS","children":[]},{"id":164,"text":"HALOCARBONS","children":[]},{"id":165,"text":"HALONS","children":[]},{"id":166,"text":"HYDROCHLOROFLUOROCARBONS","children":[]},{"id":167,"text":"HYDROFLUOROCARBONS","children":[]},{"id":168,"text":"HYDROGEN CHLORIDE","children":[]},{"id":169,"text":"HYDROGEN FLUORIDE","children":[]},{"id":170,"text":"HYPOCHLOROUS ACID","children":[]},{"id":171,"text":"METHYL BROMIDE","children":[]},{"id":172,"text":"METHYL CHLORIDE","children":[]}]},{"id":173,"text":"HYDROGEN COMPOUNDS","children":[{"id":174,"text":"HYDROPEROXY","children":[]
 },{"id":175,"text":"HYDROXYL","children":[]},{"id":176,"text":"MOLECULAR HYDROGEN","children":[]}]},{"id":177,"text":"NITROGEN COMPOUNDS","children":[{"id":178,"text":"AMMONIA","children":[]},{"id":179,"text":"CLOUD-SCREENED TOTAL COLUMN NITROGEN DIOXIDE (NO2)","children":[]},{"id":180,"text":"CLOUD-SCREENED TROPOSHERIC COLUMN NO2","children":[]},{"id":181,"text":"DINITROGEN PENTOXIDE","children":[]},{"id":182,"text":"MOLECULAR NITROGEN","children":[]},{"id":183,"text":"NITRIC ACID","children":[]},{"id":184,"text":"NITRIC OXIDE","children":[]},{"id":185,"text":"NITROGEN DIOXIDE","children":[]},{"id":186,"text":"NITROGEN OXIDES","children":[]},{"id":187,"text":"NITROUS OXIDE","children":[]}]},{"id":188,"text":"OXYGEN COMPOUNDS","children":[{"id":189,"text":"MOLECULAR OXYGEN","children":[]},{"id":190,"text":"OZONE","children":[]}]},{"id":191,"text":"PHOTOCHEMISTRY","children":[{"id":192,"text":"PHOTOLYSIS RATES","children":[]}]},{"id":193,"text":"SULFUR COMPOUNDS","children":[{"id":19
 4,"text":"CARBONYL SULFIDE","children":[]},{"id":195,"text":"DIMETHYL SULFIDE","children":[]},{"id":196,"text":"SULFATE","children":[]},{"id":197,"text":"SULFUR DIOXIDE","children":[]},{"id":198,"text":"SULFUR OXIDES","children":[]}]},{"id":199,"text":"TRACE ELEMENTS/TRACE METALS","children":[]},{"id":200,"text":"TRACE GASES/TRACE SPECIES","children":[]}]},{"id":201,"text":"ATMOSPHERIC ELECTRICITY","children":[{"id":202,"text":"ATMOSPHERIC CONDUCTIVITY","children":[]},{"id":203,"text":"ELECTRIC FIELD","children":[]},{"id":204,"text":"LIGHTNING","children":[]},{"id":205,"text":"TOTAL ELECTRON CONTENT","children":[]}]},{"id":206,"text":"ATMOSPHERIC PHENOMENA","children":[{"id":207,"text":"CYCLONES","children":[]},{"id":208,"text":"DROUGHT","children":[]},{"id":209,"text":"FOG","children":[]},{"id":210,"text":"FREEZE","children":[]},{"id":211,"text":"FROST","children":[]},{"id":212,"text":"HURRICANES","children":[]},{"id":213,"text":"LIGHTNING","children":[]},{"id":214,"text":"MONSOONS
 ","children":[]},{"id":215,"text":"STORMS","children":[]},{"id":216,"text":"TORNADOES","children":[]},{"id":217,"text":"TYPHOONS","children":[]}]},{"id":218,"text":"ATMOSPHERIC PRESSURE","children":[{"id":219,"text":"ANTICYCLONES/CYCLONES","children":[]},{"id":220,"text":"ATMOSPHERIC PRESSURE MEASUREMENTS","children":[]},{"id":221,"text":"DIFFERENTIAL PRESSURE","children":[]},{"id":222,"text":"GRAVITY WAVE","children":[]},{"id":223,"text":"HYDROSTATIC PRESSURE","children":[]},{"id":224,"text":"OSCILLATIONS","children":[]},{"id":225,"text":"PLANETARY BOUNDARY LAYER HEIGHT","children":[]},{"id":226,"text":"PLANETARY/ROSSBY WAVES","children":[]},{"id":227,"text":"PRESSURE ANOMALIES","children":[]},{"id":228,"text":"PRESSURE TENDENCY","children":[]},{"id":229,"text":"PRESSURE THICKNESS","children":[]},{"id":230,"text":"SEA LEVEL PRESSURE","children":[]},{"id":231,"text":"STATIC PRESSURE","children":[]},{"id":232,"text":"SURFACE PRESSURE","children":[]},{"id":233,"text":"TOPOGRAPHIC WAVE
 S","children":[]}]},{"id":234,"text":"ATMOSPHERIC RADIATION","children":[{"id":235,"text":"ABSORPTION","children":[]},{"id":236,"text":"AIRGLOW","children":[]},{"id":237,"text":"ALBEDO","children":[]},{"id":238,"text":"ANISOTROPY","children":[]},{"id":239,"text":"ATMOSPHERIC EMITTED RADIATION","children":[]},{"id":240,"text":"ATMOSPHERIC HEATING","children":[]},{"id":241,"text":"EMISSIVITY","children":[]},{"id":242,"text":"HEAT FLUX","children":[]},{"id":243,"text":"INCOMING SOLAR RADIATION","children":[]},{"id":244,"text":"LONGWAVE RADIATION","children":[]},{"id":245,"text":"NET RADIATION","children":[]},{"id":246,"text":"OPTICAL DEPTH/THICKNESS","children":[]},{"id":247,"text":"OUTGOING LONGWAVE RADIATION","children":[]},{"id":248,"text":"RADIATIVE FLUX","children":[]},{"id":249,"text":"RADIATIVE FORCING","children":[]},{"id":250,"text":"REFLECTANCE","children":[]},{"id":251,"text":"SCATTERING","children":[]},{"id":252,"text":"SHORTWAVE RADIATION","children":[]},{"id":253,"text":"
 SOLAR IRRADIANCE","children":[]},{"id":254,"text":"SOLAR RADIATION","children":[]},{"id":255,"text":"SUNSHINE","children":[]},{"id":256,"text":"TRANSMITTANCE","children":[]},{"id":257,"text":"ULTRAVIOLET RADIATION","children":[]}]},{"id":258,"text":"ATMOSPHERIC TEMPERATURE","children":[{"id":259,"text":"AIR TEMPERATURE","children":[]},{"id":260,"text":"ATMOSPHERIC STABILITY","children":[]},{"id":261,"text":"BOUNDARY LAYER TEMPERATURE","children":[]},{"id":262,"text":"DEGREE DAYS","children":[]},{"id":263,"text":"DEICED TEMPERATURE","children":[]},{"id":264,"text":"DEW POINT TEMPERATURE","children":[]},{"id":265,"text":"INVERSION HEIGHT","children":[]},{"id":266,"text":"MAXIMUM/MINIMUM TEMPERATURE","children":[]},{"id":267,"text":"POTENTIAL TEMPERATURE","children":[]},{"id":268,"text":"SKIN TEMPERATURE","children":[]},{"id":269,"text":"STATIC TEMPERATURE","children":[]},{"id":270,"text":"SURFACE AIR TEMPERATURE","children":[]},{"id":271,"text":"TEMPERATURE ANOMALIES","children":[]},{
 "id":272,"text":"TEMPERATURE PROFILES","children":[]},{"id":273,"text":"TEMPERATURE TENDENCY","children":[]},{"id":274,"text":"VIRTUAL TEMPERATURE","children":[]}]},{"id":275,"text":"ATMOSPHERIC WATER VAPOR","children":[{"id":276,"text":"CONDENSATION","children":[]},{"id":277,"text":"DEW POINT TEMPERATURE","children":[]},{"id":278,"text":"EVAPORATION","children":[]},{"id":279,"text":"EVAPOTRANSPIRATION","children":[]},{"id":280,"text":"HUMIDITY","children":[]},{"id":281,"text":"PRECIPITABLE WATER","children":[]},{"id":282,"text":"SUBLIMATION","children":[]},{"id":283,"text":"WATER VAPOR","children":[]},{"id":284,"text":"WATER VAPOR PROFILES","children":[]},{"id":285,"text":"WATER VAPOR TENDENCY","children":[]}]},{"id":286,"text":"ATMOSPHERIC WINDS","children":[{"id":287,"text":"BOUNDARY LAYER WINDS","children":[]},{"id":288,"text":"CONVECTION","children":[]},{"id":289,"text":"CONVERGENCE/DIVERGENCE","children":[]},{"id":290,"text":"FLIGHT LEVEL WINDS","children":[]},{"id":291,"text"
 :"STREAMFUNCTIONS","children":[]},{"id":292,"text":"SURFACE WINDS","children":[{"id":293,"text":"WIND SPEED/WIND DIRECTION","children":[]}]},{"id":294,"text":"TURBULENCE","children":[]},{"id":295,"text":"UPPER LEVEL WINDS","children":[]},{"id":296,"text":"VERTICAL WIND MOTION","children":[]},{"id":297,"text":"VORTICITY","children":[]},{"id":298,"text":"WIND CHILL","children":[]},{"id":299,"text":"WIND PROFILES","children":[]},{"id":300,"text":"WIND SHEAR","children":[]},{"id":301,"text":"WIND STRESS","children":[]},{"id":302,"text":"WIND TENDENCY","children":[]}]},{"id":303,"text":"CLOUDS","children":[{"id":304,"text":"CLOUD DYNAMICS","children":[]},{"id":305,"text":"CLOUD MICROPHYSICS","children":[{"id":306,"text":"CLOUD CONDENSATION NUCLEI","children":[]},{"id":307,"text":"CLOUD DROPLET CONCENTRATION/SIZE","children":[]},{"id":308,"text":"CLOUD LIQUID WATER/ICE","children":[]},{"id":309,"text":"CLOUD MASS FLUX","children":[]},{"id":310,"text":"CLOUD OPTICAL DEPTH/THICKNESS","child
 ren":[]},{"id":311,"text":"CLOUD PRECIPITABLE WATER","children":[]}]},{"id":312,"text":"CLOUD PROPERTIES","children":[{"id":313,"text":"CLOUD ASYMMETRY","children":[]},{"id":314,"text":"CLOUD BASE HEIGHT","children":[]},{"id":315,"text":"CLOUD BASE PRESSURE","children":[]},{"id":316,"text":"CLOUD BASE TEMPERATURE","children":[]},{"id":317,"text":"CLOUD CEILING","children":[]},{"id":318,"text":"CLOUD FREQUENCY","children":[]},{"id":319,"text":"CLOUD HEIGHT","children":[]},{"id":320,"text":"CLOUD MIDLAYER TEMPERATURE","children":[]},{"id":321,"text":"CLOUD TOP HEIGHT","children":[]},{"id":322,"text":"CLOUD TOP PRESSURE","children":[]},{"id":323,"text":"CLOUD TOP TEMPERATURE","children":[]},{"id":324,"text":"CLOUD VERTICAL DISTRIBUTION","children":[]}]},{"id":325,"text":"CLOUD RADIATIVE TRANSFER","children":[{"id":326,"text":"CLOUD EMISSIVITY","children":[]},{"id":327,"text":"CLOUD RADIATIVE FORCING","children":[]},{"id":328,"text":"CLOUD REFLECTANCE","children":[]}]},{"id":329,"text":
 "CLOUD TYPES","children":[]}]},{"id":330,"text":"PRECIPITATION","children":[{"id":331,"text":"ACID RAIN","children":[]},{"id":332,"text":"DROPLET SIZE","children":[]},{"id":333,"text":"FREEZING RAIN","children":[]},{"id":334,"text":"HAIL","children":[]},{"id":335,"text":"HYDROMETEORS","children":[]},{"id":336,"text":"LIQUID WATER EQUIVALENT","children":[]},{"id":337,"text":"PRECIPITATION AMOUNT","children":[]},{"id":338,"text":"PRECIPITATION ANOMALIES","children":[]},{"id":339,"text":"PRECIPITATION RATE","children":[]},{"id":340,"text":"RAIN","children":[]},{"id":341,"text":"SLEET","children":[]},{"id":342,"text":"SNOW","children":[]}]}]},{"id":343,"text":"BIOLOGICAL CLASSIFICATION","children":[{"id":344,"text":"ANIMALS/INVERTEBRATES","children":[{"id":345,"text":"ARROW WORMS","children":[]},{"id":346,"text":"ARTHROPODS","children":[{"id":347,"text":"CHELICERATES","children":[{"id":348,"text":"ARACHNIDS","children":[]}]},{"id":349,"text":"CRUSTACEANS","children":[]},{"id":350,"text"
 :"HEXAPODS","children":[{"id":351,"text":"INSECTS","children":[]}]},{"id":352,"text":"MYRIAPODS","children":[{"id":353,"text":"CENTIPEDES","children":[]},{"id":354,"text":"MILLIPEDES","children":[]}]}]},{"id":355,"text":"BRYOZOANS/MOSS ANIMALS","children":[]},{"id":356,"text":"BURROWS/SPOON WORMS","children":[]},{"id":357,"text":"CNIDARIANS","children":[{"id":358,"text":"ANTHOZOANS/HEXACORALS","children":[{"id":359,"text":"HARD OR STONY CORALS","children":[]},{"id":360,"text":"SEA ANEMONES","children":[]}]},{"id":361,"text":"ANTHOZOANS/OCTOCORALS","children":[{"id":362,"text":"SOFT CORALS","children":[]}]},{"id":363,"text":"JELLYFISHES","children":[]}]},{"id":364,"text":"COMB JELLIES","children":[]},{"id":365,"text":"ECHINODERMS","children":[]},{"id":366,"text":"FLATWORMS/FLUKES/TAPEWORMS","children":[]},{"id":367,"text":"LAMP SHELLS","children":[]},{"id":368,"text":"MOLLUSKS","children":[{"id":369,"text":"BIVALVES","children":[{"id":370,"text":"MUSSELS","children":[]}]}]},{"id":371
 ,"text":"PEANUT WORMS","children":[]},{"id":372,"text":"RIBBON WORMS","children":[]},{"id":373,"text":"ROUNDWORMS","children":[]},{"id":374,"text":"SEGMENTED WORMS (ANNELIDS)","children":[]},{"id":375,"text":"SPONGES","children":[]}]},{"id":376,"text":"ANIMALS/VERTEBRATES","children":[{"id":377,"text":"AMPHIBIANS","children":[{"id":378,"text":"FROGS/TOADS","children":[]},{"id":379,"text":"SALAMANDERS","children":[]}]},{"id":380,"text":"BIRDS","children":[{"id":381,"text":"DUCKS/GEESE/SWANS","children":[]},{"id":382,"text":"EAGLES/FALCONS/HAWKS AND ALLIES","children":[]},{"id":383,"text":"WADERS/GULLS/AUKS AND ALLIES","children":[]}]},{"id":384,"text":"FISH","children":[{"id":385,"text":"RAY-FINNED FISHES","children":[{"id":386,"text":"SALMONS/TROUTS","children":[]},{"id":387,"text":"STURGEONS/PADDLEFISHES","children":[]}]}]},{"id":388,"text":"MAMMALS","children":[{"id":389,"text":"BATS","children":[]},{"id":390,"text":"CARNIVORES","children":[{"id":391,"text":"OTTERS","children":[]}
 ]},{"id":392,"text":"CETACEANS","children":[]}]},{"id":393,"text":"REPTILES","children":[{"id":394,"text":"LIZARDS/SNAKES","children":[]}]}]},{"id":395,"text":"BACTERIA/ARCHAEA","children":[{"id":396,"text":"CYANOBACTERIA (BLUE-GREEN ALGAE)","children":[]}]},{"id":397,"text":"FUNGI","children":[{"id":398,"text":"LICHENS","children":[]},{"id":399,"text":"MUSHROOMS","children":[]},{"id":400,"text":"SLIME MOLDS","children":[]},{"id":401,"text":"YEASTS/TRUFFLES","children":[]}]},{"id":402,"text":"PLANTS","children":[{"id":403,"text":"ANGIOSPERMS (FLOWERING PLANTS)","children":[{"id":404,"text":"DICOTS","children":[]},{"id":405,"text":"MONOCOTS","children":[{"id":406,"text":"SEAGRASS","children":[]}]}]},{"id":407,"text":"FERNS AND ALLIES","children":[{"id":408,"text":"CLUB MOSSES","children":[]},{"id":409,"text":"FERNS","children":[]},{"id":410,"text":"HORSETAILS","children":[]},{"id":411,"text":"WHISK FERNS","children":[]}]},{"id":412,"text":"GYMNOSPERMS","children":[{"id":413,"text":"C
 ONIFERS","children":[]},{"id":414,"text":"CYCADS","children":[]},{"id":415,"text":"GINKGO","children":[]},{"id":416,"text":"GNETOPS","children":[]}]},{"id":417,"text":"MACROALGAE (SEAWEEDS)","children":[{"id":418,"text":"BROWN ALGAE","children":[]},{"id":419,"text":"GREEN ALGAE","children":[]},{"id":420,"text":"RED ALGAE","children":[]}]},{"id":421,"text":"MICROALGAE","children":[{"id":422,"text":"CRYPTOMONADS","children":[]},{"id":423,"text":"DIATOMS","children":[]},{"id":424,"text":"DINOFLAGELLATES","children":[]},{"id":425,"text":"HAPTOPHYTES","children":[{"id":426,"text":"COCCOLITHOPHORES","children":[]}]}]},{"id":427,"text":"MOSSES/HORNWORTS/LIVERWORTS","children":[]}]},{"id":428,"text":"PROTISTS","children":[{"id":429,"text":"AMOEBOIDS","children":[{"id":430,"text":"AMOEBAS","children":[]},{"id":431,"text":"FORAMINIFERS","children":[]},{"id":432,"text":"RADIOLARIANS","children":[]}]},{"id":433,"text":"CILIATES","children":[]},{"id":434,"text":"DIATOMS","children":[]},{"id":435
 ,"text":"FLAGELLATES","children":[{"id":436,"text":"HAPTOPHYTES","children":[{"id":437,"text":"COCCOLITHOPHORES","children":[]}]}]},{"id":438,"text":"SLIME MOLDS","children":[]},{"id":439,"text":"SPOROZOANS","children":[]}]},{"id":440,"text":"VIRUSES","children":[]}]},{"id":441,"text":"BIOSPHERE","children":[{"id":442,"text":"AQUATIC ECOSYSTEMS","children":[{"id":443,"text":"BENTHIC HABITAT","children":[]},{"id":444,"text":"COASTAL HABITAT","children":[]},{"id":445,"text":"DEMERSAL HABITAT","children":[]},{"id":446,"text":"ESTUARINE HABITAT","children":[]},{"id":447,"text":"LAKES","children":[{"id":448,"text":"SALINE LAKES","children":[]}]},{"id":449,"text":"MARINE HABITAT","children":[]},{"id":450,"text":"PELAGIC HABITAT","children":[]},{"id":451,"text":"PLANKTON","children":[{"id":452,"text":"PHYTOPLANKTON","children":[]},{"id":453,"text":"ZOOPLANKTON","children":[]}]},{"id":454,"text":"REEF HABITAT","children":[]},{"id":455,"text":"RIVERS/STREAM HABITAT","children":[]},{"id":456,
 "text":"WETLANDS","children":[{"id":457,"text":"ESTUARINE WETLANDS","children":[]},{"id":458,"text":"LACUSTRINE WETLANDS","children":[]},{"id":459,"text":"MARINE","children":[]},{"id":460,"text":"MARSHES","children":[]},{"id":461,"text":"PALUSTRINE WETLANDS","children":[]},{"id":462,"text":"PEATLANDS","children":[]},{"id":463,"text":"RIPARIAN WETLANDS","children":[]},{"id":464,"text":"SWAMPS","children":[]}]}]},{"id":465,"text":"ECOLOGICAL DYNAMICS","children":[{"id":466,"text":"COMMUNITY DYNAMICS","children":[{"id":467,"text":"BIODIVERSITY FUNCTIONS","children":[]},{"id":468,"text":"COMMUNITY STRUCTURE","children":[]},{"id":469,"text":"GRAZING DYNAMICS / PLANT ECOLOGY","children":[]},{"id":470,"text":"INDICATOR SPECIES","children":[]},{"id":471,"text":"INVASIVE SPECIES","children":[]},{"id":472,"text":"PLANT SUCCESSION","children":[]},{"id":473,"text":"SPECIES DOMINANCE INDICES","children":[]},{"id":474,"text":"SPECIES RECRUITMENT","children":[]}]},{"id":475,"text":"ECOSYSTEM FUNCT
 IONS","children":[{"id":476,"text":"BIOGEOCHEMICAL CYCLES","children":[]},{"id":477,"text":"BIOMASS DYNAMICS","children":[]},{"id":478,"text":"CHEMOSYNTHESIS","children":[]},{"id":479,"text":"CONSUMPTION RATES","children":[]},{"id":480,"text":"DECOMPOSITION","children":[]},{"id":481,"text":"EXCRETION RATES","children":[]},{"id":482,"text":"FOOD-WEB DYNAMICS","children":[]},{"id":483,"text":"NUTRIENT CYCLING","children":[]},{"id":484,"text":"OXYGEN DEMAND","children":[]},{"id":485,"text":"PHOTOSYNTHESIS","children":[]},{"id":486,"text":"PRIMARY PRODUCTION","children":[]},{"id":487,"text":"RESPIRATION RATE","children":[]},{"id":488,"text":"SECONDARY PRODUCTION","children":[]},{"id":489,"text":"TROPHIC DYNAMICS","children":[]}]},{"id":490,"text":"ECOTOXICOLOGY","children":[{"id":491,"text":"BIOAVAILABILITY","children":[]},{"id":492,"text":"SPECIES BIOACCUMULATION","children":[]},{"id":493,"text":"TOXICITY LEVELS","children":[]}]},{"id":494,"text":"FIRE ECOLOGY","children":[{"id":495,"t
 ext":"FIRE DYNAMICS","children":[]},{"id":496,"text":"FIRE OCCURRENCE","children":[]}]},{"id":497,"text":"SPECIES/POPULATION INTERACTIONS","children":[{"id":498,"text":"BIOLUMINESCENCE","children":[]},{"id":499,"text":"DIURNAL MOVEMENTS","children":[]},{"id":500,"text":"ENDANGERED SPECIES","children":[]},{"id":501,"text":"EVOLUTIONARY ADAPTATION","children":[]},{"id":502,"text":"EXOTIC SPECIES","children":[]},{"id":503,"text":"EXTINCTION RATE","children":[]},{"id":504,"text":"GRAZING DYNAMICS/PLANT HERBIVORY","children":[]},{"id":505,"text":"INDIGENOUS/NATIVE SPECIES","children":[]},{"id":506,"text":"MIGRATORY RATES/ROUTES","children":[]},{"id":507,"text":"MUTATION RATES","children":[]},{"id":508,"text":"MUTUALISM","children":[]},{"id":509,"text":"NATURAL SELECTION","children":[]},{"id":510,"text":"PARASITISM","children":[]},{"id":511,"text":"POLLINATOR SPECIES","children":[]},{"id":512,"text":"POPULATION DYNAMICS","children":[]},{"id":513,"text":"POST-BREEDING PERIODS","children":[
 ]},{"id":514,"text":"RANGE CHANGES","children":[]},{"id":515,"text":"SCAVENGING","children":[]},{"id":516,"text":"SPECIES COMPETITION","children":[]},{"id":517,"text":"SPECIES LIFE HISTORY","children":[]},{"id":518,"text":"SPECIES PREDATION","children":[]},{"id":519,"text":"SURVIVAL RATES","children":[]},{"id":520,"text":"SYMBIOSIS","children":[]},{"id":521,"text":"USE/FEEDING HABITATS","children":[]}]}]},{"id":522,"text":"TERRESTRIAL ECOSYSTEMS","children":[{"id":523,"text":"AGRICULTURAL LANDS","children":[]},{"id":524,"text":"ALPINE/TUNDRA","children":[]},{"id":525,"text":"BEACHES","children":[]},{"id":526,"text":"DESERTS","children":[]},{"id":527,"text":"DUNES","children":[]},{"id":528,"text":"FORESTS","children":[]},{"id":529,"text":"GRASSLANDS","children":[]},{"id":530,"text":"ISLANDS","children":[]},{"id":531,"text":"KARST LANDSCAPE","children":[]},{"id":532,"text":"MONTANE HABITATS","children":[]},{"id":533,"text":"SAVANNAS","children":[]},{"id":534,"text":"SHRUBLAND/SCRUB","
 children":[]},{"id":535,"text":"URBAN LANDS","children":[]},{"id":536,"text":"WETLANDS","children":[{"id":537,"text":"ESTUARINE WETLANDS","children":[]},{"id":538,"text":"LACUSTRINE WETLANDS","children":[]},{"id":539,"text":"MARINE","children":[]},{"id":540,"text":"MARSHES","children":[]},{"id":541,"text":"PALUSTRINE WETLANDS","children":[]},{"id":542,"text":"PEATLANDS","children":[]},{"id":543,"text":"RIPARIAN WETLANDS","children":[]},{"id":544,"text":"SWAMPS","children":[]}]}]},{"id":545,"text":"VEGETATION","children":[{"id":546,"text":"AFFORESTATION/REFORESTATION","children":[]},{"id":547,"text":"BIOMASS","children":[]},{"id":548,"text":"CANOPY CHARACTERISTICS","children":[]},{"id":549,"text":"CARBON","children":[]},{"id":550,"text":"CHLOROPHYLL","children":[]},{"id":551,"text":"CROWN","children":[]},{"id":552,"text":"DECIDUOUS VEGETATION","children":[]},{"id":553,"text":"DOMINANT SPECIES","children":[]},{"id":554,"text":"EVERGREEN VEGETATION","children":[]},{"id":555,"text":"EXO
 TIC VEGETATION","children":[]},{"id":556,"text":"FOREST COMPOSITION/VEGETATION STRUCTURE","children":[]},{"id":557,"text":"HERBIVORY","children":[]},{"id":558,"text":"IMPORTANCE VALUE","children":[]},{"id":559,"text":"INDIGENOUS VEGETATION","children":[]},{"id":560,"text":"LEAF CHARACTERISTICS","children":[]},{"id":561,"text":"LITTER CHARACTERISTICS","children":[]},{"id":562,"text":"MACROPHYTES","children":[]},{"id":563,"text":"NITROGEN","children":[]},{"id":564,"text":"NUTRIENTS","children":[]},{"id":565,"text":"PHOSPHORUS","children":[]},{"id":566,"text":"PHOTOSYNTHETICALLY ACTIVE RADIATION","children":[]},{"id":567,"text":"PIGMENTS","children":[]},{"id":568,"text":"PLANT CHARACTERISTICS","children":[{"id":569,"text":"VEGETATION WATER CONTENT","children":[]}]},{"id":570,"text":"PLANT PHENOLOGY","children":[]},{"id":571,"text":"POLLEN","children":[]},{"id":572,"text":"RECLAMATION/REVEGETATION/RESTORATION","children":[]},{"id":573,"text":"REFORESTATION","children":[]},{"id":574,"tex
 t":"TREE RINGS","children":[]},{"id":575,"text":"VEGETATION COVER","children":[]},{"id":576,"text":"VEGETATION INDEX","children":[]},{"id":577,"text":"VEGETATION SPECIES","children":[]}]}]},{"id":578,"text":"CLIMATE INDICATORS","children":[{"id":579,"text":"ATMOSPHERIC/OCEAN INDICATORS","children":[{"id":580,"text":"EXTREME WEATHER","children":[{"id":581,"text":"EXTREME DROUGHT","children":[]}]},{"id":582,"text":"HUMIDITY INDICES","children":[{"id":583,"text":"HUMIDITY INDEX","children":[]}]},{"id":584,"text":"PRECIPITATION INDICATORS","children":[]},{"id":585,"text":"PRECIPITATION INDICES","children":[{"id":586,"text":"ENSO PRECIPITATION INDEX","children":[]},{"id":587,"text":"STANDARDIZED PRECIPITATION INDEX","children":[]}]},{"id":588,"text":"SEA SURFACE TEMPERATURE INDICES","children":[{"id":589,"text":"CARIBBEAN INDEX","children":[]},{"id":590,"text":"CENTRAL TROPICAL PACIFIC SST","children":[]},{"id":591,"text":"EAST CENTRAL TROPICAL PACIFIC SST","children":[]},{"id":592,"text
 ":"EXTREME EASTERN TROPICAL PACIFIC SST","children":[]},{"id":593,"text":"KAPLAN SST INDEX","children":[]},{"id":594,"text":"NINO 3 INDEX","children":[]},{"id":595,"text":"NORTH TROPICAL ATLANTIC INDEX","children":[]},{"id":596,"text":"OCEANIC NINO INDEX","children":[]},{"id":597,"text":"TRANS-NINO INDEX","children":[]},{"id":598,"text":"TROPICAL NORTH ATLANTIC INDEX","children":[]},{"id":599,"text":"TROPICAL SOUTH ATLANTIC INDEX","children":[]},{"id":600,"text":"WESTERN HEMISPHERE WARM POOL","children":[]}]},{"id":601,"text":"TELECONNECTIONS","children":[{"id":602,"text":"ANTARCTIC OSCILLATION","children":[]},{"id":603,"text":"ARCTIC OSCILLATION","children":[]},{"id":604,"text":"BIVARIATE ENSO TIMESERIES INDEX","children":[]},{"id":605,"text":"BLOCKING INDEX","children":[]},{"id":606,"text":"EAST ATLANTIC JET PATTERN","children":[]},{"id":607,"text":"EAST ATLANTIC PATTERN","children":[]},{"id":608,"text":"EASTERN PACIFIC OSCILLATION","children":[]},{"id":609,"text":"EL NINO SOUTHER
 N OSCILLATION (ENSO)","children":[]},{"id":610,"text":"EQUATORIAL PACIFIC MERIDIONAL WIND ANOMALY INDEX","children":[]},{"id":611,"text":"EQUATORIAL PACIFIC ZONAL WIND ANOMALY INDEX","children":[]},{"id":612,"text":"GLOBALLY INTEGRATED ANGULAR MOMENTUM","children":[]},{"id":613,"text":"MADDEN-JULIAN OSCILLATION","children":[]},{"id":614,"text":"NORTH ATLANTIC OSCILLATION","children":[]},{"id":615,"text":"NORTHERN OSCILLATION INDEX","children":[]},{"id":616,"text":"NORTH PACIFIC OSCILLATION","children":[]},{"id":617,"text":"PACIFIC DECADAL OSCILLATION","children":[]},{"id":618,"text":"PACIFIC/NORTH AMERICAN (PNA) PATTERN","children":[]},{"id":619,"text":"QUASI-BIENNIAL OSCILLATION","children":[]},{"id":620,"text":"TROPICAL/NORTHERN HEMISPHERE PATTERN","children":[]},{"id":621,"text":"WEST PACIFIC INDEX","children":[]}]},{"id":622,"text":"TEMPERATURE INDICATORS","children":[]},{"id":623,"text":"TEMPERATURE INDICES","children":[{"id":624,"text":"COMMON SENSE CLIMATE INDEX","children":[
 ]}]}]},{"id":625,"text":"BIOSPHERIC INDICATORS","children":[{"id":626,"text":"INVASIVE SPECIES","children":[]}]},{"id":627,"text":"CRYOSPHERIC INDICATORS","children":[{"id":628,"text":"ICE DEPTH/THICKNESS","children":[]}]},{"id":629,"text":"ENVIRONMENTAL VULNERABILITY INDEX (EVI)","children":[]},{"id":630,"text":"LAND SURFACE/AGRICULTURE INDICATORS","children":[{"id":631,"text":"DROUGHT INDICES","children":[{"id":632,"text":"PALMER DROUGHT CROP MOISTURE INDEX","children":[]},{"id":633,"text":"PALMER DROUGHT SEVERITY INDEX","children":[]}]},{"id":634,"text":"FIRE WEATHER INDEX","children":[]},{"id":635,"text":"FOREST FIRE DANGER INDEX","children":[]},{"id":636,"text":"LENGTH OF GROWING SEASON","children":[]},{"id":637,"text":"SATELLITE SOIL MOISTURE INDEX","children":[]},{"id":638,"text":"SURFACE MOISTURE INDEX","children":[]}]},{"id":639,"text":"PALEOCLIMATE INDICATORS","children":[{"id":640,"text":"LAND RECORDS","children":[]},{"id":641,"text":"PALEOCLIMATE RECONSTRUCTIONS","childr
 en":[{"id":642,"text":"AIR TEMPERATURE RECONSTRUCTION","children":[]},{"id":643,"text":"DROUGHT/PRECIPITATION RECONSTRUCTION","children":[]}]}]},{"id":644,"text":"SUN-EARTH INTERACTIONS","children":[]},{"id":645,"text":"TERRESTRIAL HYDROSPHERE INDICATORS","children":[]}]},{"id":646,"text":"CRYOSPHERE","children":[{"id":647,"text":"FROZEN GROUND","children":[{"id":648,"text":"ACTIVE LAYER","children":[]},{"id":649,"text":"CRYOSOLS","children":[]},{"id":650,"text":"GROUND ICE","children":[]},{"id":651,"text":"PERIGLACIAL PROCESSES","children":[]},{"id":652,"text":"PERMAFROST","children":[]},{"id":653,"text":"ROCK GLACIERS","children":[]},{"id":654,"text":"SEASONALLY FROZEN GROUND","children":[]},{"id":655,"text":"SOIL TEMPERATURE","children":[]},{"id":656,"text":"TALIK","children":[]}]},{"id":657,"text":"GLACIERS/ICE SHEETS","children":[{"id":658,"text":"ABLATION ZONES/ACCUMULATION ZONES","children":[]},{"id":659,"text":"FIRN","children":[]},{"id":660,"text":"GLACIER ELEVATION/ICE SHE
 ET ELEVATION","children":[]},{"id":661,"text":"GLACIER FACIES","children":[]},{"id":662,"text":"GLACIER MASS BALANCE/ICE SHEET MASS BALANCE","children":[]},{"id":663,"text":"GLACIER MOTION/ICE SHEET MOTION","children":[]},{"id":664,"text":"GLACIERS","children":[]},{"id":665,"text":"GLACIER THICKNESS/ICE SHEET THICKNESS","children":[]},{"id":666,"text":"GLACIER TOPOGRAPHY/ICE SHEET TOPOGRAPHY","children":[]},{"id":667,"text":"ICEBERGS","children":[]},{"id":668,"text":"ICE SHEETS","children":[]}]},{"id":669,"text":"SEA ICE","children":[{"id":670,"text":"HEAT FLUX","children":[]},{"id":671,"text":"ICEBERGS","children":[]},{"id":672,"text":"ICE DEFORMATION","children":[]},{"id":673,"text":"ICE DEPTH/THICKNESS","children":[]},{"id":674,"text":"ICE EDGES","children":[]},{"id":675,"text":"ICE EXTENT","children":[]},{"id":676,"text":"ICE FLOES","children":[]},{"id":677,"text":"ICE GROWTH/MELT","children":[]},{"id":678,"text":"ICE ROUGHNESS","children":[]},{"id":679,"text":"ICE TEMPERATURE",
 "children":[]},{"id":680,"text":"ICE TYPES","children":[]},{"id":681,"text":"ISOTOPES","children":[]},{"id":682,"text":"LEADS","children":[]},{"id":683,"text":"PACK ICE","children":[]},{"id":684,"text":"POLYNYAS","children":[]},{"id":685,"text":"REFLECTANCE","children":[]},{"id":686,"text":"SALINITY","children":[]},{"id":687,"text":"SEA ICE AGE","children":[]},{"id":688,"text":"SEA ICE CONCENTRATION","children":[]},{"id":689,"text":"SEA ICE ELEVATION","children":[]},{"id":690,"text":"SEA ICE MOTION","children":[]},{"id":691,"text":"SNOW DEPTH","children":[]},{"id":692,"text":"SNOW MELT","children":[]}]},{"id":693,"text":"SNOW/ICE","children":[{"id":694,"text":"ALBEDO","children":[]},{"id":695,"text":"AVALANCHE","children":[]},{"id":696,"text":"DEPTH HOAR","children":[]},{"id":697,"text":"FREEZE/THAW","children":[]},{"id":698,"text":"FROST","children":[]},{"id":699,"text":"ICE DEPTH/THICKNESS","children":[]},{"id":700,"text":"ICE EXTENT","children":[]},{"id":701,"text":"ICE GROWTH/ME
 LT","children":[]},{"id":702,"text":"ICE MOTION","children":[]},{"id":703,"text":"ICE VELOCITY","children":[]},{"id":704,"text":"LAKE ICE","children":[]},{"id":705,"text":"PERMAFROST","children":[]},{"id":706,"text":"RIVER ICE","children":[]},{"id":707,"text":"SNOW COVER","children":[]},{"id":708,"text":"SNOW DENSITY","children":[]},{"id":709,"text":"SNOW DEPTH","children":[]},{"id":710,"text":"SNOW ENERGY BALANCE","children":[]},{"id":711,"text":"SNOW FACIES","children":[]},{"id":712,"text":"SNOW/ICE CHEMISTRY","children":[]},{"id":713,"text":"SNOW/ICE TEMPERATURE","children":[]},{"id":714,"text":"SNOW MELT","children":[]},{"id":715,"text":"SNOW STRATIGRAPHY","children":[]},{"id":716,"text":"SNOW WATER EQUIVALENT","children":[]},{"id":717,"text":"WHITEOUT","children":[]}]}]},{"id":718,"text":"HUMAN DIMENSIONS","children":[{"id":719,"text":"BOUNDARIES","children":[{"id":720,"text":"ADMINISTRATIVE DIVISIONS","children":[]},{"id":721,"text":"BOUNDARY SURVEYS","children":[]},{"id":722,
 "text":"POLITICAL DIVISIONS","children":[{"id":723,"text":"COUNTRY BOUNDARIES","children":[]},{"id":724,"text":"STATE BOUNDARIES","children":[]}]}]},{"id":725,"text":"ECONOMIC RESOURCES","children":[{"id":726,"text":"AGRICULTURE PRODUCTION","children":[]},{"id":727,"text":"ENERGY PRODUCTION/USE","children":[{"id":728,"text":"BIOMASS ENERGY PRODUCTION/USE","children":[]},{"id":729,"text":"COAL PRODUCTION/USE","children":[]},{"id":730,"text":"GEOTHERMAL ENERGY PRODUCTION/USE","children":[]},{"id":731,"text":"HYDROELECTRIC ENERGY PRODUCTION/USE","children":[]},{"id":732,"text":"HYDROGEN PRODUCTION/USE","children":[]},{"id":733,"text":"METHANE PRODUCTION/USE","children":[]},{"id":734,"text":"NATURAL GAS PRODUCTION/USE","children":[]},{"id":735,"text":"OIL PRODUCTION/USE","children":[]},{"id":736,"text":"SOLAR ENERGY PRODUCTION/USE","children":[]},{"id":737,"text":"WIND ENERGY PRODUCTION/USE","children":[]}]}]},{"id":738,"text":"ENVIRONMENTAL GOVERNANCE/MANAGEMENT","children":[{"id":739,
 "text":"ENVIRONMENTAL ASSESSMENTS","children":[]},{"id":740,"text":"ENVIRONMENTAL REGULATIONS","children":[]},{"id":741,"text":"FIRE MANAGEMENT","children":[]},{"id":742,"text":"LAND MANAGEMENT","children":[{"id":743,"text":"LAND TENURE","children":[]},{"id":744,"text":"LAND USE CLASSES","children":[]},{"id":745,"text":"LAND USE/LAND COVER CLASSIFICATION","children":[]}]},{"id":746,"text":"WATER MANAGEMENT","children":[]}]},{"id":747,"text":"ENVIRONMENTAL IMPACTS","children":[{"id":748,"text":"ACID DEPOSITION","children":[]},{"id":749,"text":"AGRICULTURAL EXPANSION","children":[]},{"id":750,"text":"BIOCHEMICAL RELEASE","children":[]},{"id":751,"text":"BIOMASS BURNING","children":[]},{"id":752,"text":"CHEMICAL SPILLS","children":[]},{"id":753,"text":"CIVIL DISTURBANCE","children":[]},{"id":754,"text":"CONSERVATION","children":[]},{"id":755,"text":"CONTAMINANT LEVELS/SPILLS","children":[]},{"id":756,"text":"FOSSIL FUEL BURNING","children":[]},{"id":757,"text":"GAS EXPLOSIONS/LEAKS","c
 hildren":[]},{"id":758,"text":"GAS FLARING","children":[]},{"id":759,"text":"HEAVY METALS CONCENTRATION","children":[]},{"id":760,"text":"INDUSTRIAL EMISSIONS","children":[]},{"id":761,"text":"MINE DRAINAGE","children":[]},{"id":762,"text":"NUCLEAR RADIATION EXPOSURE","children":[]},{"id":763,"text":"OIL SPILLS","children":[]},{"id":764,"text":"PRESCRIBED BURNS/FIRES","children":[]},{"id":765,"text":"SEWAGE DISPOSAL","children":[]}]},{"id":766,"text":"HABITAT CONVERSION/FRAGMENTATION","children":[{"id":767,"text":"DEFORESTATION","children":[]},{"id":768,"text":"DESERTIFICATION","children":[]},{"id":769,"text":"EUTROPHICATION","children":[]},{"id":770,"text":"IRRIGATION","children":[]},{"id":771,"text":"RECLAMATION/REVEGETATION/RESTORATION","children":[]},{"id":772,"text":"REFORESTATION/REVEGETATION","children":[]},{"id":773,"text":"URBANIZATION/URBAN SPRAWL","children":[]}]},{"id":774,"text":"HUMAN SETTLEMENTS","children":[{"id":775,"text":"COASTAL AREAS","children":[]}]},{"id":776,
 "text":"INFRASTRUCTURE","children":[{"id":777,"text":"BUILDINGS","children":[]},{"id":778,"text":"COMMUNICATIONS","children":[]},{"id":779,"text":"CULTURAL FEATURES","children":[]},{"id":780,"text":"ELECTRICITY","children":[]},{"id":781,"text":"PIPELINES","children":[]},{"id":782,"text":"TRANSPORTATION","children":[]}]},{"id":783,"text":"NATURAL HAZARDS","children":[{"id":784,"text":"BIOLOGICAL HAZARDS","children":[]},{"id":785,"text":"DROUGHTS","children":[]},{"id":786,"text":"EARTHQUAKES","children":[]},{"id":787,"text":"FAMINE","children":[]},{"id":788,"text":"FLOODS","children":[]},{"id":789,"text":"HEAT","children":[]},{"id":790,"text":"LANDSLIDES","children":[]},{"id":791,"text":"LAND SUBSIDENCE","children":[]},{"id":792,"text":"SEVERE STORMS","children":[]},{"id":793,"text":"TORNADOES","children":[]},{"id":794,"text":"TROPICAL CYCLONES","children":[{"id":795,"text":"CYCLONES","children":[]},{"id":796,"text":"HURRICANES","children":[]},{"id":797,"text":"TYPHOONS","children":[]
 }]},{"id":798,"text":"TSUNAMIS","children":[]},{"id":799,"text":"VOLCANIC ERUPTIONS","children":[]},{"id":800,"text":"WILDFIRES","children":[]}]},{"id":801,"text":"POPULATION","children":[{"id":802,"text":"MORTALITY","children":[{"id":803,"text":"MORTALITY RATES","children":[]}]},{"id":804,"text":"POPULATION DENSITY","children":[]},{"id":805,"text":"POPULATION DISTRIBUTION","children":[]},{"id":806,"text":"POPULATION ESTIMATES","children":[]},{"id":807,"text":"POPULATION SIZE","children":[]}]},{"id":808,"text":"PUBLIC HEALTH","children":[{"id":809,"text":"DISEASES/EPIDEMICS","children":[{"id":810,"text":"EPIDEMIOLOGY","children":[]}]},{"id":811,"text":"ENVIRONMENTAL HEALTH FACTORS","children":[]},{"id":812,"text":"MALNUTRITION","children":[]},{"id":813,"text":"RADIATION EXPOSURE","children":[]}]},{"id":814,"text":"SOCIAL BEHAVIOR","children":[{"id":815,"text":"CONSERVATION","children":[]},{"id":816,"text":"CONSUMER BEHAVIOR","children":[]},{"id":817,"text":"HAZARD MITIGATION/PLANNIN
 G","children":[]},{"id":818,"text":"PRESERVATION","children":[]},{"id":819,"text":"RECREATIONAL ACTIVITIES/AREAS","children":[]},{"id":820,"text":"RECYCLING","children":[]},{"id":821,"text":"VULNERABILITY LEVELS/INDEX","children":[]}]},{"id":822,"text":"SOCIOECONOMICS","children":[{"id":823,"text":"INDUSTRIALIZATION","children":[]}]},{"id":824,"text":"SUSTAINABILITY","children":[{"id":825,"text":"ENVIRONMENTAL SUSTAINABILITY","children":[]},{"id":826,"text":"SUSTAINABLE DEVELOPMENT","children":[]}]}]},{"id":827,"text":"LAND SURFACE","children":[{"id":828,"text":"EROSION/SEDIMENTATION","children":[{"id":829,"text":"DEGRADATION","children":[]},{"id":830,"text":"ENTRAINMENT","children":[]},{"id":831,"text":"EROSION","children":[]},{"id":832,"text":"LANDSLIDES","children":[]},{"id":833,"text":"SEDIMENTATION","children":[]},{"id":834,"text":"SEDIMENT CHEMISTRY","children":[]},{"id":835,"text":"SEDIMENT COMPOSITION","children":[]},{"id":836,"text":"SEDIMENTS","children":[]},{"id":837,"tex
 t":"SEDIMENT TRANSPORT","children":[]},{"id":838,"text":"STRATIGRAPHIC SEQUENCE","children":[]},{"id":839,"text":"SUSPENDED SOLIDS","children":[]},{"id":840,"text":"WEATHERING","children":[]}]},{"id":841,"text":"FROZEN GROUND","children":[{"id":842,"text":"ACTIVE LAYER","children":[]},{"id":843,"text":"CRYOSOLS","children":[]},{"id":844,"text":"GROUND ICE","children":[]},{"id":845,"text":"PERIGLACIAL PROCESSES","children":[]},{"id":846,"text":"PERMAFROST","children":[]},{"id":847,"text":"ROCK GLACIERS","children":[]},{"id":848,"text":"SEASONALLY FROZEN GROUND","children":[]},{"id":849,"text":"SOIL TEMPERATURE","children":[]},{"id":850,"text":"TALIK","children":[]}]},{"id":851,"text":"GEOMORPHOLOGY","children":[{"id":852,"text":"COASTAL LANDFORMS/PROCESSES","children":[]},{"id":853,"text":"EOLIAN LANDFORMS/PROCESSES","children":[]},{"id":854,"text":"FLUVIAL LANDFORMS/PROCESSES","children":[]},{"id":855,"text":"GLACIAL LANDFORMS/PROCESSES","children":[]},{"id":856,"text":"KARST LANDFO
 RMS/PROCESSES","children":[]},{"id":857,"text":"TECTONIC LANDFORMS/PROCESSES","children":[]}]},{"id":858,"text":"LANDSCAPE","children":[{"id":859,"text":"LANDSCAPE ECOLOGY","children":[]},{"id":860,"text":"LANDSCAPE MANAGEMENT","children":[]},{"id":861,"text":"LANDSCAPE PATTERNS","children":[]},{"id":862,"text":"LANDSCAPE PROCESSES","children":[]},{"id":863,"text":"RECLAMATION/REVEGETATION/RESTORATION","children":[]},{"id":864,"text":"REFORESTATION","children":[]}]},{"id":865,"text":"LAND TEMPERATURE","children":[{"id":866,"text":"LAND HEAT CAPACITY","children":[]},{"id":867,"text":"LAND SURFACE TEMPERATURE","children":[]},{"id":868,"text":"SKIN TEMPERATURE","children":[]}]},{"id":869,"text":"LAND USE/LAND COVER","children":[{"id":870,"text":"LAND COVER","children":[]},{"id":871,"text":"LAND PRODUCTIVITY","children":[]},{"id":872,"text":"LAND RESOURCES","children":[]},{"id":873,"text":"LAND USE CLASSES","children":[]}]},{"id":874,"text":"SOILS","children":[{"id":875,"text":"CALCIUM"
 ,"children":[]},{"id":876,"text":"CARBON","children":[]},{"id":877,"text":"CATION EXCHANGE CAPACITY","children":[]},{"id":878,"text":"DENITRIFICATION RATE","children":[]},{"id":879,"text":"ELECTRICAL CONDUCTIVITY","children":[]},{"id":880,"text":"HEAVY METALS","children":[]},{"id":881,"text":"HYDRAULIC CONDUCTIVITY","children":[]},{"id":882,"text":"MACROFAUNA","children":[]},{"id":883,"text":"MAGNESIUM","children":[]},{"id":884,"text":"MICROFAUNA","children":[]},{"id":885,"text":"MICROFLORA","children":[]},{"id":886,"text":"MICRONUTRIENTS/TRACE ELEMENTS","children":[]},{"id":887,"text":"NITROGEN","children":[]},{"id":888,"text":"ORGANIC MATTER","children":[]},{"id":889,"text":"PERMAFROST","children":[]},{"id":890,"text":"PHOSPHORUS","children":[]},{"id":891,"text":"POTASSIUM","children":[]},{"id":892,"text":"RECLAMATION/REVEGETATION/RESTORATION","children":[]},{"id":893,"text":"SOIL ABSORPTION","children":[]},{"id":894,"text":"SOIL BULK DENSITY","children":[]},{"id":895,"text":"SOIL
  CHEMISTRY","children":[]},{"id":896,"text":"SOIL CLASSIFICATION","children":[]},{"id":897,"text":"SOIL COLOR","children":[]},{"id":898,"text":"SOIL COMPACTION","children":[]},{"id":899,"text":"SOIL CONSISTENCE","children":[]},{"id":900,"text":"SOIL DEPTH","children":[]},{"id":901,"text":"SOIL EROSION","children":[]},{"id":902,"text":"SOIL FERTILITY","children":[]},{"id":903,"text":"SOIL GAS/AIR","children":[]},{"id":904,"text":"SOIL HEAT BUDGET","children":[]},{"id":905,"text":"SOIL HORIZONS/PROFILE","children":[]},{"id":906,"text":"SOIL IMPEDANCE","children":[]},{"id":907,"text":"SOIL INFILTRATION","children":[]},{"id":908,"text":"SOIL MECHANICS","children":[]},{"id":909,"text":"SOIL MOISTURE/WATER CONTENT","children":[]},{"id":910,"text":"SOIL PH","children":[]},{"id":911,"text":"SOIL PLASTICITY","children":[]},{"id":912,"text":"SOIL POROSITY","children":[]},{"id":913,"text":"SOIL PRODUCTIVITY","children":[]},{"id":914,"text":"SOIL RESPIRATION","children":[]},{"id":915,"text":"SO
 IL ROOTING DEPTH","children":[]},{"id":916,"text":"SOIL SALINITY/SOIL SODICITY","children":[]},{"id":917,"text":"SOIL STRUCTURE","children":[]},{"id":918,"text":"SOIL TEMPERATURE","children":[]},{"id":919,"text":"SOIL TEXTURE","children":[]},{"id":920,"text":"SOIL WATER HOLDING CAPACITY","children":[]},{"id":921,"text":"SULFUR","children":[]},{"id":922,"text":"THERMAL CONDUCTIVITY","children":[]}]},{"id":923,"text":"SURFACE RADIATIVE PROPERTIES","children":[{"id":924,"text":"ALBEDO","children":[]},{"id":925,"text":"ANISOTROPY","children":[]},{"id":926,"text":"EMISSIVITY","children":[]},{"id":927,"text":"REFLECTANCE","children":[]},{"id":928,"text":"THERMAL PROPERTIES","children":[]}]},{"id":929,"text":"TOPOGRAPHY","children":[{"id":930,"text":"CONTOURS","children":[]},{"id":931,"text":"LANDFORMS","children":[]},{"id":932,"text":"SURFACE ROUGHNESS","children":[]},{"id":933,"text":"TERRAIN ELEVATION","children":[]},{"id":934,"text":"TOPOGRAPHICAL RELIEF","children":[]},{"id":935,"text
 ":"TOPOGRAPHIC EFFECTS","children":[]}]}]},{"id":936,"text":"OCEANS","children":[{"id":937,"text":"AQUATIC SCIENCES","children":[{"id":938,"text":"AQUACULTURE","children":[]},{"id":939,"text":"FISHERIES","children":[]}]},{"id":940,"text":"BATHYMETRY/SEAFLOOR TOPOGRAPHY","children":[{"id":941,"text":"ABYSSAL HILLS/PLAINS","children":[]},{"id":942,"text":"BATHYMETRY","children":[]},{"id":943,"text":"CONTINENTAL MARGINS","children":[]},{"id":944,"text":"FRACTURE ZONES","children":[]},{"id":945,"text":"OCEAN PLATEAUS/RIDGES","children":[]},{"id":946,"text":"SEAFLOOR TOPOGRAPHY","children":[]},{"id":947,"text":"SEAMOUNTS","children":[]},{"id":948,"text":"SUBMARINE CANYONS","children":[]},{"id":949,"text":"TRENCHES","children":[]},{"id":950,"text":"WATER DEPTH","children":[]}]},{"id":951,"text":"COASTAL PROCESSES","children":[{"id":952,"text":"BARRIER ISLANDS","children":[]},{"id":953,"text":"BEACHES","children":[]},{"id":954,"text":"COASTAL ELEVATION","children":[]},{"id":955,"text":"COR
 AL REEFS","children":[]},{"id":956,"text":"DELTAS","children":[]},{"id":957,"text":"DUNES","children":[]},{"id":958,"text":"EROSION","children":[]},{"id":959,"text":"ESTUARIES","children":[]},{"id":960,"text":"FJORDS","children":[]},{"id":961,"text":"INLETS","children":[]},{"id":962,"text":"INTERTIDAL ZONE","children":[]},{"id":963,"text":"LAGOONS","children":[]},{"id":964,"text":"LOCAL SUBSIDENCE TRENDS","children":[]},{"id":965,"text":"LONGSHORE CURRENTS","children":[]},{"id":966,"text":"MANGROVES","children":[]},{"id":967,"text":"MARSHES","children":[]},{"id":968,"text":"ROCKY COASTS","children":[]},{"id":969,"text":"SALTWATER INTRUSION","children":[]},{"id":970,"text":"SEA LEVEL RISE","children":[]},{"id":971,"text":"SEA SURFACE HEIGHT","children":[]},{"id":972,"text":"SEDIMENTATION","children":[]},{"id":973,"text":"SEDIMENT TRANSPORT","children":[]},{"id":974,"text":"SHOALS","children":[]},{"id":975,"text":"SHORELINE DISPLACEMENT","children":[]},{"id":976,"text":"SHORELINES","c
 hildren":[]},{"id":977,"text":"STORM SURGE","children":[]},{"id":978,"text":"TIDAL HEIGHT","children":[]}]},{"id":979,"text":"MARINE ENVIRONMENT MONITORING","children":[{"id":980,"text":"MARINE OBSTRUCTIONS","children":[]}]},{"id":981,"text":"MARINE GEOPHYSICS","children":[{"id":982,"text":"MAGNETIC ANOMALIES","children":[]},{"id":983,"text":"MARINE GRAVITY FIELD","children":[]},{"id":984,"text":"MARINE MAGNETICS","children":[]},{"id":985,"text":"PLATE TECTONICS","children":[]}]},{"id":986,"text":"MARINE SEDIMENTS","children":[{"id":987,"text":"BIOGENIC SEDIMENTS","children":[]},{"id":988,"text":"BIOTURBATION","children":[]},{"id":989,"text":"DIAGENESIS","children":[]},{"id":990,"text":"GEOTECHNICAL PROPERTIES","children":[]},{"id":991,"text":"HYDROGENOUS SEDIMENTS","children":[]},{"id":992,"text":"PARTICLE FLUX","children":[]},{"id":993,"text":"SEDIMENTARY STRUCTURES","children":[]},{"id":994,"text":"SEDIMENTARY TEXTURES","children":[]},{"id":995,"text":"SEDIMENTATION","children":[
 ]},{"id":996,"text":"SEDIMENT CHEMISTRY","children":[]},{"id":997,"text":"SEDIMENT COMPOSITION","children":[]},{"id":998,"text":"SEDIMENT TRANSPORT","children":[]},{"id":999,"text":"STRATIGRAPHIC SEQUENCE","children":[]},{"id":1000,"text":"SUSPENDED SOLIDS","children":[]},{"id":1001,"text":"TERRIGENOUS SEDIMENTS","children":[]},{"id":1002,"text":"TURBIDITY","children":[]}]},{"id":1003,"text":"MARINE VOLCANISM","children":[{"id":1004,"text":"BENTHIC HEAT FLOW","children":[]},{"id":1005,"text":"HYDROTHERMAL VENTS","children":[]},{"id":1006,"text":"ISLAND ARCS","children":[]},{"id":1007,"text":"MID-OCEAN RIDGES","children":[]},{"id":1008,"text":"RIFT VALLEYS","children":[]}]},{"id":1009,"text":"OCEAN ACOUSTICS","children":[{"id":1010,"text":"ACOUSTIC ATTENUATION/TRANSMISSION","children":[]},{"id":1011,"text":"ACOUSTIC FREQUENCY","children":[]},{"id":1012,"text":"ACOUSTIC REFLECTIVITY","children":[]},{"id":1013,"text":"ACOUSTIC SCATTERING","children":[]},{"id":1014,"text":"ACOUSTIC TOMO
 GRAPHY","children":[]},{"id":1015,"text":"ACOUSTIC VELOCITY","children":[]},{"id":1016,"text":"AMBIENT NOISE","children":[]}]},{"id":1017,"text":"OCEAN CHEMISTRY","children":[{"id":1018,"text":"ALKALINITY","children":[]},{"id":1019,"text":"AMMONIA","children":[]},{"id":1020,"text":"BIOGEOCHEMICAL CYCLES","children":[]},{"id":1021,"text":"BIOMEDICAL CHEMICALS","children":[]},{"id":1022,"text":"CARBON","children":[]},{"id":1023,"text":"CARBONATE","children":[]},{"id":1024,"text":"CARBON DIOXIDE","children":[]},{"id":1025,"text":"CHLOROPHYLL","children":[]},{"id":1026,"text":"DISSOLVED GASES","children":[]},{"id":1027,"text":"DISSOLVED SOLIDS","children":[]},{"id":1028,"text":"HYDROCARBONS","children":[]},{"id":1029,"text":"INORGANIC CARBON","children":[]},{"id":1030,"text":"INORGANIC MATTER","children":[]},{"id":1031,"text":"MARINE GEOCHEMISTRY","children":[]},{"id":1032,"text":"NITRATE","children":[]},{"id":1033,"text":"NITRIC ACID","children":[]},{"id":1034,"text":"NITRITE","childre
 n":[]},{"id":1035,"text":"NITROGEN","children":[]},{"id":1036,"text":"NITROGEN DIOXIDE","children":[]},{"id":1037,"text":"NITROUS OXIDE","children":[]},{"id":1038,"text":"NUTRIENTS","children":[]},{"id":1039,"text":"OCEAN TRACERS","children":[]},{"id":1040,"text":"ORGANIC CARBON","children":[]},{"id":1041,"text":"ORGANIC MATTER","children":[]},{"id":1042,"text":"OXYGEN","children":[]},{"id":1043,"text":"PH","children":[]},{"id":1044,"text":"PHOSPHATE","children":[]},{"id":1045,"text":"PIGMENTS","children":[{"id":1046,"text":"CHLOROPHYLL","children":[]}]},{"id":1047,"text":"RADIOCARBON","children":[]},{"id":1048,"text":"RADIONUCLIDES","children":[]},{"id":1049,"text":"SILICATE","children":[]},{"id":1050,"text":"STABLE ISOTOPES","children":[]},{"id":1051,"text":"SUSPENDED SOLIDS","children":[]},{"id":1052,"text":"TRACE ELEMENTS","children":[]}]},{"id":1053,"text":"OCEAN CIRCULATION","children":[{"id":1054,"text":"ADVECTION","children":[]},{"id":1055,"text":"BUOY POSITION","children":[
 ]},{"id":1056,"text":"CONVECTION","children":[]},{"id":1057,"text":"DIFFUSION","children":[]},{"id":1058,"text":"EDDIES","children":[]},{"id":1059,"text":"FRESH WATER FLUX","children":[]},{"id":1060,"text":"FRONTS","children":[]},{"id":1061,"text":"GYRES","children":[]},{"id":1062,"text":"OCEAN CURRENTS","children":[]},{"id":1063,"text":"OCEAN MIXED LAYER","children":[]},{"id":1064,"text":"THERMOHALINE CIRCULATION","children":[]},{"id":1065,"text":"TURBULENCE","children":[]},{"id":1066,"text":"UPWELLING/DOWNWELLING","children":[]},{"id":1067,"text":"VORTICITY","children":[]},{"id":1068,"text":"WATER MASSES","children":[]},{"id":1069,"text":"WIND-DRIVEN CIRCULATION","children":[]}]},{"id":1070,"text":"OCEAN HEAT BUDGET","children":[{"id":1071,"text":"ADVECTION","children":[]},{"id":1072,"text":"BOWEN RATIO","children":[]},{"id":1073,"text":"CONDENSATION","children":[]},{"id":1074,"text":"CONDUCTION","children":[]},{"id":1075,"text":"CONVECTION","children":[]},{"id":1076,"text":"DIFFU
 SION","children":[]},{"id":1077,"text":"EVAPORATION","children":[]},{"id":1078,"text":"HEAT FLUX","children":[]},{"id":1079,"text":"HEATING RATE","children":[]},{"id":1080,"text":"LONGWAVE RADIATION","children":[]},{"id":1081,"text":"REFLECTANCE","children":[]},{"id":1082,"text":"SHORTWAVE RADIATION","children":[]}]},{"id":1083,"text":"OCEAN OPTICS","children":[{"id":1084,"text":"ABSORPTION","children":[]},{"id":1085,"text":"APHOTIC/PHOTIC ZONE","children":[]},{"id":1086,"text":"ATTENUATION/TRANSMISSION","children":[]},{"id":1087,"text":"BIOLUMINESCENCE","children":[]},{"id":1088,"text":"EXTINCTION COEFFICIENTS","children":[]},{"id":1089,"text":"FLUORESCENCE","children":[]},{"id":1090,"text":"GELBSTOFF","children":[]},{"id":1091,"text":"IRRADIANCE","children":[]},{"id":1092,"text":"OCEAN COLOR","children":[]},{"id":1093,"text":"OPTICAL DEPTH","children":[]},{"id":1094,"text":"PHOTOSYNTHETICALLY ACTIVE RADIATION","children":[]},{"id":1095,"text":"RADIANCE","children":[]},{"id":1096,"
 text":"REFLECTANCE","children":[]},{"id":1097,"text":"SCATTERING","children":[]},{"id":1098,"text":"SECCHI DEPTH","children":[]},{"id":1099,"text":"TURBIDITY","children":[]},{"id":1100,"text":"WATER-LEAVING RADIANCE","children":[]}]},{"id":1101,"text":"OCEAN PRESSURE","children":[{"id":1102,"text":"SEA LEVEL PRESSURE","children":[]},{"id":1103,"text":"WATER PRESSURE","children":[]}]},{"id":1104,"text":"OCEAN TEMPERATURE","children":[{"id":1105,"text":"OCEAN MIXED LAYER","children":[]},{"id":1106,"text":"POTENTIAL TEMPERATURE","children":[]},{"id":1107,"text":"SEA SURFACE TEMPERATURE","children":[]},{"id":1108,"text":"THERMOCLINE","children":[]},{"id":1109,"text":"WATER TEMPERATURE","children":[]}]},{"id":1110,"text":"OCEAN WAVES","children":[{"id":1111,"text":"GRAVITY WAVES","children":[]},{"id":1112,"text":"ROSSBY/PLANETARY WAVES","children":[]},{"id":1113,"text":"SEA STATE","children":[]},{"id":1114,"text":"SEICHES","children":[]},{"id":1115,"text":"SIGNIFICANT WAVE HEIGHT","child
 ren":[]},{"id":1116,"text":"STORM SURGE","children":[]},{"id":1117,"text":"SURF BEAT","children":[]},{"id":1118,"text":"SWELLS","children":[]},{"id":1119,"text":"TOPOGRAPHIC WAVES","children":[]},{"id":1120,"text":"TSUNAMIS","children":[]},{"id":1121,"text":"WAVE FETCH","children":[]},{"id":1122,"text":"WAVE FREQUENCY","children":[]},{"id":1123,"text":"WAVE HEIGHT","children":[]},{"id":1124,"text":"WAVE LENGTH","children":[]},{"id":1125,"text":"WAVE PERIOD","children":[]},{"id":1126,"text":"WAVE SPECTRA","children":[]},{"id":1127,"text":"WAVE SPEED/DIRECTION","children":[]},{"id":1128,"text":"WAVE TYPES","children":[]},{"id":1129,"text":"WIND WAVES","children":[]}]},{"id":1130,"text":"OCEAN WINDS","children":[{"id":1131,"text":"CONVERGENCE/DIVERGENCE","children":[]},{"id":1132,"text":"SURFACE WINDS","children":[]},{"id":1133,"text":"TURBULENCE","children":[]},{"id":1134,"text":"VERTICAL WIND MOTION","children":[]},{"id":1135,"text":"VORTICITY","children":[]},{"id":1136,"text":"WIND 
 CHILL","children":[]},{"id":1137,"text":"WIND SHEAR","children":[]},{"id":1138,"text":"WIND STRESS","children":[]}]},{"id":1139,"text":"SALINITY/DENSITY","children":[{"id":1140,"text":"CONDUCTIVITY","children":[]},{"id":1141,"text":"DENSITY","children":[]},{"id":1142,"text":"DESALINIZATION","children":[]},{"id":1143,"text":"HALOCLINE","children":[]},{"id":1144,"text":"POTENTIAL DENSITY","children":[]},{"id":1145,"text":"PYCNOCLINE","children":[]},{"id":1146,"text":"SALINITY","children":[]},{"id":1147,"text":"SALT TRANSPORT","children":[]}]},{"id":1148,"text":"SEA ICE","children":[{"id":1149,"text":"HEAT FLUX","children":[]},{"id":1150,"text":"ICEBERGS","children":[]},{"id":1151,"text":"ICE DEFORMATION","children":[]},{"id":1152,"text":"ICE DEPTH/THICKNESS","children":[]},{"id":1153,"text":"ICE EDGES","children":[]},{"id":1154,"text":"ICE EXTENT","children":[]},{"id":1155,"text":"ICE FLOES","children":[]},{"id":1156,"text":"ICE GROWTH/MELT","children":[]},{"id":1157,"text":"ICE ROUGH
 NESS","children":[]},{"id":1158,"text":"ICE TEMPERATURE","children":[]},{"id":1159,"text":"ICE TYPES","children":[]},{"id":1160,"text":"ISOTOPES","children":[]},{"id":1161,"text":"LEADS","children":[]},{"id":1162,"text":"PACK ICE","children":[]},{"id":1163,"text":"POLYNYAS","children":[]},{"id":1164,"text":"REFLECTANCE","children":[]},{"id":1165,"text":"SALINITY","children":[]},{"id":1166,"text":"SEA ICE AGE","children":[]},{"id":1167,"text":"SEA ICE CONCENTRATION","children":[]},{"id":1168,"text":"SEA ICE ELEVATION","children":[]},{"id":1169,"text":"SEA ICE MOTION","children":[]},{"id":1170,"text":"SNOW DEPTH","children":[]},{"id":1171,"text":"SNOW MELT","children":[]}]},{"id":1172,"text":"SEA SURFACE TOPOGRAPHY","children":[{"id":1173,"text":"SEA SURFACE HEIGHT","children":[]},{"id":1174,"text":"SEA SURFACE SLOPE","children":[]}]},{"id":1175,"text":"TIDES","children":[{"id":1176,"text":"STORM SURGE","children":[]},{"id":1177,"text":"TIDAL COMPONENTS","children":[]},{"id":1178,"tex
 t":"TIDAL CURRENTS","children":[]},{"id":1179,"text":"TIDAL HEIGHT","children":[]},{"id":1180,"text":"TIDAL RANGE","children":[]}]},{"id":1181,"text":"WATER QUALITY","children":[{"id":1182,"text":"OCEAN CONTAMINANTS","children":[]}]}]},{"id":1183,"text":"PALEOCLIMATE","children":[{"id":1184,"text":"ICE CORE RECORDS","children":[{"id":1185,"text":"CARBON DIOXIDE","children":[]},{"id":1186,"text":"ELECTRICAL PROPERTIES","children":[]},{"id":1187,"text":"ICE CORE AIR BUBBLES","children":[]},{"id":1188,"text":"IONS","children":[]},{"id":1189,"text":"ISOTOPES","children":[]},{"id":1190,"text":"METHANE","children":[]},{"id":1191,"text":"NITROUS OXIDE","children":[]},{"id":1192,"text":"PARTICULATE MATTER","children":[]},{"id":1193,"text":"VOLCANIC DEPOSITS","children":[]}]},{"id":1194,"text":"LAND RECORDS","children":[{"id":1195,"text":"BOREHOLES","children":[]},{"id":1196,"text":"CAVE DEPOSITS","children":[]},{"id":1197,"text":"GLACIATION","children":[]},{"id":1198,"text":"ISOTOPES","chil
 dren":[]},{"id":1199,"text":"LOESS","children":[]},{"id":1200,"text":"MACROFOSSILS","children":[]},{"id":1201,"text":"MICROFOSSILS","children":[]},{"id":1202,"text":"PALEOMAGNETIC DATA","children":[]},{"id":1203,"text":"PALEOSOLS","children":[]},{"id":1204,"text":"PALEOVEGETATION","children":[]},{"id":1205,"text":"POLLEN","children":[]},{"id":1206,"text":"RADIOCARBON","children":[]},{"id":1207,"text":"SEDIMENTS","children":[]},{"id":1208,"text":"STRATIGRAPHIC SEQUENCE","children":[]},{"id":1209,"text":"TREE RINGS","children":[]},{"id":1210,"text":"VOLCANIC DEPOSITS","children":[]}]},{"id":1211,"text":"OCEAN/LAKE RECORDS","children":[{"id":1212,"text":"BOREHOLES","children":[]},{"id":1213,"text":"CORAL DEPOSITS","children":[]},{"id":1214,"text":"ISOTOPES","children":[]},{"id":1215,"text":"LAKE LEVELS","children":[]},{"id":1216,"text":"MACROFOSSILS","children":[]},{"id":1217,"text":"MICROFOSSILS","children":[]},{"id":1218,"text":"OXYGEN ISOTOPES","children":[]},{"id":1219,"text":"PALE
 OMAGNETIC DATA","children":[]},{"id":1220,"text":"POLLEN","children":[]},{"id":1221,"text":"RADIOCARBON","children":[]},{"id":1222,"text":"SEDIMENTS","children":[]},{"id":1223,"text":"STRATIGRAPHIC SEQUENCE","children":[]},{"id":1224,"text":"VARVE DEPOSITS","children":[]}]},{"id":1225,"text":"PALEOCLIMATE RECONSTRUCTIONS","children":[{"id":1226,"text":"AIR TEMPERATURE RECONSTRUCTION","children":[]},{"id":1227,"text":"GROUND WATER RECONSTRUCTION","children":[]},{"id":1228,"text":"SEA LEVEL RECONSTRUCTION","children":[]},{"id":1229,"text":"VEGETATION RECONSTRUCTION","children":[]}]}]},{"id":1230,"text":"SOLID EARTH","children":[{"id":1231,"text":"EARTH GASES/LIQUIDS","children":[{"id":1232,"text":"NATURAL GAS","children":[]},{"id":1233,"text":"PETROLEUM","children":[{"id":1234,"text":"MICROFOSSIL","children":[]}]},{"id":1235,"text":"RECLAMATION/REVEGETATION/RESTORATION","children":[]}]},{"id":1236,"text":"GEOCHEMISTRY","children":[{"id":1237,"text":"BIOGEOCHEMICAL PROCESSES","children
 ":[]},{"id":1238,"text":"GEOCHEMICAL PROCESSES","children":[{"id":1239,"text":"CHEMICAL FIXATION","children":[]},{"id":1240,"text":"CHEMICAL WEATHERING","children":[]},{"id":1241,"text":"HYDRATION","children":[]},{"id":1242,"text":"ION EXCHANGE","children":[]},{"id":1243,"text":"OXIDATION/REDUCTION","children":[]}]},{"id":1244,"text":"GEOCHEMICAL PROPERTIES","children":[{"id":1245,"text":"ISOTOPES","children":[]}]},{"id":1246,"text":"MARINE GEOCHEMICAL PROCESSES","children":[]}]},{"id":1247,"text":"GEODETICS","children":[{"id":1248,"text":"COORDINATE REFERENCE SYSTEM","children":[{"id":1249,"text":"COUNTRY/REGIONAL COORDINATE REFERENCE SYSTEM","children":[]}]},{"id":1250,"text":"GEOID CHARACTERISTICS","children":[]}]},{"id":1251,"text":"GEOMAGNETISM","children":[{"id":1252,"text":"ELECTRICAL FIELD","children":[]},{"id":1253,"text":"GEOMAGNETIC FORECASTS","children":[]},{"id":1254,"text":"GEOMAGNETIC INDICES","children":[]},{"id":1255,"text":"MAGNETIC FIELD","children":[{"id":1256,"t
 ext":"GEOMAGNETIC INDUCTION","children":[]},{"id":1257,"text":"MAGNETIC ANOMALIES","children":[]},{"id":1258,"text":"MAGNETIC DECLINATION","children":[]},{"id":1259,"text":"MAGNETIC INCLINATION","children":[]},{"id":1260,"text":"MAGNETIC INTENSITY","children":[]}]},{"id":1261,"text":"PALEOMAGNETISM","children":[]},{"id":1262,"text":"REFERENCE FIELDS","children":[]}]},{"id":1263,"text":"GEOMORPHIC LANDFORMS/PROCESSES","children":[{"id":1264,"text":"AEOLIAN LANDFORMS","children":[]},{"id":1265,"text":"COASTAL LANDFORMS","children":[{"id":1266,"text":"DUNES","children":[]},{"id":1267,"text":"SALT MARSH","children":[]}]},{"id":1268,"text":"COASTAL PROCESSES","children":[{"id":1269,"text":"DEPOSITION","children":[]}]},{"id":1270,"text":"FLUVIAL LANDFORMS","children":[{"id":1271,"text":"MARSH","children":[]},{"id":1272,"text":"RIVER","children":[]},{"id":1273,"text":"STREAM","children":[]}]},{"id":1274,"text":"FLUVIAL PROCESSES","children":[{"id":1275,"text":"HYDRAULIC ACTION","children":
 []}]},{"id":1276,"text":"GLACIAL LANDFORMS","children":[]},{"id":1277,"text":"KARST LANDFORMS","children":[]},{"id":1278,"text":"KARST PROCESSES","children":[{"id":1279,"text":"DISSOLVED CO2","children":[]}]},{"id":1280,"text":"TECTONIC LANDFORMS","children":[]}]},{"id":1281,"text":"GEOTHERMAL DYNAMICS","children":[{"id":1282,"text":"GEOTHERMAL ENERGY","children":[]},{"id":1283,"text":"GEOTHERMAL TEMPERATURE","children":[]}]},{"id":1284,"text":"GRAVITY/GRAVITATIONAL FIELD","children":[{"id":1285,"text":"CONTROL SURVEYS","children":[]},{"id":1286,"text":"CRUSTAL MOTION","children":[{"id":1287,"text":"OCEAN CRUST DEFORMATION","children":[]}]},{"id":1288,"text":"GRAVITATIONAL FIELD","children":[]},{"id":1289,"text":"GRAVITY","children":[]},{"id":1290,"text":"POLAR MOTION","children":[]},{"id":1291,"text":"ROTATIONAL MOTION/VARIATIONS","children":[]},{"id":1292,"text":"SATELLITE ORBITS/REVOLUTION","children":[]}]},{"id":1293,"text":"ROCKS/MINERALS/CRYSTALS","children":[{"id":1294,"text"
 :"AGE DETERMINATIONS","children":[]},{"id":1295,"text":"BEDROCK LITHOLOGY","children":[]},{"id":1296,"text":"ELEMENTS","children":[{"id":1297,"text":"MAJOR ELEMENTS","children":[]},{"id":1298,"text":"MINOR ELEMENTS","children":[]},{"id":1299,"text":"RADIOACTIVE ELEMENTS","children":[]},{"id":1300,"text":"TRACE ELEMENTS","children":[]}]},{"id":1301,"text":"GAS HYDRATES","children":[]},{"id":1302,"text":"IGNEOUS ROCKS","children":[]},{"id":1303,"text":"METALS","children":[]},{"id":1304,"text":"METAMORPHIC ROCKS","children":[]},{"id":1305,"text":"METEORITES","children":[]},{"id":1306,"text":"MINERALS","children":[{"id":1307,"text":"MINERALOIDS","children":[]}]},{"id":1308,"text":"NON-METALLIC MINERALS","children":[]},{"id":1309,"text":"SEDIMENTARY ROCKS","children":[{"id":1310,"text":"COAL","children":[]}]},{"id":1311,"text":"SEDIMENTS","children":[]}]},{"id":1312,"text":"TECTONICS","children":[{"id":1313,"text":"CORE PROCESSES","children":[]},{"id":1314,"text":"EARTHQUAKES","children"
 :[{"id":1315,"text":"EARTHQUAKE MAGNITUDE/INTENSITY","children":[]},{"id":1316,"text":"EARTHQUAKE OCCURRENCES","children":[]},{"id":1317,"text":"EARTHQUAKE PREDICTIONS","children":[]},{"id":1318,"text":"SEISMIC PROFILE","children":[{"id":1319,"text":"SEISMIC BODY WAVES","children":[]},{"id":1320,"text":"SEISMIC SURFACE WAVES","children":[]}]}]},{"id":1321,"text":"NEOTECTONICS","children":[]},{"id":1322,"text":"PLATE TECTONICS","children":[{"id":1323,"text":"FAULT MOVEMENT","children":[]},{"id":1324,"text":"FOLDS","children":[]},{"id":1325,"text":"ISOSTATIC REBOUND","children":[]},{"id":1326,"text":"LITHOSPHERIC PLATE MOTION","children":[{"id":1327,"text":"PLATE MOTION DIRECTION","children":[]}]},{"id":1328,"text":"PLATE BOUNDARIES","children":[]},{"id":1329,"text":"STRAIN","children":[]},{"id":1330,"text":"STRATIGRAPHIC SEQUENCE","children":[]},{"id":1331,"text":"STRESS","children":[]}]},{"id":1332,"text":"VOLCANIC ACTIVITY","children":[{"id":1333,"text":"ERUPTION DYNAMICS","childre
 n":[{"id":1334,"text":"ASH/DUST COMPOSITION","children":[]},{"id":1335,"text":"LAVA COMPOSITION/TEXTURE","children":[]},{"id":1336,"text":"MAGMA COMPOSITION/TEXTURE","children":[]},{"id":1337,"text":"PYROCLASTICS COMPOSITION/TEXTURE","children":[]},{"id":1338,"text":"VOLCANIC GASES","children":[]}]},{"id":1339,"text":"VOLCANO OCCURRENCES","children":[]}]}]}]},{"id":1340,"text":"SPECTRAL/ENGINEERING","children":[{"id":1341,"text":"GAMMA RAY","children":[]},{"id":1342,"text":"INFRARED WAVELENGTHS","children":[{"id":1343,"text":"BRIGHTNESS TEMPERATURE","children":[]},{"id":1344,"text":"INFRARED FLUX","children":[]},{"id":1345,"text":"INFRARED IMAGERY","children":[]},{"id":1346,"text":"INFRARED RADIANCE","children":[]},{"id":1347,"text":"REFLECTED INFRARED","children":[]},{"id":1348,"text":"SENSOR COUNTS","children":[]},{"id":1349,"text":"THERMAL INFRARED","children":[]}]},{"id":1350,"text":"LIDAR","children":[{"id":1351,"text":"LIDAR BACKSCATTER","children":[]},{"id":1352,"text":"LIDAR
  DEPOLARIZATION RATIO","children":[]}]},{"id":1353,"text":"MICROWAVE","children":[{"id":1354,"text":"ANTENNA TEMPERATURE","children":[]},{"id":1355,"text":"BRIGHTNESS TEMPERATURE","children":[]},{"id":1356,"text":"MICROWAVE IMAGERY","children":[]},{"id":1357,"text":"MICROWAVE RADIANCE","children":[]},{"id":1358,"text":"SENSOR COUNTS","children":[]}]},{"id":1359,"text":"PLATFORM CHARACTERISTICS","children":[{"id":1360,"text":"AIRSPEED/GROUND SPEED","children":[]},{"id":1361,"text":"ATTITUDE CHARACTERISTICS","children":[]},{"id":1362,"text":"DATA SYNCHRONIZATION TIME","children":[]},{"id":1363,"text":"FLIGHT DATA LOGS","children":[]},{"id":1364,"text":"LINE OF SIGHT VELOCITY","children":[]},{"id":1365,"text":"ORBITAL CHARACTERISTICS","children":[]},{"id":1366,"text":"VIEWING GEOMETRY","children":[]}]},{"id":1367,"text":"RADAR","children":[{"id":1368,"text":"DOPPLER VELOCITY","children":[]},{"id":1369,"text":"RADAR BACKSCATTER","children":[]},{"id":1370,"text":"RADAR CROSS-SECTION","ch
 ildren":[]},{"id":1371,"text":"RADAR IMAGERY","children":[]},{"id":1372,"text":"RADAR REFLECTIVITY","children":[]},{"id":1373,"text":"RETURN POWER","children":[]},{"id":1374,"text":"SENSOR COUNTS","children":[]},{"id":1375,"text":"SIGMA NAUGHT","children":[]}]},{"id":1376,"text":"RADIO WAVE","children":[{"id":1377,"text":"RADIO WAVE FLUX","children":[]}]},{"id":1378,"text":"SENSOR CHARACTERISTICS","children":[{"id":1379,"text":"DOME TEMPERATURE","children":[]},{"id":1380,"text":"ELECTRICAL PROPERTIES","children":[]},{"id":1381,"text":"PHASE AND AMPLITUDE","children":[]},{"id":1382,"text":"SINK TEMPERATURE","children":[]},{"id":1383,"text":"THERMAL PROPERTIES","children":[]},{"id":1384,"text":"TOTAL PRESSURE","children":[]},{"id":1385,"text":"TOTAL TEMPERATURE","children":[]},{"id":1386,"text":"ULTRAVIOLET SENSOR TEMPERATURE","children":[]},{"id":1387,"text":"VIEWING GEOMETRY","children":[]}]},{"id":1388,"text":"ULTRAVIOLET WAVELENGTHS","children":[{"id":1389,"text":"SENSOR COUNTS","
 children":[]},{"id":1390,"text":"ULTRAVIOLET FLUX","children":[]},{"id":1391,"text":"ULTRAVIOLET RADIANCE","children":[]}]},{"id":1392,"text":"VISIBLE WAVELENGTHS","children":[{"id":1393,"text":"SENSOR COUNTS","children":[]},{"id":1394,"text":"VISIBLE FLUX","children":[]},{"id":1395,"text":"VISIBLE IMAGERY","children":[]},{"id":1396,"text":"VISIBLE RADIANCE","children":[]}]},{"id":1397,"text":"X-RAY","children":[{"id":1398,"text":"X-RAY FLUX","children":[]}]}]},{"id":1399,"text":"SUN-EARTH INTERACTIONS","children":[{"id":1400,"text":"IONOSPHERE/MAGNETOSPHERE DYNAMICS","children":[{"id":1401,"text":"AURORAE","children":[]},{"id":1402,"text":"ELECTRIC FIELDS/ELECTRIC CURRENTS","children":[]},{"id":1403,"text":"GEOMAGNETIC FORECASTS","children":[]},{"id":1404,"text":"GEOMAGNETIC INDICES","children":[]},{"id":1405,"text":"ION CHEMISTRY/IONIZATION","children":[]},{"id":1406,"text":"MAGNETIC FIELDS/MAGNETIC CURRENTS","children":[]},{"id":1407,"text":"MAGNETIC STORMS","children":[]},{"id":
 1408,"text":"PLASMA WAVES","children":[]},{"id":1409,"text":"SOLAR WIND","children":[]}]},{"id":1410,"text":"SOLAR ACTIVITY","children":[{"id":1411,"text":"CORONA","children":[]},{"id":1412,"text":"CORONA HOLES","children":[]},{"id":1413,"text":"CORONAL MASS EJECTIONS","children":[]},{"id":1414,"text":"SOLAR ACTIVE REGIONS","children":[]},{"id":1415,"text":"SOLAR FLARES","children":[]},{"id":1416,"text":"SOLAR IMAGERY","children":[]},{"id":1417,"text":"SOLAR IRRADIANCE","children":[]},{"id":1418,"text":"SOLAR OSCILLATIONS","children":[]},{"id":1419,"text":"SOLAR PROMINENCES/SOLAR FILAMENTS","children":[]},{"id":1420,"text":"SOLAR RADIO WAVE EMISSIONS","children":[]},{"id":1421,"text":"SOLAR SYNOPTIC MAPS","children":[]},{"id":1422,"text":"SOLAR ULTRAVIOLET EMISSIONS","children":[]},{"id":1423,"text":"SOLAR VELOCITY FIELDS","children":[]},{"id":1424,"text":"SOLAR X-RAY EMISSIONS","children":[]},{"id":1425,"text":"SUNSPOTS","children":[]}]},{"id":1426,"text":"SOLAR ENERGETIC PARTICLE 
 FLUX","children":[{"id":1427,"text":"ALPHA PARTICLE FLUX","children":[]},{"id":1428,"text":"ELECTRON FLUX","children":[]},{"id":1429,"text":"HEAVY NUCLEI FLUX","children":[]},{"id":1430,"text":"ION FLUX","children":[]},{"id":1431,"text":"NEUTRAL PARTICLE FLUX","children":[]},{"id":1432,"text":"PROTON FLUX","children":[]},{"id":1433,"text":"SUB-ATOMIC PARTICLE FLUX","children":[]}]},{"id":1434,"text":"SOLAR ENERGETIC PARTICLE PROPERTIES","children":[{"id":1435,"text":"ENERGY DEPOSITION","children":[]},{"id":1436,"text":"PARTICLE COMPOSITION","children":[]},{"id":1437,"text":"PARTICLE DENSITY","children":[]},{"id":1438,"text":"PARTICLE DISTRIBUTION FUNCTIONS","children":[]},{"id":1439,"text":"PARTICLE SPEED","children":[]},{"id":1440,"text":"PARTICLE TEMPERATURE","children":[]},{"id":1441,"text":"TOTAL ELECTRON CONTENT","children":[]}]}]},{"id":1442,"text":"TERRESTRIAL HYDROSPHERE","children":[{"id":1443,"text":"GLACIERS/ICE SHEETS","children":[{"id":1444,"text":"ABLATION ZONES/ACCUMU
 LATION ZONES","children":[]},{"id":1445,"text":"FIRN","children":[]},{"id":1446,"text":"GLACIER ELEVATION/ICE SHEET ELEVATION","children":[]},{"id":1447,"text":"GLACIER FACIES","children":[]},{"id":1448,"text":"GLACIER MASS BALANCE/ICE SHEET MASS BALANCE","children":[]},{"id":1449,"text":"GLACIER MOTION/ICE SHEET MOTION","children":[]},{"id":1450,"text":"GLACIERS","children":[]},{"id":1451,"text":"GLACIER THICKNESS/ICE SHEET THICKNESS","children":[]},{"id":1452,"text":"GLACIER TOPOGRAPHY/ICE SHEET TOPOGRAPHY","children":[]},{"id":1453,"text":"ICEBERGS","children":[]},{"id":1454,"text":"ICE SHEETS","children":[]}]},{"id":1455,"text":"GROUND WATER","children":[{"id":1456,"text":"AQUIFERS","children":[]},{"id":1457,"text":"DISPERSION","children":[]},{"id":1458,"text":"DRAINAGE","children":[]},{"id":1459,"text":"GROUNDWATER CHEMISTRY","children":[]},{"id":1460,"text":"GROUND WATER DISCHARGE/FLOW","children":[]},{"id":1461,"text":"INFILTRATION","children":[]},{"id":1462,"text":"LAND SUBS
 IDENCE","children":[]},{"id":1463,"text":"PERCOLATION","children":[]},{"id":1464,"text":"SALTWATER INTRUSION","children":[]},{"id":1465,"text":"SPRINGS","children":[]},{"id":1466,"text":"WATER TABLE","children":[]}]},{"id":1467,"text":"SNOW/ICE","children":[{"id":1468,"text":"ALBEDO","children":[]},{"id":1469,"text":"AVALANCHE","children":[]},{"id":1470,"text":"DEPTH HOAR","children":[]},{"id":1471,"text":"FREEZE/THAW","children":[]},{"id":1472,"text":"FROST","children":[]},{"id":1473,"text":"ICE DEPTH/THICKNESS","children":[]},{"id":1474,"text":"ICE EXTENT","children":[]},{"id":1475,"text":"ICE GROWTH/MELT","children":[]},{"id":1476,"text":"ICE MOTION","children":[]},{"id":1477,"text":"ICE VELOCITY","children":[]},{"id":1478,"text":"LAKE ICE","children":[]},{"id":1479,"text":"PERMAFROST","children":[]},{"id":1480,"text":"RIVER ICE","children":[]},{"id":1481,"text":"SNOW COVER","children":[]},{"id":1482,"text":"SNOW DENSITY","children":[]},{"id":1483,"text":"SNOW DEPTH","children":[
 ]},{"id":1484,"text":"SNOW ENERGY BALANCE","children":[]},{"id":1485,"text":"SNOW FACIES","children":[]},{"id":1486,"text":"SNOW/ICE CHEMISTRY","children":[]},{"id":1487,"text":"SNOW/ICE TEMPERATURE","children":[]},{"id":1488,"text":"SNOW MELT","children":[]},{"id":1489,"text":"SNOW STRATIGRAPHY","children":[]},{"id":1490,"text":"SNOW WATER EQUIVALENT","children":[]},{"id":1491,"text":"WHITEOUT","children":[]}]},{"id":1492,"text":"SURFACE WATER","children":[{"id":1493,"text":"AQUIFER RECHARGE","children":[]},{"id":1494,"text":"DISCHARGE/FLOW","children":[]},{"id":1495,"text":"DRAINAGE","children":[]},{"id":1496,"text":"FLOODS","children":[]},{"id":1497,"text":"HYDROPATTERN","children":[]},{"id":1498,"text":"HYDROPERIOD","children":[]},{"id":1499,"text":"INUNDATION","children":[]},{"id":1500,"text":"LAKES","children":[]},{"id":1501,"text":"RIVERS/STREAMS","children":[]},{"id":1502,"text":"RUNOFF","children":[]},{"id":1503,"text":"STAGE HEIGHT","children":[]},{"id":1504,"text":"SURFAC
 E WATER CHEMISTRY","children":[]},{"id":1505,"text":"TOTAL SURFACE WATER","children":[]},{"id":1506,"text":"WATER CHANNELS","children":[]},{"id":1507,"text":"WATER DEPTH","children":[]},{"id":1508,"text":"WATER PRESSURE","children":[]},{"id":1509,"text":"WATERSHED CHARACTERISTICS","children":[]},{"id":1510,"text":"WATER YIELD","children":[]},{"id":1511,"text":"WETLANDS","children":[]}]},{"id":1512,"text":"WATER QUALITY/WATER CHEMISTRY","children":[{"id":1513,"text":"ACID DEPOSITION","children":[]},{"id":1514,"text":"ALKALINITY","children":[]},{"id":1515,"text":"BENTHIC INDEX","children":[]},{"id":1516,"text":"CARBON DIOXIDE","children":[]},{"id":1517,"text":"CARCINOGENS","children":[]},{"id":1518,"text":"CHLOROPHYLL","children":[]},{"id":1519,"text":"CONDUCTIVITY","children":[]},{"id":1520,"text":"CONTAMINANTS","children":[]},{"id":1521,"text":"DISSOLVED GASES","children":[]},{"id":1522,"text":"DISSOLVED SOLIDS","children":[]},{"id":1523,"text":"HYDROCARBONS","children":[]},{"id":15
 24,"text":"INORGANIC MATTER","children":[]},{"id":1525,"text":"LIGHT TRANSMISSION","children":[]},{"id":1526,"text":"NITROGEN COMPOUNDS","children":[]},{"id":1527,"text":"NUTRIENTS","children":[]},{"id":1528,"text":"ORGANIC MATTER","children":[]},{"id":1529,"text":"OXYGEN","children":[]},{"id":1530,"text":"PH","children":[]},{"id":1531,"text":"PHOSPHOROUS COMPOUNDS","children":[]},{"id":1532,"text":"RADIOISOTOPES","children":[]},{"id":1533,"text":"STABLE ISOTOPES","children":[]},{"id":1534,"text":"SUSPENDED SOLIDS","children":[]},{"id":1535,"text":"TOXIC CHEMICALS","children":[]},{"id":1536,"text":"TRACE METALS","children":[]},{"id":1537,"text":"TURBIDITY","children":[]},{"id":1538,"text":"WATER ION CONCENTRATION","children":[]},{"id":1539,"text":"WATER POTABILITY","children":[]},{"id":1540,"text":"WATER TEMPERATURE","children":[]},{"id":1541,"text":"WATER TRACE ELEMENTS","children":[]}]}]}]}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/b87c13a8/public/keywords1.json
----------------------------------------------------------------------
diff --git a/public/keywords1.json b/public/keywords1.json
deleted file mode 100644
index 1ff9e36..0000000
--- a/public/keywords1.json
+++ /dev/null
@@ -1 +0,0 @@
-{"id":0,"text":"PWSCMDA","children":[{"id":1,"text":"Observational data","children":[{"id":2,"text":"Air temperature and specific humidity","children":[{"id":3,"text":"Atmospheric Infrared Sounder \u0026 Advance Microwave Sounding Unit (AIRS \u0026 AMSU)","children":[]},{"id":4,"text":"Microwave Limb Sounder (MLS)","children":[{"id":5,"text":"Temperature Data Description","children":[]},{"id":6,"text":"Specific humidity Data Description","children":[]}]}]},{"id":7,"text":"Total cloud area fraction","children":[]},{"id":8,"text":"Radiation flux","children":[{"id":9,"text":"TOA (top of atmosphere) incident shortwave flux","children":[]},{"id":10,"text":"TOA outgoing shortwave and longwave radiation fluxes","children":[{"id":11,"text":"TOA Outgoing Shortwave Radiation (rsut)","children":[]},{"id":12,"text":"TOA Outgoing Longwave Radiation (rlut)","children":[]},{"id":13,"text":"TOA Outgoing Clear-Sky Shortwave Radiation (rsutcs)","children":[]},{"id":14,"text":"TOA Outgoing Clear-Sky L
 ongwave Radiation (rlutcs)","children":[]}]},{"id":15,"text":"Surface shortwave and longwave fluxes","children":[]}]},{"id":16,"text":"Precipitation","children":[{"id":17,"text":"TRMM precipitation flux","children":[]}]},{"id":18,"text":"Leaf area index","children":[]},{"id":19,"text":"Sea surface temperature","children":[]},{"id":20,"text":"Sea surface wind","children":[]},{"id":21,"text":"Sea surface height","children":[]},{"id":22,"text":"Mass grids (equivalent water thickness)","children":[]},{"id":23,"text":"Ocean temperature and Salinity","children":[]}]},{"id":24,"text":"Climate model data","children":[]},{"id":25,"text":"Reanalysis data","children":[]},{"id":26,"text":"Current data master list","children":[]}]}
\ No newline at end of file


[37/50] [abbrv] incubator-cmda git commit: Change Constants.java

Posted by xi...@apache.org.
Change Constants.java

Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/2990a2cf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/2990a2cf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/2990a2cf

Branch: refs/heads/master
Commit: 2990a2cf2e0ce5f6149dc2d2e578c939f68d6b28
Parents: 42e1e0a
Author: mingqi830 <mq...@andrew.cmu.edu>
Authored: Fri Sep 4 16:14:21 2015 -0700
Committer: mingqi830 <mq...@andrew.cmu.edu>
Committed: Fri Sep 4 16:14:21 2015 -0700

----------------------------------------------------------------------
 app/util/Constants.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2990a2cf/app/util/Constants.java
----------------------------------------------------------------------
diff --git a/app/util/Constants.java b/app/util/Constants.java
index a2813ae..51a72d5 100644
--- a/app/util/Constants.java
+++ b/app/util/Constants.java
@@ -36,7 +36,7 @@ public class Constants {
     public static final String GET_DATASETLIST ="getDatasetList/";
 
 	//New backend API (MySQL database)
-	public static final String NEW_BACKEND = "http://einstein.sv.cmu.edu:9034/";
+	public static final String NEW_BACKEND = "http://localhost:9034/";
 	//New service execution log stuff
 	public static final String SERVICE_EXECUTION_LOG =	"serviceExecutionLog/";
 	public static final String SERVICE_EXECUTION_LOG_QUERY =	"queryServiceExecutionLogs";


[46/50] [abbrv] incubator-cmda git commit: Change User model

Posted by xi...@apache.org.
Change User model

Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/33b4c3e2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/33b4c3e2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/33b4c3e2

Branch: refs/heads/master
Commit: 33b4c3e2c527c5fdb94621bd8130d09130ab612f
Parents: f6aa032
Author: mingqi830 <mq...@andrew.cmu.edu>
Authored: Fri Sep 4 16:45:24 2015 -0700
Committer: mingqi830 <mq...@andrew.cmu.edu>
Committed: Fri Sep 4 16:45:24 2015 -0700

----------------------------------------------------------------------
 app/models/User.java | 209 +++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 186 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/33b4c3e2/app/models/User.java
----------------------------------------------------------------------
diff --git a/app/models/User.java b/app/models/User.java
index 04cc9d3..becc703 100644
--- a/app/models/User.java
+++ b/app/models/User.java
@@ -14,28 +14,191 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package models;
 
-//import javax.persistence.*;
-//import play.db.ebean.*;
-//import com.avaje.ebean.*;
-//
-//@Entity
-//public class User extends Model {
-//
-//    @Id
-//    public String email;
-//    public String name;
-//    public String password;
-//    
-//    public User(String email, String name, String password) {
-//      this.email = email;
-//      this.name = name;
-//      this.password = password;
-//    }
-//
-//    public static Finder<String,User> find = new Finder<String,User>(
-//        String.class, User.class
-//    ); 
-//}
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+
+import play.data.validation.Constraints;
+
+@Entity
+public class User {
+
+	@Id
+	@GeneratedValue(strategy = GenerationType.AUTO)
+	private long id;
+
+	private String userName;
+	@Constraints.Required
+	private String password;
+	@Constraints.Required
+	private String firstName;
+	@Constraints.Required
+	private String lastName;
+	private String middleInitial;
+	private String affiliation;
+	private String title;
+	@Constraints.Required
+	private String email;
+	private String mailingAddress;
+	private String phoneNumber;
+	private String faxNumber;
+	private String researchFields;
+	private String highestDegree;
+
+	// @OneToMany(mappedBy = "user", cascade={CascadeType.ALL})
+	// private Set<ClimateService> climateServices = new
+	// HashSet<ClimateService>();
+
+	public User() {
+	}
+
+	public User(String userName, String password, String firstName,
+			String lastName, String middleInitial, String affiliation,
+			String title, String email, String mailingAddress,
+			String phoneNumber, String faxNumber, String researchFields,
+			String highestDegree) {
+		super();
+		this.userName = userName;
+		this.password = password;
+		this.firstName = firstName;
+		this.lastName = lastName;
+		this.middleInitial = middleInitial;
+		this.affiliation = affiliation;
+		this.title = title;
+		this.email = email;
+		this.mailingAddress = mailingAddress;
+		this.phoneNumber = phoneNumber;
+		this.faxNumber = faxNumber;
+		this.researchFields = researchFields;
+		this.highestDegree = highestDegree;
+	}
+
+	public long getId() {
+		return id;
+	}
+
+	public String getUserName() {
+		return userName;
+	}
+
+	public String getPassword() {
+		return password;
+	}
+
+	public String getFirstName() {
+		return firstName;
+	}
+
+	public String getLastName() {
+		return lastName;
+	}
+
+	public String getMiddleInitial() {
+		return middleInitial;
+	}
+
+	public String getAffiliation() {
+		return affiliation;
+	}
+
+	public String getTitle() {
+		return title;
+	}
+
+	public String getEmail() {
+		return email;
+	}
+
+	public String getMailingAddress() {
+		return mailingAddress;
+	}
+
+	public String getPhoneNumber() {
+		return phoneNumber;
+	}
+
+	public String getFaxNumber() {
+		return faxNumber;
+	}
+
+	public String getResearchFields() {
+		return researchFields;
+	}
+
+	public String getHighestDegree() {
+		return highestDegree;
+	}
+	
+	public void setId(long id) {
+		this.id = id;
+	}
+
+	public void setUserName(String userName) {
+		this.userName = userName;
+	}
+
+	public void setPassword(String password) {
+		this.password = password;
+	}
+
+	public void setFirstName(String firstName) {
+		this.firstName = firstName;
+	}
+
+	public void setLastName(String lastName) {
+		this.lastName = lastName;
+	}
+
+	public void setMiddleInitial(String middleInitial) {
+		this.middleInitial = middleInitial;
+	}
+
+	public void setAffiliation(String affiliation) {
+		this.affiliation = affiliation;
+	}
+
+	public void setTitle(String title) {
+		this.title = title;
+	}
+
+	public void setEmail(String email) {
+		this.email = email;
+	}
+
+	public void setMailingAddress(String mailingAddress) {
+		this.mailingAddress = mailingAddress;
+	}
+
+	public void setPhoneNumber(String phoneNumber) {
+		this.phoneNumber = phoneNumber;
+	}
+
+	public void setFaxNumber(String faxNumber) {
+		this.faxNumber = faxNumber;
+	}
+
+	public void setResearchFields(String researchFields) {
+		this.researchFields = researchFields;
+	}
+
+	public void setHighestDegree(String highestDegree) {
+		this.highestDegree = highestDegree;
+	}
+
+	@Override
+	public String toString() {
+		return "User [id=" + id + ", userName=" + userName + ", password="
+				+ password + ", firstName=" + firstName + ", lastName="
+				+ lastName + ", middleInitial=" + middleInitial
+				+ ", affiliation=" + affiliation + ", title=" + title
+				+ ", email=" + email + ", mailingAddress=" + mailingAddress
+				+ ", phoneNumber=" + phoneNumber + ", faxNumber=" + faxNumber
+				+ ", researchFields=" + researchFields + ", highestDegree="
+				+ highestDegree + "]";
+	}
+
+}
+


[13/50] [abbrv] incubator-cmda git commit: remove other old files

Posted by xi...@apache.org.
remove other old files

Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/aa8b627b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/aa8b627b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/aa8b627b

Branch: refs/heads/master
Commit: aa8b627bdd58fc030bf70b70806e8c5c18406fa6
Parents: 1afa253
Author: mingqi830 <mq...@andrew.cmu.edu>
Authored: Wed Sep 2 16:58:37 2015 -0700
Committer: mingqi830 <mq...@andrew.cmu.edu>
Committed: Wed Sep 2 16:58:37 2015 -0700

----------------------------------------------------------------------
 contact/ContactUs.png                           | Bin 148887 -> 0 bytes
 .../ArchetecturalDecisions_SDAS.pptx            | Bin 50261 -> 0 bytes
 .../Meetings/MeetingMinutes/Minutes Nov 22.docx | Bin 5799 -> 0 bytes
 .../Meetings/MeetingMinutes/Minutes Nov.15.docx | Bin 5376 -> 0 bytes
 .../Meetings/MeetingMinutes/Minutes_Nov.7.docx  | Bin 5794 -> 0 bytes
 .../MeetingMinutes/Team Meeting Nov26.docx      | Bin 6386 -> 0 bytes
 .../MeetingMinutes/Team Minutes Dec 8.docx      | Bin 5413 -> 0 bytes
 .../MeetingSlides/Week2_Meeting_Slides.pptx     | Bin 31412 -> 0 bytes
 .../MeetingSlides/Week3_Meeting_Slides.pptx     | Bin 31195 -> 0 bytes
 .../MeetingSlides/Week4_Meeting_Slides.pptx     | Bin 31329 -> 0 bytes
 other_project_docs/README.md                    |  25 -------------------
 other_project_docs/SDAS_DesignDocument.docx     | Bin 784058 -> 0 bytes
 .../SDAS_Final_Presentation_Without_Demo.pptx   | Bin 1176330 -> 0 bytes
 other_project_docs/SDAS_FutureWork.docx         | Bin 90855 -> 0 bytes
 other_project_docs/SDAS_Installation.docx       | Bin 92320 -> 0 bytes
 other_project_docs/SDAS_Tutorial.docx           | Bin 1101873 -> 0 bytes
 other_project_docs/SDAS_URL_Login.png           | Bin 46299 -> 0 bytes
 other_project_docs/TechnicalReport.pdf          | Bin 2154511 -> 0 bytes
 public/images/FireImp2.jpg                      | Bin 89355 -> 0 bytes
 public/images/UsageSummart.png                  | Bin 22447 -> 0 bytes
 public/images/fireImp.png                       | Bin 76549 -> 0 bytes
 public/images/firefly.jpg                       | Bin 59568 -> 0 bytes
 public/images/fireimp_small.jpg                 | Bin 31799 -> 0 bytes
 public/images/workflow_1.png                    | Bin 60127 -> 0 bytes
 public/images/workflow_2.png                    | Bin 24845 -> 0 bytes
 25 files changed, 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/aa8b627b/contact/ContactUs.png
----------------------------------------------------------------------
diff --git a/contact/ContactUs.png b/contact/ContactUs.png
deleted file mode 100644
index ad2f6c6..0000000
Binary files a/contact/ContactUs.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/aa8b627b/other_project_docs/ArchetecturalDecisions_SDAS.pptx
----------------------------------------------------------------------
diff --git a/other_project_docs/ArchetecturalDecisions_SDAS.pptx b/other_project_docs/ArchetecturalDecisions_SDAS.pptx
deleted file mode 100644
index 607fb80..0000000
Binary files a/other_project_docs/ArchetecturalDecisions_SDAS.pptx and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/aa8b627b/other_project_docs/Meetings/MeetingMinutes/Minutes Nov 22.docx
----------------------------------------------------------------------
diff --git a/other_project_docs/Meetings/MeetingMinutes/Minutes Nov 22.docx b/other_project_docs/Meetings/MeetingMinutes/Minutes Nov 22.docx
deleted file mode 100644
index 45c0d98..0000000
Binary files a/other_project_docs/Meetings/MeetingMinutes/Minutes Nov 22.docx and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/aa8b627b/other_project_docs/Meetings/MeetingMinutes/Minutes Nov.15.docx
----------------------------------------------------------------------
diff --git a/other_project_docs/Meetings/MeetingMinutes/Minutes Nov.15.docx b/other_project_docs/Meetings/MeetingMinutes/Minutes Nov.15.docx
deleted file mode 100644
index 4e6407a..0000000
Binary files a/other_project_docs/Meetings/MeetingMinutes/Minutes Nov.15.docx and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/aa8b627b/other_project_docs/Meetings/MeetingMinutes/Minutes_Nov.7.docx
----------------------------------------------------------------------
diff --git a/other_project_docs/Meetings/MeetingMinutes/Minutes_Nov.7.docx b/other_project_docs/Meetings/MeetingMinutes/Minutes_Nov.7.docx
deleted file mode 100644
index a015830..0000000
Binary files a/other_project_docs/Meetings/MeetingMinutes/Minutes_Nov.7.docx and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/aa8b627b/other_project_docs/Meetings/MeetingMinutes/Team Meeting Nov26.docx
----------------------------------------------------------------------
diff --git a/other_project_docs/Meetings/MeetingMinutes/Team Meeting Nov26.docx b/other_project_docs/Meetings/MeetingMinutes/Team Meeting Nov26.docx
deleted file mode 100644
index 03b2914..0000000
Binary files a/other_project_docs/Meetings/MeetingMinutes/Team Meeting Nov26.docx and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/aa8b627b/other_project_docs/Meetings/MeetingMinutes/Team Minutes Dec 8.docx
----------------------------------------------------------------------
diff --git a/other_project_docs/Meetings/MeetingMinutes/Team Minutes Dec 8.docx b/other_project_docs/Meetings/MeetingMinutes/Team Minutes Dec 8.docx
deleted file mode 100644
index e2f47b1..0000000
Binary files a/other_project_docs/Meetings/MeetingMinutes/Team Minutes Dec 8.docx and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/aa8b627b/other_project_docs/Meetings/MeetingSlides/Week2_Meeting_Slides.pptx
----------------------------------------------------------------------
diff --git a/other_project_docs/Meetings/MeetingSlides/Week2_Meeting_Slides.pptx b/other_project_docs/Meetings/MeetingSlides/Week2_Meeting_Slides.pptx
deleted file mode 100644
index 5f355ba..0000000
Binary files a/other_project_docs/Meetings/MeetingSlides/Week2_Meeting_Slides.pptx and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/aa8b627b/other_project_docs/Meetings/MeetingSlides/Week3_Meeting_Slides.pptx
----------------------------------------------------------------------
diff --git a/other_project_docs/Meetings/MeetingSlides/Week3_Meeting_Slides.pptx b/other_project_docs/Meetings/MeetingSlides/Week3_Meeting_Slides.pptx
deleted file mode 100644
index 903307f..0000000
Binary files a/other_project_docs/Meetings/MeetingSlides/Week3_Meeting_Slides.pptx and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/aa8b627b/other_project_docs/Meetings/MeetingSlides/Week4_Meeting_Slides.pptx
----------------------------------------------------------------------
diff --git a/other_project_docs/Meetings/MeetingSlides/Week4_Meeting_Slides.pptx b/other_project_docs/Meetings/MeetingSlides/Week4_Meeting_Slides.pptx
deleted file mode 100644
index 12021d6..0000000
Binary files a/other_project_docs/Meetings/MeetingSlides/Week4_Meeting_Slides.pptx and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/aa8b627b/other_project_docs/README.md
----------------------------------------------------------------------
diff --git a/other_project_docs/README.md b/other_project_docs/README.md
deleted file mode 100644
index 9c1da72..0000000
--- a/other_project_docs/README.md
+++ /dev/null
@@ -1,25 +0,0 @@
-README
-======
-
-Please refer to the Technical Report for the below:
-
-Executive Summary
------------------
-
-- PROJECT BACKGROUND
-- ARCHITECTURAL DESIGN
-- ATAM ARCHITECTURE ANALYSIS
-- SENSOR DATA PLATFORM WEB APPLICATION
-- FUTURE WORK
-- CONTACT INFORMATION
-
-Application Walkthrough
------------------------
-
-- TUTORIAL section of TECHNICAL REPORT
-- SDAS_Final_Presentation.pptx
-
-Meeting Slides and Meeting Minutes
---------------------------------------
-
-- Meetings Folder

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/aa8b627b/other_project_docs/SDAS_DesignDocument.docx
----------------------------------------------------------------------
diff --git a/other_project_docs/SDAS_DesignDocument.docx b/other_project_docs/SDAS_DesignDocument.docx
deleted file mode 100644
index cf79df3..0000000
Binary files a/other_project_docs/SDAS_DesignDocument.docx and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/aa8b627b/other_project_docs/SDAS_Final_Presentation_Without_Demo.pptx
----------------------------------------------------------------------
diff --git a/other_project_docs/SDAS_Final_Presentation_Without_Demo.pptx b/other_project_docs/SDAS_Final_Presentation_Without_Demo.pptx
deleted file mode 100644
index b3585c0..0000000
Binary files a/other_project_docs/SDAS_Final_Presentation_Without_Demo.pptx and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/aa8b627b/other_project_docs/SDAS_FutureWork.docx
----------------------------------------------------------------------
diff --git a/other_project_docs/SDAS_FutureWork.docx b/other_project_docs/SDAS_FutureWork.docx
deleted file mode 100644
index 6084989..0000000
Binary files a/other_project_docs/SDAS_FutureWork.docx and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/aa8b627b/other_project_docs/SDAS_Installation.docx
----------------------------------------------------------------------
diff --git a/other_project_docs/SDAS_Installation.docx b/other_project_docs/SDAS_Installation.docx
deleted file mode 100644
index 3e59e9d..0000000
Binary files a/other_project_docs/SDAS_Installation.docx and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/aa8b627b/other_project_docs/SDAS_Tutorial.docx
----------------------------------------------------------------------
diff --git a/other_project_docs/SDAS_Tutorial.docx b/other_project_docs/SDAS_Tutorial.docx
deleted file mode 100644
index 2385c91..0000000
Binary files a/other_project_docs/SDAS_Tutorial.docx and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/aa8b627b/other_project_docs/SDAS_URL_Login.png
----------------------------------------------------------------------
diff --git a/other_project_docs/SDAS_URL_Login.png b/other_project_docs/SDAS_URL_Login.png
deleted file mode 100644
index a4a20a4..0000000
Binary files a/other_project_docs/SDAS_URL_Login.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/aa8b627b/other_project_docs/TechnicalReport.pdf
----------------------------------------------------------------------
diff --git a/other_project_docs/TechnicalReport.pdf b/other_project_docs/TechnicalReport.pdf
deleted file mode 100644
index cefdc02..0000000
Binary files a/other_project_docs/TechnicalReport.pdf and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/aa8b627b/public/images/FireImp2.jpg
----------------------------------------------------------------------
diff --git a/public/images/FireImp2.jpg b/public/images/FireImp2.jpg
deleted file mode 100644
index 3886a71..0000000
Binary files a/public/images/FireImp2.jpg and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/aa8b627b/public/images/UsageSummart.png
----------------------------------------------------------------------
diff --git a/public/images/UsageSummart.png b/public/images/UsageSummart.png
deleted file mode 100644
index 5638a81..0000000
Binary files a/public/images/UsageSummart.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/aa8b627b/public/images/fireImp.png
----------------------------------------------------------------------
diff --git a/public/images/fireImp.png b/public/images/fireImp.png
deleted file mode 100644
index f992ea5..0000000
Binary files a/public/images/fireImp.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/aa8b627b/public/images/firefly.jpg
----------------------------------------------------------------------
diff --git a/public/images/firefly.jpg b/public/images/firefly.jpg
deleted file mode 100644
index ef69b89..0000000
Binary files a/public/images/firefly.jpg and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/aa8b627b/public/images/fireimp_small.jpg
----------------------------------------------------------------------
diff --git a/public/images/fireimp_small.jpg b/public/images/fireimp_small.jpg
deleted file mode 100644
index 5c60dbe..0000000
Binary files a/public/images/fireimp_small.jpg and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/aa8b627b/public/images/workflow_1.png
----------------------------------------------------------------------
diff --git a/public/images/workflow_1.png b/public/images/workflow_1.png
deleted file mode 100644
index 3bcb880..0000000
Binary files a/public/images/workflow_1.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/aa8b627b/public/images/workflow_2.png
----------------------------------------------------------------------
diff --git a/public/images/workflow_2.png b/public/images/workflow_2.png
deleted file mode 100644
index 47d533b..0000000
Binary files a/public/images/workflow_2.png and /dev/null differ


[33/50] [abbrv] incubator-cmda git commit: modify routes

Posted by xi...@apache.org.
modify routes


Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/bf0dfe23
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/bf0dfe23
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/bf0dfe23

Branch: refs/heads/master
Commit: bf0dfe230dce95af9b44d96a0429df99d9c79bef
Parents: 87f7a8f
Author: cat1021 <lo...@gmail.com>
Authored: Fri Sep 4 15:51:56 2015 -0700
Committer: cat1021 <lo...@gmail.com>
Committed: Fri Sep 4 15:51:56 2015 -0700

----------------------------------------------------------------------
 conf/routes | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/bf0dfe23/conf/routes
----------------------------------------------------------------------
diff --git a/conf/routes b/conf/routes
index e7fd9d4..4d5da4f 100644
--- a/conf/routes
+++ b/conf/routes
@@ -28,7 +28,7 @@ POST        /delete/report                                       controllers.Bug
 POST        /solve/report                                        controllers.BugReportController.solveReport()
 
 # About Us
-GET         /aboutus                                             controllers.AboutusController.aboutus()
+GET         /aboutus                                             controllers.AboutusController.aboutUs()
 GET         /aboutProject                                        controllers.AboutusController.aboutProject()
 
 # Climate Model


[41/50] [abbrv] incubator-cmda git commit: Merge branch 'master' of https://github.com/cmusv-sc/ApacheCMDA-Frontend.git

Posted by xi...@apache.org.
Merge branch 'master' of https://github.com/cmusv-sc/ApacheCMDA-Frontend.git

Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/bca08e09
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/bca08e09
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/bca08e09

Branch: refs/heads/master
Commit: bca08e0967ac754b8f26a5c87aaf4e6822e42dd4
Parents: 07e3c1f 07a31d1
Author: mingqi830 <mq...@andrew.cmu.edu>
Authored: Fri Sep 4 16:28:32 2015 -0700
Committer: mingqi830 <mq...@andrew.cmu.edu>
Committed: Fri Sep 4 16:28:32 2015 -0700

----------------------------------------------------------------------
 app/views/climate/aboutus.scala.html               | 17 +++++++++++++++++
 app/views/climate/addClimateServices.scala.html    | 17 +++++++++++++++++
 app/views/climate/bugReporting.scala.html          | 16 ++++++++++++++++
 app/views/climate/bugs.scala.html                  | 16 ++++++++++++++++
 app/views/climate/climateServices.scala.html       | 16 ++++++++++++++++
 app/views/climate/conditionalSampling.scala.html   | 17 +++++++++++++++++
 .../climate/conditionalSampling2Var.scala.html     | 17 +++++++++++++++++
 app/views/climate/correlationMap.scala.html        | 17 +++++++++++++++++
 app/views/climate/dataRecommend.scala.html         | 17 +++++++++++++++++
 app/views/climate/dataSetList.scala.html           | 17 +++++++++++++++++
 app/views/climate/datasetTime.scala.html           | 17 +++++++++++++++++
 ...fferencePlotTwoTimeAveragedVariables.scala.html | 17 +++++++++++++++++
 app/views/climate/header.scala.html                | 16 ++++++++++++++++
 app/views/climate/home.scala.html                  | 17 +++++++++++++++++
 app/views/climate/main.scala.html                  | 17 +++++++++++++++++
 app/views/climate/mostPopularServices.scala.html   | 17 +++++++++++++++++
 .../climate/mostRecentlyAddedServices.scala.html   | 17 +++++++++++++++++
 .../climate/mostRecentlyUsedServices.scala.html    | 17 +++++++++++++++++
 app/views/climate/oneService.scala.html            | 17 +++++++++++++++++
 app/views/climate/recommend.scala.html             | 17 +++++++++++++++++
 app/views/climate/regridAndDownload.scala.html     | 17 +++++++++++++++++
 .../scatterAndHistogramTwoVariable.scala.html      | 17 +++++++++++++++++
 app/views/climate/searchDataSet.scala.html         | 17 +++++++++++++++++
 .../climate/searchGenerateWorkflow.scala.html      | 17 +++++++++++++++++
 app/views/climate/searchLogResult.scala.html       | 17 +++++++++++++++++
 .../climate/searchLogResultWorkflow.scala.html     | 17 +++++++++++++++++
 app/views/climate/searchServiceLog.scala.html      | 17 +++++++++++++++++
 app/views/climate/serviceLog.scala.html            | 17 +++++++++++++++++
 .../threeDVariableAerageVerticalProfile.scala.html | 17 +++++++++++++++++
 .../climate/threeDVariableTwoDSlice.scala.html     | 17 +++++++++++++++++
 .../climate/threeDVariableZonalMean.scala.html     | 17 +++++++++++++++++
 app/views/climate/tutorial.scala.html              | 17 +++++++++++++++++
 app/views/climate/twoDVariableMap.scala.html       | 17 +++++++++++++++++
 .../climate/twoDVariableTimeSeries.scala.html      | 17 +++++++++++++++++
 app/views/climate/twoDVariableZonelMean.scala.html | 17 +++++++++++++++++
 35 files changed, 591 insertions(+)
----------------------------------------------------------------------



[50/50] [abbrv] incubator-cmda git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-cmda

Posted by xi...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-cmda


Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/31ee6e7e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/31ee6e7e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/31ee6e7e

Branch: refs/heads/master
Commit: 31ee6e7e46212e637d6bcca594c128c36c5a643c
Parents: 860ca07 564f269
Author: cmusv-sc <cm...@gmail.com>
Authored: Fri Sep 4 17:19:27 2015 -0700
Committer: cmusv-sc <cm...@gmail.com>
Committed: Fri Sep 4 17:19:27 2015 -0700

----------------------------------------------------------------------

----------------------------------------------------------------------



[08/50] [abbrv] incubator-cmda git commit: Remove all sensor things

Posted by xi...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/app/views/registration/registrationForm.scala.html
----------------------------------------------------------------------
diff --git a/app/views/registration/registrationForm.scala.html b/app/views/registration/registrationForm.scala.html
deleted file mode 100644
index e0187c6..0000000
--- a/app/views/registration/registrationForm.scala.html
+++ /dev/null
@@ -1,48 +0,0 @@
-@(userForm: Form[NasaRegistration])
-@import helper._
-@import helper.twitterBootstrap._
-@main("Nasa User Registration Form"){
-
-
-
-    <div class="clearfix  " id="name_field">
-       
-                    
-    <legend>Registration Form</legend>
-    @helper.form(action = routes.NasaRegistrationController.submit()){
-    <fieldset>
-    @helper.inputText(userForm("userNameField"),'_label -> "User Name*")
-    @helper.inputPassword(userForm("passwordField"), '_label -> "Password*")
-    @helper.inputText(userForm("fNameField"), '_label -> "First Name*")
-    @helper.inputText(userForm("mNameField"), '_label -> "Middle Name")
-    @helper.inputText(userForm("lNameField"), '_label -> "Last Name")
-
-    @textarea(
-                userForm("affliationField"), 
-                '_label -> "Affliation", 'cols -> 50, 'rows -> 5
-            )
-    @helper.inputText(userForm("emailField"), '_label -> "Email")
-    @helper.inputText(userForm("rAreaField"),  '_label -> "Research Area")
-    @textarea(
-                userForm("goalField"), 
-                '_label -> "Goal", 'cols -> 50, 'rows -> 5
-            )
-    @helper.inputText(userForm("algoField"), '_label -> "Algo")
-        @textarea(
-                userForm("bConcernsField"), 
-                '_label -> "Budget Concerns", 'cols -> 50, 'rows -> 5
-            )
-    
-    @select(
-                userForm("awsFamiliarityField"), 
-                options = options(NasaAWSFamiliarity.list),
-                '_default -> "--- AWS Familiarity ---",
-                '_label -> "AWS Familarity",
-                '_error -> userForm("profile.country").error.map(_.withMessage("Please select your country"))
-            )
-    <input type="submit" class="btn btn-primary" value="Register">
-    <fieldset>
-    </div>
-}
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/app/views/registration/submit.scala.html
----------------------------------------------------------------------
diff --git a/app/views/registration/submit.scala.html b/app/views/registration/submit.scala.html
deleted file mode 100644
index 22f009b..0000000
--- a/app/views/registration/submit.scala.html
+++ /dev/null
@@ -1,5 +0,0 @@
-@(created: NasaRegistration)
-@main("Example"){
-	@created.firstName
-	
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/app/views/registration/updateForm.scala.html
----------------------------------------------------------------------
diff --git a/app/views/registration/updateForm.scala.html b/app/views/registration/updateForm.scala.html
deleted file mode 100644
index 1138428..0000000
--- a/app/views/registration/updateForm.scala.html
+++ /dev/null
@@ -1,48 +0,0 @@
-@(userForm: Form[NasaRegistration])
-@import helper._
-@import helper.twitterBootstrap._
-@main("Nasa Update Form"){
-
-
-
-    <div class="clearfix  " id="name_field">
-       
-                    
-    <legend>User Update Form</legend>
-    @helper.form(action = routes.NasaRegistrationController.update()){
-    <fieldset>
-    @helper.inputText(userForm("userNameField"),'_label -> "User Name*")
-    @helper.inputPassword(userForm("passwordField"), '_label -> "Password*")
-    @helper.inputText(userForm("fNameField"), '_label -> "First Name*")
-    @helper.inputText(userForm("mNameField"), '_label -> "Middle Name")
-    @helper.inputText(userForm("lNameField"), '_label -> "Last Name")
-
-    @textarea(
-                userForm("affliationField"), 
-                '_label -> "Affliation", 'cols -> 50, 'rows -> 5
-            )
-    @helper.inputText(userForm("emailField"), '_label -> "Email")
-    @helper.inputText(userForm("rAreaField"),  '_label -> "Research Area")
-    @textarea(
-                userForm("goalField"), 
-                '_label -> "Goal", 'cols -> 50, 'rows -> 5
-            )
-    @helper.inputText(userForm("algoField"), '_label -> "Algo")
-        @textarea(
-                userForm("bConcernsField"), 
-                '_label -> "Budget Concerns", 'cols -> 50, 'rows -> 5
-            )
-    
-    @select(
-                userForm("awsFamiliarityField"), 
-                options = options(NasaAWSFamiliarity.list),
-                '_default -> "--- AWS Familiarity ---",
-                '_label -> "AWS Familarity",
-                '_error -> userForm("profile.country").error.map(_.withMessage("Please select your country"))
-            )
-    <input type="submit" class="btn btn-primary" value="Update">
-    <fieldset>
-    </div>
-}
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/2d375c56/conf/routes
----------------------------------------------------------------------
diff --git a/conf/routes b/conf/routes
index 5761ab6..027434f 100644
--- a/conf/routes
+++ b/conf/routes
@@ -39,33 +39,9 @@ GET         /assets/*file                                        controllers.Ass
 GET         /aboutus                                             controllers.AboutusController.aboutus()
 GET         /aboutProject                                        controllers.AboutusController.aboutProject()
 
-
-# Estimator recommendation
-GET         /estimator                                           controllers.EstimateController.estimate(email ?= null, vfile ?= null, dataset ?= null)
-GET         /estimator/tutorial                                  controllers.EstimateController.tutorial()
-GET         /estimator/login                                     controllers.EstimateController.login()
-POST        /estimator/login                                     controllers.EstimateController.authenticate()
-GET         /estimator/logout                                    controllers.EstimateController.logout()
-GET         /estimator/accountSummary                            controllers.EstimateController.accountSummary(userName ?= null)
-
-# Estimator Registration
-GET         /scientist/register                                  controllers.NasaRegistrationController.registrationForm()
-POST        /scientist/register/publish                          controllers.NasaRegistrationController.submit()
-GET         /scientist/updateUser                                controllers.NasaRegistrationController.updateForm()
-POST        /estimator/updateUser/update                         controllers.NasaRegistrationController.update()
-GET         /scientist/deleteUser                                controllers.NasaRegistrationController.deleteForm()
-POST        /scientist/deleteUser/delete                         controllers.NasaRegistrationController.delete()
-GET         /estimator/adminPage                                 controllers.NasaRegistrationController.adminPage()
-GET			/scientist/allUsers									 controllers.NasaRegistrationController.getAllUsers()
-GET		    /scientist/addUser									 controllers.NasaRegistrationController.addUser()
-GET      	/scientist/addUserForm 								 controllers.NasaRegistrationController.addUserForm()
-
 # Climate Model
 GET		/climate			controllers.ClimateServiceController.home(email ?= null, vfile ?= null, dataset ?= null)
 GET		/climate/tutorial		controllers.ClimateServiceController.tutorial()
-GET		/climate/login		controllers.ClimateServiceController.login()
-POST    /climate/login        controllers.ClimateServiceController.authenticate()
-GET     /climate/logout       controllers.ClimateServiceController.logout()
 GET		/climate/accountSummary		controllers.ClimateServiceController.accountSummary(userName ?= null)
 GET		/climate/climateServices	controllers.ClimateServiceController.climateServices()
 GET		/climate/mostRecentlyAddedClimateServices	controllers.ClimateServiceController.mostRecentlyAddedClimateServices()


[45/50] [abbrv] incubator-cmda git commit: Change DatasetController name

Posted by xi...@apache.org.
Change DatasetController name

Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/f6aa0322
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/f6aa0322
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/f6aa0322

Branch: refs/heads/master
Commit: f6aa0322711640d9e1e6b78dd828a26e863790fa
Parents: a4768f3
Author: mingqi830 <mq...@andrew.cmu.edu>
Authored: Fri Sep 4 16:32:45 2015 -0700
Committer: mingqi830 <mq...@andrew.cmu.edu>
Committed: Fri Sep 4 16:32:45 2015 -0700

----------------------------------------------------------------------
 app/controllers/DatasetController.java     | 111 ++++++++++++++++++++++++
 app/controllers/dataSetController.java     | 111 ------------------------
 app/views/climate/header.scala.html        |   4 +-
 app/views/climate/searchDataSet.scala.html |   2 +-
 conf/routes                                |   6 +-
 5 files changed, 117 insertions(+), 117 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/f6aa0322/app/controllers/DatasetController.java
----------------------------------------------------------------------
diff --git a/app/controllers/DatasetController.java b/app/controllers/DatasetController.java
new file mode 100644
index 0000000..0a226b6
--- /dev/null
+++ b/app/controllers/DatasetController.java
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package controllers;
+
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import models.DataSet;
+import play.data.Form;
+import play.libs.Json;
+import play.mvc.Controller;
+import play.mvc.Result;
+import util.APICall;
+import util.APICall.ResponseType;
+import views.html.climate.*;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+public class DatasetController extends Controller{
+	final static Form<DataSet> dataSetForm = Form
+			.form(DataSet.class);
+	
+	public static Result datasetList() {
+		return ok(dataSetList.render(DataSet.all(),
+				dataSetForm));
+	}
+	
+	public static Result searchDataset(){
+		return ok(searchDataSet.render(dataSetForm));
+	}
+	
+	public static Result getSearchResult(){
+		Form<DataSet> dc = dataSetForm.bindFromRequest();
+		ObjectNode jsonData = Json.newObject();
+		String dataSetName = "";
+		String agency = "";
+		String instrument = "";
+		String physicalVariable = "";
+		String gridDimension = "";
+		String startTime = "";
+		String endTime = "";
+		Date dataSetStartTime = new Date(0), dataSetEndTime = new Date();
+		
+		try {
+			dataSetName = dc.field("Dataset Name").value();
+			agency = dc.field("Agency").value();
+			instrument = dc.field("Instrument").value();
+			physicalVariable = dc.field("Physical Variable").value();
+			gridDimension = dc.field("Grid Dimension").value();
+			startTime = dc.field("Dataset Start Time").value();
+			endTime = dc.field("Dataset End Time").value();
+			SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMM");
+			
+			if (!startTime.isEmpty()) {
+				try {
+					dataSetStartTime = simpleDateFormat.parse(startTime);
+					Date min = new Date(0);
+					Date max = new Date();
+					if (dataSetStartTime.before(min)) {
+						dataSetStartTime = min;
+					} else if (dataSetStartTime.after(max)) {
+						dataSetStartTime = max;
+					}
+				} catch (ParseException e) {
+					System.out.println("Wrong Date Format :" + startTime);
+					return badRequest("Wrong Date Format :" + startTime);
+				}
+			}
+			
+			if (!endTime.isEmpty()) {
+				try {
+					dataSetEndTime = simpleDateFormat.parse(endTime);
+					Date min = new Date(0);
+					Date max = new Date();
+					if (dataSetEndTime.before(min)) {
+						dataSetEndTime = min;
+					}
+					else if (dataSetEndTime.after(max)) {
+						dataSetEndTime = max;
+					}
+				} catch (ParseException e) {
+					System.out.println("Wrong Date Format :" + endTime);
+					return badRequest("Wrong Date Format :" + endTime);
+				}
+			}
+		} catch (IllegalStateException e) {
+			e.printStackTrace();
+			Application.flashMsg(APICall
+					.createResponse(ResponseType.CONVERSIONERROR));
+		} catch (Exception e) {
+			e.printStackTrace();
+			Application.flashMsg(APICall.createResponse(ResponseType.UNKNOWN));
+		}
+		List<DataSet> response = DataSet.queryDataSet(dataSetName, agency, instrument, physicalVariable, gridDimension, dataSetStartTime, dataSetEndTime);
+		return ok(dataSetList.render(response, dataSetForm));
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/f6aa0322/app/controllers/dataSetController.java
----------------------------------------------------------------------
diff --git a/app/controllers/dataSetController.java b/app/controllers/dataSetController.java
deleted file mode 100644
index 2289ab9..0000000
--- a/app/controllers/dataSetController.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package controllers;
-
-import com.fasterxml.jackson.databind.node.ObjectNode;
-import models.DataSet;
-import play.data.Form;
-import play.libs.Json;
-import play.mvc.Controller;
-import play.mvc.Result;
-import util.APICall;
-import util.APICall.ResponseType;
-import views.html.climate.*;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.*;
-
-public class dataSetController extends Controller{
-	final static Form<DataSet> dataSetForm = Form
-			.form(DataSet.class);
-	
-	public static Result datasetList() {
-		return ok(dataSetList.render(DataSet.all(),
-				dataSetForm));
-	}
-	
-	public static Result searchDataset(){
-		return ok(searchDataSet.render(dataSetForm));
-	}
-	
-	public static Result getSearchResult(){
-		Form<DataSet> dc = dataSetForm.bindFromRequest();
-		ObjectNode jsonData = Json.newObject();
-		String dataSetName = "";
-		String agency = "";
-		String instrument = "";
-		String physicalVariable = "";
-		String gridDimension = "";
-		String startTime = "";
-		String endTime = "";
-		Date dataSetStartTime = new Date(0), dataSetEndTime = new Date();
-		
-		try {
-			dataSetName = dc.field("Dataset Name").value();
-			agency = dc.field("Agency").value();
-			instrument = dc.field("Instrument").value();
-			physicalVariable = dc.field("Physical Variable").value();
-			gridDimension = dc.field("Grid Dimension").value();
-			startTime = dc.field("Dataset Start Time").value();
-			endTime = dc.field("Dataset End Time").value();
-			SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMM");
-			
-			if (!startTime.isEmpty()) {
-				try {
-					dataSetStartTime = simpleDateFormat.parse(startTime);
-					Date min = new Date(0);
-					Date max = new Date();
-					if (dataSetStartTime.before(min)) {
-						dataSetStartTime = min;
-					} else if (dataSetStartTime.after(max)) {
-						dataSetStartTime = max;
-					}
-				} catch (ParseException e) {
-					System.out.println("Wrong Date Format :" + startTime);
-					return badRequest("Wrong Date Format :" + startTime);
-				}
-			}
-			
-			if (!endTime.isEmpty()) {
-				try {
-					dataSetEndTime = simpleDateFormat.parse(endTime);
-					Date min = new Date(0);
-					Date max = new Date();
-					if (dataSetEndTime.before(min)) {
-						dataSetEndTime = min;
-					}
-					else if (dataSetEndTime.after(max)) {
-						dataSetEndTime = max;
-					}
-				} catch (ParseException e) {
-					System.out.println("Wrong Date Format :" + endTime);
-					return badRequest("Wrong Date Format :" + endTime);
-				}
-			}
-		} catch (IllegalStateException e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall
-					.createResponse(ResponseType.CONVERSIONERROR));
-		} catch (Exception e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall.createResponse(ResponseType.UNKNOWN));
-		}
-		List<DataSet> response = DataSet.queryDataSet(dataSetName, agency, instrument, physicalVariable, gridDimension, dataSetStartTime, dataSetEndTime);
-		return ok(dataSetList.render(response, dataSetForm));
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/f6aa0322/app/views/climate/header.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/header.scala.html b/app/views/climate/header.scala.html
index d51a38d..0cae470 100644
--- a/app/views/climate/header.scala.html
+++ b/app/views/climate/header.scala.html
@@ -47,8 +47,8 @@
 							class="caret"></b></a>
 						<ul class="dropdown-menu">
 						
-						<li><a href="@routes.dataSetController.datasetList()">Dataset List</a></li>
-						<li><a href="@routes.dataSetController.searchDataset()">Search dataset</a></li>
+						<li><a href="@routes.DatasetController.datasetList()">Dataset List</a></li>
+						<li><a href="@routes.DatasetController.searchDataset()">Search dataset</a></li>
 						</ul>
 					</li>
 					<li class="dropdown"><a href="#"

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/f6aa0322/app/views/climate/searchDataSet.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/searchDataSet.scala.html b/app/views/climate/searchDataSet.scala.html
index 8fb042d..68f260a 100644
--- a/app/views/climate/searchDataSet.scala.html
+++ b/app/views/climate/searchDataSet.scala.html
@@ -508,7 +508,7 @@
 	@flash_message()   
 	 
     <h1 style="margin-left:490px">Search Dataset</h1>
-    @helper.form(routes.dataSetController.getSearchResult()) {
+    @helper.form(routes.DatasetController.getSearchResult()) {
     	<div class="ui-widget col-sm-offset-3 col-sm-7">
     	<div class = "form-group">
     		@inputText(dataSetForm("Dataset Name"), 'class -> "form-control", 'id -> "dataSetName", '_label -> Messages("Dataset Name"), 'placeholder -> "ARGO Ocean Temperature", 'size->70) 

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/f6aa0322/conf/routes
----------------------------------------------------------------------
diff --git a/conf/routes b/conf/routes
index 4d5da4f..f554cae 100644
--- a/conf/routes
+++ b/conf/routes
@@ -48,9 +48,9 @@ POST    	/climate/delete/serviceLog   						controllers.ClimateServiceController
 GET			/climate/oneService									controllers.ClimateServiceController.oneService(url ?= null)
 
 #Keyword search
-GET 		/climate/dataSets									controllers.dataSetController.datasetList()
-GET			/climate/searchDataSet 					 			controllers.dataSetController.searchDataset()
-GET 		/climate/getSearchResult				 			controllers.dataSetController.getSearchResult()
+GET 		/climate/datasets									controllers.DatasetController.datasetList()
+GET			/climate/searchDataSet 					 			controllers.DatasetController.searchDataset()
+GET 		/climate/getSearchResult				 			controllers.DatasetController.getSearchResult()
 
 #Map static resources from the /public folder to the /assets URL path
 GET     	/assets/*file               						controllers.Assets.at(path="/public", file)


[38/50] [abbrv] incubator-cmda git commit: add comment in aboutProject.html

Posted by xi...@apache.org.
add comment in aboutProject.html


Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/73a41cbd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/73a41cbd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/73a41cbd

Branch: refs/heads/master
Commit: 73a41cbdc49210bffa43607795c13fe623a69b28
Parents: 2990a2c
Author: cat1021 <lo...@gmail.com>
Authored: Fri Sep 4 16:22:38 2015 -0700
Committer: cat1021 <lo...@gmail.com>
Committed: Fri Sep 4 16:22:38 2015 -0700

----------------------------------------------------------------------
 app/views/climate/aboutProject.scala.html | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/73a41cbd/app/views/climate/aboutProject.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/aboutProject.scala.html b/app/views/climate/aboutProject.scala.html
index 9857fea..b498dc3 100644
--- a/app/views/climate/aboutProject.scala.html
+++ b/app/views/climate/aboutProject.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+ 
 @(message: String)
 
 @main("About Project") {


[10/50] [abbrv] incubator-cmda git commit: Remove all useless part

Posted by xi...@apache.org.
Remove all useless part

Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/253db35b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/253db35b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/253db35b

Branch: refs/heads/master
Commit: 253db35b2103379eaf09e83e372205556b87f87b
Parents: 2d375c5
Author: mingqi830 <mq...@andrew.cmu.edu>
Authored: Wed Sep 2 16:32:58 2015 -0700
Committer: mingqi830 <mq...@andrew.cmu.edu>
Committed: Wed Sep 2 16:32:58 2015 -0700

----------------------------------------------------------------------
 app/controllers/AccountController.java        |   3 -
 app/controllers/ClimateServiceController.java |   4 -
 app/controllers/KeywordSearchController.java  | 165 ---------------
 app/controllers/dataSetController.java        |   1 -
 app/models/AWSClient.java                     |  44 ----
 app/models/GCMDSearchDataset.java             |  12 --
 app/models/NasaAWSFamiliarity.java            |  35 ----
 app/models/SearchDataset.java                 |  60 ------
 app/models/metadata/NasaRMdata.java           | 225 ---------------------
 app/util/Constants.java                       | 105 ----------
 app/util/EstimatorAPICalls.java               | 121 -----------
 app/util/EstimatorGetValues.java              | 147 --------------
 app/util/NasaConstants.java                   |  37 ----
 app/views/aboutus.scala.html                  |  48 -----
 app/views/climate/accountSummary.scala.html   |  79 --------
 app/views/climate/dataSets.scala.html         |  46 -----
 app/views/climate/datasetSearch.scala.html    |  81 --------
 conf/routes                                   |  16 +-
 18 files changed, 3 insertions(+), 1226 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/253db35b/app/controllers/AccountController.java
----------------------------------------------------------------------
diff --git a/app/controllers/AccountController.java b/app/controllers/AccountController.java
index 426a057..ca5d8c6 100644
--- a/app/controllers/AccountController.java
+++ b/app/controllers/AccountController.java
@@ -43,9 +43,6 @@ public class AccountController extends Controller {
 	final static Form<ServiceLog> serviceLogForm = Form
 			.form(ServiceLog.class);
 
-	public static Result accountSummary(String userName) {
-		return ok(accountSummary.render(userName));
-	}
 
 	public static Result getServiceLog() {
 		return ok(serviceLog.render(ServiceLog.all(),

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/253db35b/app/controllers/ClimateServiceController.java
----------------------------------------------------------------------
diff --git a/app/controllers/ClimateServiceController.java b/app/controllers/ClimateServiceController.java
index 0cd2a54..1a75a3f 100644
--- a/app/controllers/ClimateServiceController.java
+++ b/app/controllers/ClimateServiceController.java
@@ -61,10 +61,6 @@ public class ClimateServiceController extends Controller {
 		return ok(tutorial.render());
 	}
 
-	public static Result accountSummary(String userName) {
-		return ok(accountSummary.render(userName));
-	}
-
 	public static Result climateServices() {
 		return ok(climateServices.render(ClimateService.all(),
 				climateServiceForm));

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/253db35b/app/controllers/KeywordSearchController.java
----------------------------------------------------------------------
diff --git a/app/controllers/KeywordSearchController.java b/app/controllers/KeywordSearchController.java
deleted file mode 100644
index 2211ed9..0000000
--- a/app/controllers/KeywordSearchController.java
+++ /dev/null
@@ -1,165 +0,0 @@
-
-
-package controllers;
-
-
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.node.JsonNodeFactory;
-import com.fasterxml.jackson.databind.node.ObjectNode;
-import com.google.gson.Gson;
-import com.google.gson.reflect.TypeToken;
-
-import models.SearchDataset;
-import play.libs.Json;
-import play.mvc.Controller;
-import play.mvc.Result;
-import scala.Console;
-import util.Constants;
-import views.html.climate.*;
-
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.lang.reflect.Type;
-import java.util.*;
-
-public class KeywordSearchController extends Controller {
-    public static final String ROOT_STRING = "Parameter";
-	public static List<SearchDataset> resultsList = null;
-    private static List<SearchDataset> dataSetList = null;
-	private static Map<String, SearchDataset> dataSetLookupMap = null;
-	public static final Type LIST_TYPE = new TypeToken<ArrayList<SearchDataset>>() {
-	}.getType();
-
-	public static Result searchPage() {
-//        resultsList = null;
-        return ok(views.html.climate.datasetSearch.render("", resultsList, null));
-    }
-
-    public static Result keywordSearch() {
-        // clear the results list
-        resultsList = null;
-
-        String input = request().body().asText();
-        if (input.startsWith("keyword="))
-            input = input.substring("keyword=".length());
-
-//        try {
-//            resultsList = DBQueryClient.getDataIDSingleKeyword(input);
-//
-//        } catch (SQLException e) {
-//            e.printStackTrace();
-//        }
-        try {
-			String jsonStr = HttpHelper.httpGet(Constants.NEW_API_URL + Constants.GET_KEYWORD_SEARCH + input);
-			resultsList = new Gson().fromJson(jsonStr, LIST_TYPE);
-
-        } catch (Exception e) {
-			if (!e.getMessage().equals("Not Found"))
-	            e.printStackTrace();
-        }
-
-        return ok(views.html.climate.datasetSearch.render("", resultsList, null));
-    }
-
-    public static Result selectedKeywordSearch() {
-        // clear the results list
-        resultsList = null;
-        StringBuilder keywordsList = new StringBuilder();
-
-        JsonNode root = request().body().asJson();
-        Iterator<JsonNode> iterator = root.iterator();
-        while (iterator.hasNext())
-        {
-            JsonNode current = iterator.next();
-            if (current.findPath("children").size()==0)
-            {
-                keywordsList.append(current.findPath("text").textValue());
-                keywordsList.append("\t");
-            }
-        }
-
-        if (keywordsList.length() > 0) {
-//            try {
-//    			resultsList = DBQueryClient.getDataIDMultipleKeyword(keywordsList);
-//
-//            } catch (SQLException e) {
-//                e.printStackTrace();
-//            }
-
-            try {
-                String jsonStr = HttpHelper.httpPostText(Constants.NEW_API_URL + Constants.POST_KEYWORD_LIST_SEARCH, keywordsList.toString());
-				resultsList = new Gson().fromJson(jsonStr, LIST_TYPE);
-            } catch (Exception e) {
-                e.printStackTrace();
-            }
-        }
-//        return redirect(routes.KeywordSearchController.displayResult(null));
-        return ok(views.html.climate.datasetSearch.render("", resultsList, null));
-    }
-
-    public static Result displayResult(String data_id) {
-        if (data_id == null)
-            return ok(views.html.climate.datasetSearch.render("", resultsList, null));
-		String url = getURLFromID(data_id);
-        return ok(views.html.climate.datasetSearch.render("", resultsList, url));
-    }
-
-    public static Result getKeywordTree(String id) {
-        JsonNode root = new ObjectNode(JsonNodeFactory.instance);
-        try {
-            root = Json.parse(new FileInputStream("./public/keywords1.json"));
-
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-        return ok(root);
-    }
-
-    public static Result getDataSetList(String data_id) {
-		if (data_id == null)
-			dataSetList = null;		//refresh from DB
-
-		getDataSetList();
-
-		String url = null;
-		if (data_id != null)
-			url = getURLFromID(data_id);
-		return ok(views.html.climate.dataSets.render(dataSetList, url));
-	}
-
-	public static List<SearchDataset> getDataSetList() {
-		if (dataSetList == null) {
-			try {
-				Console.print("aaa"+Constants.NEW_API_URL + Constants.GET_DATASETLIST);
-				String jsonStr = HttpHelper.httpGet(Constants.NEW_API_URL + Constants.GET_DATASETLIST);
-				
-				dataSetList = new Gson().fromJson(jsonStr, LIST_TYPE);
-
-				//For easy lookups
-				dataSetLookupMap = new HashMap<String, SearchDataset>();
-				for (SearchDataset ds : dataSetList)
-				{
-					dataSetLookupMap.put(ds.getData_id(), ds);
-				}
-			} catch (Exception e) {
-				e.printStackTrace();
-			}
-		}
-		return dataSetList;
-	}
-
-	public static SearchDataset getCachedDatasetFromID(String id)
-	{
-		if (getDataSetList() != null)
-			return dataSetLookupMap.get(id);
-
-		return null;
-	}
-
-	public static String getURLFromID(String id)
-	{
-		getDataSetList();
-		return dataSetLookupMap.get(id).getUrl();
-	}
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/253db35b/app/controllers/dataSetController.java
----------------------------------------------------------------------
diff --git a/app/controllers/dataSetController.java b/app/controllers/dataSetController.java
index 48353e5..fce03a0 100644
--- a/app/controllers/dataSetController.java
+++ b/app/controllers/dataSetController.java
@@ -6,7 +6,6 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
 
-import models.SearchDataset;
 import models.DataSet;
 import models.metadata.ClimateService;
 import models.metadata.ServiceLog;

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/253db35b/app/models/AWSClient.java
----------------------------------------------------------------------
diff --git a/app/models/AWSClient.java b/app/models/AWSClient.java
deleted file mode 100644
index adba461..0000000
--- a/app/models/AWSClient.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package models;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-
-import com.amazonaws.auth.AWSCredentials;
-import com.amazonaws.auth.BasicAWSCredentials;
-import com.amazonaws.auth.ClasspathPropertiesFileCredentialsProvider;
-import com.amazonaws.auth.PropertiesCredentials;
-import com.amazonaws.services.s3.AmazonS3;
-import com.amazonaws.services.s3.AmazonS3Client;
-import com.amazonaws.services.s3.model.PutObjectRequest;
-import com.amazonaws.regions.Region;
-import com.amazonaws.regions.Regions;
-
-public class AWSClient {
-	private final static String s3Bucket = "einstein-workflows";
-	private static AmazonS3 s3;
-
-	private AWSClient() {
-	}
-
-	private static AmazonS3 connect() {
-		String workingDir = System.getProperty("user.dir");
-		File properties=new File("./AwsCredentials.properties");
-        try {
-			s3 = new AmazonS3Client(new PropertiesCredentials(properties));
-		} catch (Exception e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
-		Region usWest1 = Region.getRegion(Regions.US_WEST_1);
-		s3.setRegion(usWest1);
-		return s3;
-	}
-	
-	public static void upload(File file,String fileName){
-		if(s3==null){
-			s3=connect();
-		}
-		s3.putObject(new PutObjectRequest(s3Bucket,fileName, file));
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/253db35b/app/models/GCMDSearchDataset.java
----------------------------------------------------------------------
diff --git a/app/models/GCMDSearchDataset.java b/app/models/GCMDSearchDataset.java
deleted file mode 100644
index fe50834..0000000
--- a/app/models/GCMDSearchDataset.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package models;
-
-/**
- * Created by raoli on 24-Nov-14.
- */
-public class GCMDSearchDataset extends SearchDataset {
-	@Override
-	public String getUrl(){
-		return "http://gcmd.nasa.gov/r/d/"+this.getData_id();
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/253db35b/app/models/NasaAWSFamiliarity.java
----------------------------------------------------------------------
diff --git a/app/models/NasaAWSFamiliarity.java b/app/models/NasaAWSFamiliarity.java
deleted file mode 100644
index b116c4d..0000000
--- a/app/models/NasaAWSFamiliarity.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2013 Carnegie Mellon University Silicon Valley. 
- * All rights reserved. 
- * 
- * This program and the accompanying materials are made available
- * under the terms of dual licensing(GPL V2 for Research/Education
- * purposes). GNU Public License v2.0 which accompanies this distribution
- * is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
- * 
- * Please contact http://www.cmu.edu/silicon-valley/ if you have any 
- * questions.
- * 
- * */
-
-
-
-package models;
-
-import java.util.*;
-
-public class NasaAWSFamiliarity {
-    
-    public static List<String> list() {
-        List<String> all = new ArrayList<String>();
-        all.add("Beginner");
-        all.add("Proficient");
-        all.add("Expert");
-        
-        return all;
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/253db35b/app/models/SearchDataset.java
----------------------------------------------------------------------
diff --git a/app/models/SearchDataset.java b/app/models/SearchDataset.java
deleted file mode 100644
index 4460359..0000000
--- a/app/models/SearchDataset.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package models;
-
-public class SearchDataset implements Comparable<SearchDataset> {
-	private String data_id;
-	private String keyword;
-	private String url;
-	private String description;
-	private String title;
-
-	public String getData_id() {
-		return data_id;
-	}
-
-	public void setData_id(String data_id) {
-		this.data_id = data_id;
-	}
-
-	public String getKeyword() {
-		return keyword;
-	}
-
-	public void setKeyword(String keyword) {
-		this.keyword = keyword;
-	}
-
-	public String getUrl() {
-		if (url == null)
-			return "http://gcmd.nasa.gov/r/d/" + data_id;
-
-		return url;
-	}
-
-	public void setUrl(String url) {
-		this.url = url;
-	}
-
-	public String getDescription() {
-		return description;
-	}
-
-	public void setDescription(String description) {
-		this.description = description;
-	}
-
-	public String getTitle() {
-		if (title != null)
-			return title;
-		else
-			return data_id;
-	}
-
-	public void setTitle(String title) {
-		this.title = title;
-	}
-
-	@Override
-	public int compareTo(SearchDataset o) {
-		return (this.getData_id().compareTo(o.getData_id()));
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/253db35b/app/models/metadata/NasaRMdata.java
----------------------------------------------------------------------
diff --git a/app/models/metadata/NasaRMdata.java b/app/models/metadata/NasaRMdata.java
deleted file mode 100644
index 0407bb4..0000000
--- a/app/models/metadata/NasaRMdata.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * Copyright (c) 2013 Carnegie Mellon University Silicon Valley. 
- * All rights reserved. 
- * 
- * This program and the accompanying materials are made available
- * under the terms of dual licensing(GPL V2 for Research/Education
- * purposes). GNU Public License v2.0 which accompanies this distribution
- * is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
- * 
- * Please contact http://www.cmu.edu/silicon-valley/ if you have any 
- * questions.
- * 
- * */
-package models.metadata;
-
-import java.util.*;
-import util.APICall;
-import com.fasterxml.jackson.databind.*;
-
-public class NasaRMdata {
-
-	private String userNameField;
-	private String passwordField;
-	private String fNameField;
-	private String lNameField;
-	private String mNameField;
-	private String affliationField;
-	private String emailField;
-	private String rAreaField;
-	private String goalField;
-	private String algoField;
-	private String bConcernsField;
-	private String awsFamiliarityField;
-
-	private List<String> sensorTypeNames = new ArrayList<String>();
-
-	// http://einstein.sv.cmu.edu/get_devices/json
-	private static final String ADD_NEW_USER_URL = util.NasaConstants.NASA_REG_URL
-			+ util.NasaConstants.ADD_USER;
-	private static final String GET_ALL_USER_DATA = "http://einstein.sv.cmu.edu:9000/getAllContestUsers/json";
-
-	private static final String DELETE_USER_URL = util.NasaConstants.NASA_REG_URL
-			+ util.NasaConstants.DELETE_USER;
-
-	// Constructors
-	public NasaRMdata() {
-	}
-
-	public NasaRMdata(String userNameField, String passwordField,
-			String fNameField, String lNameField, String mNameField,
-			String affliationField, String emailField, String rAreaField,
-			String goalField, String algoField, String bConcernsField,
-			String awsFamiliarityField) {
-		super();
-		this.userNameField = userNameField;
-		this.passwordField = passwordField;
-		this.fNameField = fNameField;
-		this.lNameField = lNameField;
-		this.mNameField = mNameField;
-		this.affliationField = affliationField;
-		this.emailField = emailField;
-		this.rAreaField = rAreaField;
-		this.goalField = goalField;
-		this.algoField = algoField;
-		this.bConcernsField = bConcernsField;
-		this.awsFamiliarityField = awsFamiliarityField;
-	}
-
-	
-
-	public String getUserNameField() {
-		return userNameField;
-	}
-
-	public void setUserNameField(String userNameField) {
-		this.userNameField = userNameField;
-	}
-
-	public String getPasswordField() {
-		return passwordField;
-	}
-
-	public void setPasswordField(String passwordField) {
-		this.passwordField = passwordField;
-	}
-
-	public String getfNameField() {
-		return fNameField;
-	}
-
-	public void setfNameField(String fNameField) {
-		this.fNameField = fNameField;
-	}
-
-	public String getlNameField() {
-		return lNameField;
-	}
-
-	public void setlNameField(String lNameField) {
-		this.lNameField = lNameField;
-	}
-
-	public String getmNameField() {
-		return mNameField;
-	}
-
-	public void setmNameField(String mNameField) {
-		this.mNameField = mNameField;
-	}
-
-	public String getAffliationField() {
-		return affliationField;
-	}
-
-	public void setAffliationField(String affliationField) {
-		this.affliationField = affliationField;
-	}
-
-	public String getEmailField() {
-		return emailField;
-	}
-
-	public void setEmailField(String emailField) {
-		this.emailField = emailField;
-	}
-
-	public String getrAreaField() {
-		return rAreaField;
-	}
-
-	public void setrAreaField(String rAreaField) {
-		this.rAreaField = rAreaField;
-	}
-
-	public String getGoalField() {
-		return goalField;
-	}
-
-	public void setGoalField(String goalField) {
-		this.goalField = goalField;
-	}
-
-	public String getAlgoField() {
-		return algoField;
-	}
-
-	public void setAlgoField(String algoField) {
-		this.algoField = algoField;
-	}
-
-	public String getbConcernsField() {
-		return bConcernsField;
-	}
-
-	public void setbConcernsField(String bConcernsField) {
-		this.bConcernsField = bConcernsField;
-	}
-
-	public String getAwsFamiliarityField() {
-		return awsFamiliarityField;
-	}
-
-	public void setAwsFamiliarityField(String awsFamiliarityField) {
-		this.awsFamiliarityField = awsFamiliarityField;
-	}
-
-	public List<String> getSensorTypeNames() {
-		return sensorTypeNames;
-	}
-
-	public void setSensorTypeNames(List<String> sensorTypeNames) {
-		this.sensorTypeNames = sensorTypeNames;
-	}
-
-	/**
-	 * Method to call the API to add a new device type
-	 * 
-	 * @param jsonData
-	 * @return the response json from the API server
-	 */
-	public static JsonNode create(JsonNode jsonData) {
-		return APICall.postAPI(ADD_NEW_USER_URL, jsonData);
-	}
-
-	/**
-	 * Method to call the API to delete a device type with its id
-	 * 
-	 * @param id
-	 * @return the response json from the API server
-	 */
-	public static JsonNode delete(String deviceTypeName) {
-		return APICall.deleteAPI(DELETE_USER_URL + deviceTypeName);
-	}
-
-	public static List<NasaRMdata> all() {
-		List<NasaRMdata> allUsers = new ArrayList<NasaRMdata>();
-
-		// Call the API to get the json string
-		JsonNode usersNode = APICall.callAPI(GET_ALL_USER_DATA);
-
-		// if no value is returned or error or is not json array
-		if (usersNode == null || usersNode.has("error") || !usersNode.isArray()) {
-			return allUsers;
-		}
-
-		// parse the json string into object
-		for (int i = 0; i < usersNode.size(); i++) {
-			JsonNode json = usersNode.path(i);
-			NasaRMdata newUser = new NasaRMdata();
-
-			newUser.setUserNameField(json.findPath("userName").asText());
-			newUser.setPasswordField(json.findPath("password").asText());
-			newUser.setfNameField(json.findPath("firstName").asText());
-			
-			allUsers.add(newUser);
-		}
-
-		return allUsers;
-
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/253db35b/app/util/Constants.java
----------------------------------------------------------------------
diff --git a/app/util/Constants.java b/app/util/Constants.java
index fabf8d8..51a72d5 100644
--- a/app/util/Constants.java
+++ b/app/util/Constants.java
@@ -18,126 +18,21 @@ package util;
 
 public class Constants {
 
-	// TO DO: Read all the constant variables from a configuration file
-
-//	// API URL
-//	public static final String API_URL = "http://einstein.sv.cmu.edu/";
-//
-//	// API Call format
-//	public static final String FORMAT = "json";
-
-//	// Get sensor types action
-//	public static final String GET_SENSOR_TYPES = "get_all_sensor_types/";
-//
-//	// Get devices action
-//	public static final String GET_DEVICES = "get_devices/";
-//
-//	// Get sensors action
-//	public static final String GET_SENSORS = "get_sensors/";
-//
-//	// Get device types action
-//	public static final String GET_DEVICE_TYPES = "get_device_types/";
-//
-//	// NOT IMPLEMENTED!!
-//	// Get device agents action
-//	public static final String GET_DEVICE_AGENTS = "get_device_agents/";
-//
-//	// delete a sensor type
-//	public static final String DELETE_SENSOR_TYPE = "delete_sensor_type/";
-//	// delete a sensor
-//	public static final String DELETE_SENSOR = "delete_sensor/";
-//	// delete a device type
-//	public static final String DELETE_DEVICE_TYPE = "delete_device_type/";
-//	// delete a device
-//	public static final String DELETE_DEVICE = "delete_device/";
-//
-//	// create a sensor type
-//	public static final String ADD_SENSOR_TYPE = "add_sensor_type";
-//	// create a device type
-//	public static final String ADD_DEVICE_TYPE = "add_device_type";
-//	// create a device
-//	public static final String ADD_DEVICE = "add_device";
-//	// create a sensor
-//	public static final String ADD_SENSOR = "add_sensor";
-//
-//	// get latest device readings
-//	public static final String GET_LATEST_DEVICE_READINGS = "lastest_readings_from_all_devices/temp/";
-
-	// all device ids
-//	public static final String[] DEVICE_IDS = { "17000001#Mobile test unit",
-//			"17010001#Mobile test unit", "17020001#Mobile test unit",
-//			"17030001#Mobile test unit", "17010002#Room 129A",
-//			"17020006#Room 215B", "17020007#Room 215", "17020008#Room 217A",
-//			"17020009#Room 217B", "17030009#Room 121B", "17020005#Room 214B",
-//			"1703000a#Room 121", "1703000b#Room 208", "17030005#Room 126",
-//			"17030006#Room 124", "17000008#Room 212", "17030007#Room 122",
-//			"17000009#Room 210", "17030008#Room 120", "17000007#Room 211",
-//			"17010003#Room 129", "17000002#Room 115", "17000003#Room 116",
-//			"17000004#Room 110", "17000005#Room 109", "17000006#Room 107",
-//			"17010004#Room 230", "17010005#Room 228", "17010006#Room 229",
-//			"17020002#Room 216", "17020003#Room 213", "17020004#Room 214",
-//			"17030002#Room 105B", "17030003#Room 104", "17030004#Room 123" };
-
-	/*
-	 * Starting here is the migration from calling API1.1 to API1.3
-	 */
-
 	// API 1.3 URL
 	public static final String NEW_API_URL = "http://localhost:9033/";
 
 	// API Call format
 	public static final String FORMAT = "json";
 	
-	// sensor type
-	public static final String NEW_GET_SENSOR_TYPES = "getAllSensorTypes/";
-	public static final String NEW_ADD_SENSOR_TYPE = "addSensorType";
-	public static final String NEW_DELETE_SENSOR_TYPE = "deleteSensorType/";
-	public static final String NEW_EDIT_SENSOR_TYPE = "updateSensorType";
-
-	// sensor
-	public static final String NEW_GET_SENSORS = "getAllSensors/";
-	public static final String NEW_ADD_SENSOR = "addSensor";
-	public static final String NEW_DELETE_SENSOR = "deleteSensor/";
-	public static final String NEW_EDIT_SENSOR = "updateSensor";
-	
-	// device type
-	public static final String NEW_GET_DEVICE_TYPES = "getAllDeviceTypes/";
-	public static final String NEW_ADD_DEVICE_TYPE = "addDeviceType";
-	public static final String NEW_DELETE_DEVICE_TYPE = "deleteDeviceType/"; 
-	public static final String NEW_EDIT_DEVICE_TYPE = "updateDeviceType/"; // add the trailing slash!
-
-	// device
-	public static final String NEW_GET_DEVICES = "getAllDevices/";
-	public static final String NEW_ADD_DEVICE = "addDevice";
-	public static final String NEW_DELETE_DEVICE = "deleteDevice/";
-	public static final String NEW_EDIT_DEVICE = "updateDevice/"; // add the trailing slash!
-
-	// sensor category
-	public static final String NEW_GET_SENSOR_CATEGORY = "getAllSensorCategories/";
-	public static final String NEW_ADD_SENSOR_CATEGORY = "addSensorCategory";
-	public static final String NEW_DELETE_SENSOR_CATEGORY = "deleteSensorCategory/";
-	public static final String NEW_EDIT_SENSOR_CATEGORY = "updateSensorCategory";
-	
 	// climate service
 	public static final String NEW_GET_CLIMATE_SERVICE = "getAllClimateServices/";
 	public static final String NEW_ADD_CLIMATE_SERVICE = "addClimateService";
 	public static final String NEW_DELETE_CLIMATE_SERVICE = "climateService/deleteClimateService/id/";
 	public static final String NEW_EDIT_CLIMATE_SERVICE = "updateClimateService";
 	
-	// get last minute reading from all devices
-	// Caution! Now it calls System.currentTimeMillis(), it is not a pure constant
-	public static final String NEW_GET_LAST_MINUTE_DEVICE_READINGS = "getLastMinuteReadingsFromAllDevices/";
-
-	// get sensor reading 
-	public static final String NEW_GET_SENSOR_READING_IN_RANGE = "getSensorReadingInRange/"; 
-	public static final String NEW_GET_SENSOR_READING = "getSensorReading/"; 
-	public static final String NEW_GET_LATEST_SENSOR_READING_IN_ALL_DEVICES ="getLatestReadingsFromAllDevices/";
-	
 	//service log
 	public static final String NEW_GET_A_SERVICE_LOG = "getServiceExecutionLogs/";
 
-    public static final String GET_KEYWORD_SEARCH ="getGCMDDatasetByKeyword/";
-    public static final String POST_KEYWORD_LIST_SEARCH ="getGCMDDatasetByKeywordList/";
     public static final String GET_DATASETLIST ="getDatasetList/";
 
 	//New backend API (MySQL database)

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/253db35b/app/util/EstimatorAPICalls.java
----------------------------------------------------------------------
diff --git a/app/util/EstimatorAPICalls.java b/app/util/EstimatorAPICalls.java
deleted file mode 100644
index c6ffd2e..0000000
--- a/app/util/EstimatorAPICalls.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright (c) 2013 Carnegie Mellon University Silicon Valley. 
- * All rights reserved. 
- * 
- * This program and the accompanying materials are made available
- * under the terms of dual licensing(GPL V2 for Research/Education
- * purposes). GNU Public License v2.0 which accompanies this distribution
- * is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
- * 
- * Please contact http://www.cmu.edu/silicon-valley/ if you have any 
- * questions.
- * 
- * */
-
-
-
-package util;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import com.google.gson.JsonObject;
-
-public class EstimatorAPICalls {
-	public static String HttpUserReg(String urlStr, JsonObject jsonObj, String operation)
-			throws Exception {
-		// String URLStr = "http://einstein.sv.cmu.edu:9000/addContestUser";
-
-		if (operation.equals("delete")) {
-			System.out.println("Reached inside delete nasa");
-			return httpDelNasaRegistration(urlStr);
-		} else {
-			System.out.println("Reached inside post nasa");
-			return httpPostNasaRegistration(urlStr, jsonObj.toString());
-		}
-	}
-
-	public static String httpPostNasaRegistration(String urlStr,
-			String jsonString) throws Exception {
-		URL url = new URL(urlStr);
-		HttpURLConnection conn = (HttpURLConnection) url.openConnection();
-		conn.setRequestMethod("POST");
-		conn.setRequestProperty("Content-Type", "application/json");
-		conn.setRequestProperty("Accept", "application/json");
-		conn.setDoOutput(true);
-
-		// Create the form content
-		OutputStream out = conn.getOutputStream();
-		Writer writer = new OutputStreamWriter(out, "UTF-8");
-
-		writer.write(jsonString);
-
-		writer.close();
-		out.close();
-		System.out.println("response code:" + conn.getResponseMessage());
-		if (conn.getResponseCode() != 200) {
-			System.out.println("Custom Error:" + conn.getResponseCode());
-			throw new IOException(conn.getResponseMessage());
-		}
-
-		// Buffer the result into a string
-		BufferedReader rd = new BufferedReader(new InputStreamReader(
-				conn.getInputStream()));
-		StringBuilder sb = new StringBuilder();
-		String line;
-		while ((line = rd.readLine()) != null) {
-			sb.append(line);
-		}
-		rd.close();
-
-		conn.disconnect();
-		return sb.toString();
-	}
-
-	public static String httpDelNasaRegistration(String urlStr)
-			throws Exception {
-		URL url = new URL(urlStr);
-		HttpURLConnection conn = (HttpURLConnection) url.openConnection();
-		conn.setRequestMethod("DELETE");
-		// conn.setRequestProperty("Content-Type", "application/json");
-		// conn.setRequestProperty("Accept", "application/json");
-		conn.setDoOutput(true);
-
-		conn.connect();
-		/*
-		 * // Create the form content OutputStream out = conn.getOutputStream();
-		 * Writer writer = new OutputStreamWriter(out, "UTF-8");
-		 * 
-		 * writer.write(jsonString);
-		 * 
-		 * writer.close(); out.close();
-		 */
-		System.out.println("response code:" + conn.getResponseMessage());
-		if (conn.getResponseCode() != 201) {
-			System.out.println("Custom Error:" + conn.getResponseCode());
-			throw new IOException(conn.getResponseMessage());
-		}
-
-		// Buffer the result into a string
-		BufferedReader rd = new BufferedReader(new InputStreamReader(
-				conn.getInputStream()));
-		StringBuilder sb = new StringBuilder();
-		String line;
-		while ((line = rd.readLine()) != null) {
-			sb.append(line);
-		}
-		rd.close();
-
-		conn.disconnect();
-		return sb.toString();
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/253db35b/app/util/EstimatorGetValues.java
----------------------------------------------------------------------
diff --git a/app/util/EstimatorGetValues.java b/app/util/EstimatorGetValues.java
deleted file mode 100644
index 00c9c5b..0000000
--- a/app/util/EstimatorGetValues.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright (c) 2013 Carnegie Mellon University Silicon Valley. 
- * All rights reserved. 
- * 
- * This program and the accompanying materials are made available
- * under the terms of dual licensing(GPL V2 for Research/Education
- * purposes). GNU Public License v2.0 which accompanies this distribution
- * is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
- * 
- * Please contact http://www.cmu.edu/silicon-valley/ if you have any 
- * questions.
- * 
- * */
-
-package util;
-
-import play.data.Form;
-import play.libs.Json;
-import play.mvc.Controller;
-import play.mvc.Result;
-import java.util.*;
-import play.libs.Json;
-import com.google.gson.JsonObject;
-import controllers.Application;
-public class EstimatorGetValues {
-
-/*
- *Declaration of variables
- * */
-	static JsonObject retFormValues = new JsonObject();
-
-
-		public static JsonObject getMode(Map<String, String[]> inputForm, String mode){
-	        
-			
-			JsonObject retJson = new JsonObject();
-			//Checking if it is for submission
-			if(mode.equals("submit")){
-
-				retJson = getSubmit(inputForm);
-			}
-
-			else if(mode.equals("update")){
-				retJson = getUpdate(inputForm);
-			}
-			else if(mode.equals("delete")){
-				retJson = getDelete(inputForm);
-			}
-		return retJson;
-		
-		}
-		/*
-		 *This method is used to retrieve the values of the submit form
-		 * */
-		public static JsonObject getSubmit(Map<String, String[]> subForm){
-			
-		String userNameField = subForm.get("userNameField")[0];
-		String passwordField = subForm.get("passwordField")[0];
-		String fNameField = subForm.get("fNameField")[0];
-		String lNameField = subForm.get("lNameField")[0];
-		String mNameField = subForm.get("mNameField")[0];
-		String affliationField = subForm.get("affliationField")[0];
-		String emailField = subForm.get("emailField")[0];
-		String rAreaField = subForm.get("rAreaField")[0];
-		
-			try {
-
-			retFormValues.addProperty("userName", userNameField);
-			retFormValues.addProperty("password", passwordField);
-			retFormValues.addProperty("firstName", fNameField);
-			retFormValues.addProperty("lastName", lNameField);
-			retFormValues.addProperty("middleName", mNameField);
-			retFormValues.addProperty("affiliation", affliationField);
-			retFormValues.addProperty("email", emailField);
-			retFormValues.addProperty("researchArea", rAreaField);
-//			retFormValues.addProperty("goal", goalField);
-		}
-
-		
-		catch (Exception e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
-
-		return retFormValues;
-		
-}
-		public static JsonObject getUpdate(Map<String, String[]> updateForm){
-			
-		String userNameField = updateForm.get("userNameField")[0];
-		String passwordField = updateForm.get("passwordField")[0];
-		String fNameField = updateForm.get("fNameField")[0];
-		String lNameField = updateForm.get("lNameField")[0];
-		String mNameField = updateForm.get("mNameField")[0];
-		String affliationField = updateForm.get("affliationField")[0];
-		String emailField = updateForm.get("emailField")[0];
-		String rAreaField = updateForm.get("rAreaField")[0];
-		
-			try {
-
-			retFormValues.addProperty("userName", userNameField);
-			retFormValues.addProperty("password", passwordField);
-			retFormValues.addProperty("firstName", fNameField);
-			retFormValues.addProperty("lastName", lNameField);
-			retFormValues.addProperty("middleName", mNameField);
-			retFormValues.addProperty("affiliation", affliationField);
-			retFormValues.addProperty("email", emailField);
-			retFormValues.addProperty("researchArea", rAreaField);		
-		}
-
-		
-		catch (Exception e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
-
-		return retFormValues;
-
-		
-}	
-		public static JsonObject getDelete(Map<String, String[]> delForm){
-			
-		String userNameField = delForm.get("userNameField")[0];
-		String passwordField = delForm.get("passwordField")[0];
-		
-		
-			try {
-
-			retFormValues.addProperty("userName", userNameField);
-			retFormValues.addProperty("password", passwordField);			
-				
-		}
-
-		
-		catch (Exception e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-			
-		}
-
-		return retFormValues;
-}
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/253db35b/app/util/NasaConstants.java
----------------------------------------------------------------------
diff --git a/app/util/NasaConstants.java b/app/util/NasaConstants.java
deleted file mode 100644
index 5401464..0000000
--- a/app/util/NasaConstants.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2013 Carnegie Mellon University Silicon Valley. 
- * All rights reserved. 
- * 
- * This program and the accompanying materials are made available
- * under the terms of dual licensing(GPL V2 for Research/Education
- * purposes). GNU Public License v2.0 which accompanies this distribution
- * is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
- * 
- * Please contact http://www.cmu.edu/silicon-valley/ if you have any 
- * questions.
- * 
- * */
-
-
-
-package util;
-
-public class NasaConstants {
-
-
-
-	/*
-	 * Starting here is the migration from calling API1.1 to API1.3
-	 */
-
-	// API 1.3 URL
-	public static final String NASA_REG_URL = "http://einstein.sv.cmu.edu:9000/";
-	public static final String ADD_USER = "addContestUser/"; 
-	public static final String DELETE_USER = "deleteContestUser/";
-	public static final String UPDATE_USER = "updateContestUser/";
-	
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/253db35b/app/views/aboutus.scala.html
----------------------------------------------------------------------
diff --git a/app/views/aboutus.scala.html b/app/views/aboutus.scala.html
deleted file mode 100644
index 941f57a..0000000
--- a/app/views/aboutus.scala.html
+++ /dev/null
@@ -1,48 +0,0 @@
-@(message: String)
-
-@main("Welcome to Play") {
-
-   <h1>About Us</h1>
-   	<div class="jumbotron">
-   <h3><strong>Project Overview</strong></h3>
-   <p>JPL has provided a repository of web services for multi-aspect physics-based and phenomenon-oriented phenomenon-oriented climate model performance evaluation and diagnosis through the comprehensive and synergistic use of multiple observational data, reanalysis data, and model outputs.</p>
-   <h3><strong>JPL Advisors</strong></h3>
-   <p>Seungwon Lee</p>
-   <p>Lei Pan</p>
-   <h3><strong>Current Contributors</strong></h3>
-   <p>Xing Wei</p>
-   <p>Wei Wang</p>
-   <p>Chris Lee</p>
-   <p>Chenran Gong</p>
-   <p>Yichen Liu</p>
-   <p>Edward Huang</p>
-   <p>Zhiyu Lin</p>
-   <p>Ming Qi</p>
-   <p>Jian Jiao</p>
-   <h3><strong>Former Contributors</strong></h3>
-   <p>Pinchao Wang</p>
-   <p>Kang Fang</p>
-   <p>Minghan Chen</p>
-   
-   <h3><strong>Advisors</strong></h3>
-   <p>Jia Zhang		<a href="http://www.andrew.cmu.edu/user/jiaz/">Personal Website</a></p>
-   
-   
-
-   <h3><strong>Publications</strong></h3>
-   <b>2014</b>
-   <p>1. J. Zhang, C. Lee, S. Xiao, P. Votava, T.J. Lee, R. Nemani and I. Foster, "A Community-Driven Workflow Recommendations and Reuse Infrastructure", accepted by The 8th IEEE International Symposium on Service-Oriented System Engineering (SOSE 2014).</p>
-   <p>2. J. Zhang, D. Kuc, and S. Lu, "Confucius: A Tool Supporting Collaborative Scientific Workflow Composition", IEEE Transactions on Services Computing (TSC), 7(1), Jan.-Mar, 2014.<a href = "http://www.andrew.cmu.edu/user/jiaz/Papers/JiaZhang-Confucius-TSC.pdf">[pdf]</a></p>
-   <b>2013</b>
-   <p>3. J. Zhang, Z. Li, O. Sandoval, N. Xin, Y. Ren, B. Iannucci, M. Griss, S. Rosernberg, R.A. Martin, J. Cao, A. Rowe, "Supporting Personizable Virtual Internet of Things", in Proceedings of The 10th IEEE International Conference on Ubiquitous Intelligence and Computing (UIC-2013), Dec. 18-20, 2013, Vietri sul Mare, Italy.<a href = "http://www.andrew.cmu.edu/user/jiaz/Papers/JiaZhang-VirtualSensorEditor.pdf">[pdf]</a></p>
-   <p>4. J. Zhang, N. Radia, Z. Li, N. Xin, Y. Ren, P. Sachdeva, P. Subramanyam, S. Hu, S. Luan, L. Lee, B. Xing, D. Li, J. Cao, T. Selker, B. Iannucci, M. Griss, A. Rowe, "An Infrastructure Supporting Considerate Sensor Service Provisioning", in Proceedings of the 6th IEEE International Conference on Service Oriented Computing and Applications (SOCA 2013), Dec. 16-18, 2013, Kauai, HA, USA.<a href="http://www.andrew.cmu.edu/user/jiaz/Papers/JiaZhang-SocialSensors.pdf">[pdf]</a></p>
-   <p>5. L.-J. Zhang and J. Zhang, "Service Oriented Solution Modeling and Variation Propagation Analysis based on Architectural Building Blocks", International Journal of Web Services Research (JWSR), 10(4), 2013.</p>
-   <p>6. J. Wang, Z. Feng, J. Zhang, P.C.K. Hung, K. He, and L.-J. Zhang, "A Unified RGPS-Based Approach Supporting Service-Oriented Process Customization", accepted as a book chapter in Web Services Foundations, edited by Athman Bouguettaya and Schahram Dustdar, Springer Verlag, pp. 657-682.</p>
-   <p>7. J. Zhang, P. Votava, T.J. Lee, S. Adhikarla, I. Kulkumjon, M. Schlau, D. Natesan, R. Nemani, "A Technique of Analyzing Trust Relationships to Facilitate Scientific Service Discovery and Recommendation", in Proceedings of 2013 IEEE 10th International Conference on Services Computing (SCC), Jun. 27-Jul. 2, 2013, Santa Clara, CA, USA, pp. 57-64. (acceptance rate: 18%)<a href = "http://www.andrew.cmu.edu/user/jiaz/Papers/JiaZhang-TrustServiceDiscovery.pdf">[pdf]</a></p>
-   <p>8. J. Zhang, B. Iannucci, M. Hennessy, K. Gopal, S. Xiao, S. Kumar, D. Pfeffer, B. Aljedia, Y. Ren, M. Griss, S. Rosenberg, J. Cao, A. Rowe, "Sensor Data as a Service - A Federated Platform for Mobile Data-Centric Service Development and Sharing", in Proceedings of 2013 IEEE 10th International Conference on Services Computing (SCC), Jun. 27-Jul. 2, 2013, Santa Clara, CA, USA, pp. 446-453.<a href="http://www.andrew.cmu.edu/user/jiaz/Papers/JiaZhang-SensorServicePlatform.pdf">[pdf]</a></p>
-   <p>9. J. Zhang, P. Votava, T.J. Lee, O. Chu, C. Li, D. Liu, K. Liu, N. Xin, R. Nemani, "Bridging VisTrails Scientific Workflow Management System to High Performance Computing", IEEE 2013 7th International Workshop on Scientific Workflows (SWF), in Proceedings of 2013 IEEE 9th World Congress on Services (SERVICES), Jun. 27-Jul. 2, 2013, Santa Clara, CA, USA, pp. 29-36.<a href = "http://www.andrew.cmu.edu/user/jiaz/Papers/JiaZhang-VisTrails-HECC.pdf">[pdf]</a></p>
-   <p>10. B. Plale, M.R. Lyu, J. Zhang (Eds.), 2013 IEEE 20th International Conference on Web Services (ICWS), Jun. 27-Jul. 2, 2013, Santa Clara, CA, USA, IEEE 2013.</p>
-   <p>11. L.-J. Zhang and J. Zhang, "Technical Architecture of Enabling Body of Knowledge System for Effective Learning and Information Dissemination", International Journal of Web Services Research (JWSR), 10(2), 2013, pp. 41-62.<a href = "http://www.andrew.cmu.edu/user/jiaz/Papers/JiaZhang-BoK.pdf">[pdf]</a></p>
-   <p>12. I. Bojanova, J. Zhang, J.M. Voas, "Cloud Computing", IEEE IT Professional, 15(2), 2013, pp. 12-14.</p>
-</div>
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/253db35b/app/views/climate/accountSummary.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/accountSummary.scala.html b/app/views/climate/accountSummary.scala.html
deleted file mode 100644
index aa646e9..0000000
--- a/app/views/climate/accountSummary.scala.html
+++ /dev/null
@@ -1,79 +0,0 @@
-@(userName: String)
-<br>@import helper._
-
-@main("Estimator") {
-
-
-<div class="jumbotron">
-	<div class="row">
-
-		<div class="col-lg-6">
-			<h2>User: @userName</h2>
-			<h1>Account Summary</h1>
-			<table cellspacing='0'
-				class="table table-striped table-bordered table-condensed"
-				align="center">
-				<!-- cellspacing='0' is important, must stay -->
-
-				<!-- Table Header -->
-				<thead>
-					<tr>
-						<th>Start Date</th>
-						<th>Start Time</th>
-						<th>AMI Instance</th>
-						<th>Duration</th>
-						<th>Cost</th>
-					</tr>
-				</thead>
-
-				<tbody>
-
-					<tr class="pure-table-odd">
-						<td>04/08/2014</td>
-						<td>9:34</td>
-						<td>m3.large</td>
-						<td>36 hours 5 minute</td>
-						<td>$36</td>
-					</tr>
-					<tr class="pure-table-odd">
-						<td>04/12/2014</td>
-						<td>16:26</td>
-						<td>m3.medium</td>
-						<td>24 hours 17 minute</td>
-						<td>$24</td>
-					</tr>
-					<tr class="pure-table-odd">
-						<td>04/15/2014</td>
-						<td>13:24</td>
-						<td>m3.large</td>
-						<td>10 hours 23 minute</td>
-						<td>$11</td>
-					</tr>
-					<tr class="pure-table-odd">
-						<td></td>
-						<td></td>
-						<td></td>
-						<td></td>
-						<td>Total: $89</td>
-					</tr>
-					<tr class="pure-table-odd">
-						<td></td>
-						<td></td>
-						<td></td>
-						<td></td>
-						<td>Budget left: $111</td>
-					</tr>
-				</tbody>
-			</table>
-		<button>New Task</button>
-		</div>
-		
-	<div class="col-lg-6" style = "padding-top: 2cm; padding-left: 2cm">
-		<img src="/assets/images/NASA_logo.png">
-	</div>
-	</div>
-
-</div>
-
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/253db35b/app/views/climate/dataSets.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/dataSets.scala.html b/app/views/climate/dataSets.scala.html
deleted file mode 100644
index 7157d20..0000000
--- a/app/views/climate/dataSets.scala.html
+++ /dev/null
@@ -1,46 +0,0 @@
-@(results: List[SearchDataset], url: String)
-
-	@import helper._
-
-	@main("All Datasets") {
-		<ol class="breadcrumb">
-			<li><a href="/climate/climateServices">Services List</a></li>
-			<li><a href="/climate/recommendation">Recommendation</a></li>
-			<li class="active">Dataset List</li>
-		</ol>
-		<div class="container container-xs-height" style="overflow-y">
-		@if(results != null) {
-			<div class="row row-xs-height">
-				<p>Parallel Web-Service Climate Model Diagnostic Analyzer Datasets</p>
-				<div style="overflow-y : auto ; height : 250px ; width : 100 % ; margin-bottom : 5px">
-					<table class="table table-striped table-bordered table-condensed">
-						<thead>
-							<tr>
-								<td>Name</td>
-								<td>Description</td>
-								<td>Ontology</td>
-							</tr>
-						</thead>
-						<tbody>
-						@for(str <- results) {
-							<tr>
-								<td><a href="/climate/dataSets/@str.getData_id">@str.getTitle</a></td>
-								<td>@str.getDescription</td>
-								<td>@str.getKeyword</td>
-							</tr>
-						}
-						</tbody>
-					</table>
-				</div>
-				@*<p>Next >></p>*@
-
-				@if(url != null) {
-					<iframe src="@url" height="300px" width="100%"></iframe>
-				}
-			</div>
-		}
-		</div>
-	}
-
-
-

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/253db35b/app/views/climate/datasetSearch.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/datasetSearch.scala.html b/app/views/climate/datasetSearch.scala.html
deleted file mode 100644
index 9d6640f..0000000
--- a/app/views/climate/datasetSearch.scala.html
+++ /dev/null
@@ -1,81 +0,0 @@
-@(keyword: String, results: List[SearchDataset], url: String)
-
-	@import helper._
-
-	@main("Dataset Keyword Search") {
-		<link rel="stylesheet" href='@routes.Assets.at("stylesheets/jstree/style.min.css")'>
-		<ol class="breadcrumb">
-			<li><a href="/climate/climateServices">Services List</a></li>
-			<li class="active">Recommendation</li>
-			<li><a href="/climate/dataSets/">DataSet List</a></li>
-		</ol>
-		<div id="wrapper" class="jumbotron">
-				<!--<div id="jstree_div" style="overflow : auto ; height : 100%"></div>-->
-
-			<div class="row">
-				<div id="sidebar-wrapper" class="col-md-5 sidebar">
-					<form method="POST" action="/climate/recommendation/keywordSearch" enctype="text/plain">
-						<fieldset>
-							<legend>Search by keyword</legend>
-							<div class="clearfix" id="keyword_field">
-								<label for="keyword">Keyword</label>
-								<div class="input">
-									<input type="text" id="keyword" name="keyword" value="@keyword">
-									<span class="help-inline"></span> <span class="help-block"></span>
-								</div>
-							</div>
-						</fieldset>
-						<div class="actions">
-							<input type="submit" class="btn btn-primary"
-							value="Search Keyword">
-						</div>
-					</form>
-					<fieldset>
-						<legend>Select from dataset hierarchy</legend>
-					</fieldset>
-
-					<div id="jstree_div" style="overflow : auto ; height : 350px"></div>
-					@*<div id="jstree_div_q"></div>*@
-
-					<div id="submit" class="btn btn-primary">Search Keyword</div>
-
-					@*</form>*@
-				</div>
-				<div class="col-md-7">
-
-				@if(results != null) {
-					<div class="container">
-						<p>Result data sets links</p>
-						<div style="overflow-y : auto ; height : 200px ; width : 100 % ; margin-bottom : 5px">
-							<table class="table table-striped table-bordered table-condensed">
-
-							@for(str <- results) {
-								<tr>
-									<td data-toggle="tooltip" data-placement="bottom" title="@str.getDescription"><a href="/climate/recommendation/displayResult/@str.getData_id">@str.getTitle</a></td>
-								</tr>
-							}
-							</table>
-							<!-- Activate nice tooltips only if table shows up-->
-
-							<script>
-								$(function () {
-									$('[data-toggle="tooltip"]').tooltip()
-								})
-							</script>
-							<style scoped="scoped">
-								.tooltip-inner {
-									max-width: 450px;
-							}
-							</style>
-						</div>
-						@if(url != null) {
-							<iframe src="@url" height="300px" width="100%"></iframe>
-						}
-					</div>
-				}
-				</div>
-			</div>
-
-		</div>
-
-	}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/253db35b/conf/routes
----------------------------------------------------------------------
diff --git a/conf/routes b/conf/routes
index 027434f..0c7b33e 100644
--- a/conf/routes
+++ b/conf/routes
@@ -32,9 +32,6 @@ GET         /bug/list                                            controllers.Bug
 POST        /delete/report                                       controllers.BugReportController.deleteReport()
 POST        /solve/report                                        controllers.BugReportController.solveReport()
 
-# Map static resources from the /public folder to the /assets URL path
-GET         /assets/*file                                        controllers.Assets.at(path="/public", file)
-
 # About Us
 GET         /aboutus                                             controllers.AboutusController.aboutus()
 GET         /aboutProject                                        controllers.AboutusController.aboutProject()
@@ -42,7 +39,6 @@ GET         /aboutProject                                        controllers.Abo
 # Climate Model
 GET		/climate			controllers.ClimateServiceController.home(email ?= null, vfile ?= null, dataset ?= null)
 GET		/climate/tutorial		controllers.ClimateServiceController.tutorial()
-GET		/climate/accountSummary		controllers.ClimateServiceController.accountSummary(userName ?= null)
 GET		/climate/climateServices	controllers.ClimateServiceController.climateServices()
 GET		/climate/mostRecentlyAddedClimateServices	controllers.ClimateServiceController.mostRecentlyAddedClimateServices()
 GET		/climate/mostRecentlyUsedClimateServices	controllers.ClimateServiceController.mostRecentlyUsedClimateServices()
@@ -57,15 +53,9 @@ POST    /climate/delete/serviceLog   controllers.ClimateServiceController.delete
 GET		/climate/oneService		controllers.ClimateServiceController.oneService(url ?= null)
 
 #Keyword search
-GET 	    /climate/dataSets/						controllers.dataSetController.datasetList()
-GET         /climate/dataSets/*id                    controllers.KeywordSearchController.getDataSetList(id)
+GET 	    /climate/dataSets						controllers.dataSetController.datasetList()
 GET			/climate/searchDataSet 					 controllers.dataSetController.searchDataset()
 GET 		/climate/getSearchResult				 controllers.dataSetController.getSearchResult()
-GET         /climate/recommendation						controllers.KeywordSearchController.searchPage()
-POST        /climate/recommendation/keywordSearch                      controllers.KeywordSearchController.keywordSearch()
-GET         /climate/recommendation/displayResult/*id                  controllers.KeywordSearchController.displayResult(id)
-POST        /climate/recommendation/selectedKeywordSearch              controllers.KeywordSearchController.selectedKeywordSearch()
-GET         /climate/keywordTree/                       controllers.KeywordSearchController.getKeywordTree(id :String)
 
-#for pages
-GET     /assets/*file               controllers.Assets.at(path="/public", file)
\ No newline at end of file
+#Map static resources from the /public folder to the /assets URL path
+GET     /assets/*file               				controllers.Assets.at(path="/public", file)


[05/50] [abbrv] incubator-cmda git commit: Remove sensor

Posted by xi...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a0c167b8/app/views/sensors.scala.html
----------------------------------------------------------------------
diff --git a/app/views/sensors.scala.html b/app/views/sensors.scala.html
deleted file mode 100644
index bae2e81..0000000
--- a/app/views/sensors.scala.html
+++ /dev/null
@@ -1,97 +0,0 @@
-
-@(sensors: List[metadata.Sensor], sensorForm: play.data.Form[metadata.Sensor]) 
-@import helper._ 
-
-@scripts = {
-	<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
-}
-
-@main("Sensors",scripts) {
-	
-	@flash_message()
-	
-	<h1>@sensors.size() Sensors</h1>
-	<table class="table table-striped table-bordered table-condensed">
-		<tr>
-			<td>Sensor Name</td>
-			<td>Sensor Type</td>
-			<td>Device URI</td>
-			<td>Sensor Category</td>
-			<td>User Defined Fields</td>
-			
-    	@if(session.get("email")){
-			<td>Operation</td>
-			}
-		</tr>
-	
-		@for(sensor <- sensors) {
-		<tr>
-			<td>@sensor.getSensorName()</td>
-			<td>@sensor.getSensorTypeName()</td>
-			<td>@sensor.getDeviceUri()</td>
-			<td>@sensor.getSensorCategoryName()</td>
-			<td>
-			 	<span class="@sensor.getSensorName() editable" 
-			 		data-name='sensorUserDefinedFields'>
-					@sensor.getSensorUserDefinedFields()
-				</span>
-			</td>
-
-    	@if(session.get("email")){
-			
-         <td class="operation">
-			<input type="button" class="edit-btn btn btn-primary" value="Edit" 
-				data-pk='@sensor.getSensorName()' 
-				data-url='@routes.SensorController.editSensor()' 
-			>
-
-			@form(routes.SensorController.deleteSensor()){
-          		<input name="idHolder" type="hidden" value="@sensor.getSensorName()">
-        		<input type="submit"  class="btn btn-danger" value="Delete" onclick="return confirm('Are you sure you want to delete this item?')">
-       		}
-               			
-		</td>
-		}
-		</tr>
-		}
-	</table>
-	
-	
-    @if(session.get("email")){
-	<h2>Add a new sensor</h2>
-	
-	@helper.form(action = routes.SensorController.newSensor) {
-        		
-        		@inputText(
-		                sensorForm("sensorName"), 
-		                '_label -> "Sensor Name * (Please DO NOT contain spaces)",
-		                '_error -> sensorForm.globalError                                
-            	)
-            	@select(
-        				sensorForm("deviceUri"), 
-               			options(metadata.Device.allDeviceUri()),
-        				'_label -> "Parent Device",
-                		'_error -> sensorForm.globalError
-        		)
-        		@select(
-		        		sensorForm("sensorTypeName"), 
-		                options(metadata.SensorType.allSensorTypeName()),
-		        		'_label -> "Sensor Type (Please select the sensor types belonging to the parent device)",
-		                '_error -> sensorForm.globalError
-        		)
-        		
-        		@inputText(
-		                sensorForm("sensorUserDefinedFields"), 
-		                '_label -> "User Defined Fields",
-		                '_error -> sensorForm.globalError                                
-            	)
-       
-      
-        <div class="actions">
-            <input type="submit" class="btn btn-primary" value="Create">
-            <a href="@routes.Application.index" class="btn">Cancel</a>
-        </div>
-         
-     }
-     }
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a0c167b8/conf/routes
----------------------------------------------------------------------
diff --git a/conf/routes b/conf/routes
index 62c756a..5761ab6 100644
--- a/conf/routes
+++ b/conf/routes
@@ -35,40 +35,10 @@ POST        /solve/report                                        controllers.Bug
 # Map static resources from the /public folder to the /assets URL path
 GET         /assets/*file                                        controllers.Assets.at(path="/public", file)
 
-# devices
-GET         /devices                                             controllers.DeviceController.devices()
-POST        /new/devices                                         controllers.DeviceController.newDevice()
-POST        /delete/devices                                      controllers.DeviceController.deleteDevice()
-POST        /edit/devices                                        controllers.DeviceController.editDevice()
-
-# sensors
-GET         /sensors                                             controllers.SensorController.sensors()
-POST        /new/sensors                                         controllers.SensorController.newSensor()
-POST        /delete/sensors                                      controllers.SensorController.deleteSensor()
-POST        /edit/sensors                                        controllers.SensorController.editSensor()
-
-# sensor_categories
-GET         /sensorCategories                                    controllers.SensorCategoryController.sensorCategories()
-POST        /new/sensorCategories                                controllers.SensorCategoryController.newSensorCategory()
-POST        /delete/sensorCategories                             controllers.SensorCategoryController.deleteSensorCategory()
-POST        /download/sensorCategories                           controllers.SensorCategoryController.downloadSensorCategory()
-POST        /edit/sensorCategories                               controllers.SensorCategoryController.editSensorCategory()
-
-# dashboard
-GET         /dashboard                                           controllers.DashboardController.dashboard()
-
 # About Us
 GET         /aboutus                                             controllers.AboutusController.aboutus()
 GET         /aboutProject                                        controllers.AboutusController.aboutProject()
 
-# sensor reading
-GET         /sensorReading                                       controllers.SensorReadingController.sensorReadings()
-POST        /getSensorReadings                                   controllers.SensorReadingController.getSensorReadingsWithinRange()
-POST        /getSensorReadingsAtTimestamp                        controllers.SensorReadingController.getSensorReadingsAtTimestamp()
-POST        /getLatestSensorReadings                             controllers.SensorReadingController.getLatestSensorReadings()
-
-
-
 
 # Estimator recommendation
 GET         /estimator                                           controllers.EstimateController.estimate(email ?= null, vfile ?= null, dataset ?= null)


[06/50] [abbrv] incubator-cmda git commit: Remove sensor

Posted by xi...@apache.org.
Remove sensor 

Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/a0c167b8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/a0c167b8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/a0c167b8

Branch: refs/heads/master
Commit: a0c167b893f34b1f96a95859eef7488b33038e4b
Parents: 247a717
Author: mingqi830 <mq...@andrew.cmu.edu>
Authored: Wed Sep 2 15:51:21 2015 -0700
Committer: mingqi830 <mq...@andrew.cmu.edu>
Committed: Wed Sep 2 15:51:21 2015 -0700

----------------------------------------------------------------------
 app/controllers/DashboardController.java        |  34 --
 app/controllers/DeviceController.java           | 162 ---------
 app/controllers/NasaRegistrationController.java |  10 -
 app/controllers/SensorCategoryController.java   | 141 --------
 app/controllers/SensorController.java           | 120 -------
 app/controllers/SensorReadingController.java    | 336 -------------------
 app/models/Dashboard.java                       | 144 --------
 app/models/DashboardItem.java                   |  49 ---
 app/models/SensorReading.java                   |  80 -----
 app/models/metadata/Device.java                 | 266 ---------------
 app/models/metadata/DeviceType.java             | 212 ------------
 app/models/metadata/Sensor.java                 | 208 ------------
 app/models/metadata/SensorCategory.java         | 150 ---------
 app/models/metadata/SensorType.java             | 241 -------------
 app/views/dashboard.scala.html                  | 112 -------
 app/views/devices.scala.html                    | 141 --------
 app/views/header.scala.html                     |  30 +-
 app/views/sensorCategories.scala.html           |  76 -----
 app/views/sensorReading.scala.html              | 138 --------
 app/views/sensors.scala.html                    |  97 ------
 conf/routes                                     |  30 --
 21 files changed, 1 insertion(+), 2776 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a0c167b8/app/controllers/DashboardController.java
----------------------------------------------------------------------
diff --git a/app/controllers/DashboardController.java b/app/controllers/DashboardController.java
deleted file mode 100644
index 08ffd1f..0000000
--- a/app/controllers/DashboardController.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2013 Carnegie Mellon University Silicon Valley. 
- * All rights reserved. 
- * 
- * This program and the accompanying materials are made available
- * under the terms of dual licensing(GPL V2 for Research/Education
- * purposes). GNU Public License v2.0 which accompanies this distribution
- * is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
- * 
- * Please contact http://www.cmu.edu/silicon-valley/ if you have any 
- * questions.
- * 
- * */
-package controllers;
-
-import java.sql.Timestamp;
-import java.util.Date;
-
-import models.Dashboard;
-import play.mvc.*;
-import views.html.*;
-
-public class DashboardController extends Controller {
-
-	public static Result dashboard() {
-		Dashboard board = Dashboard.status();
-		return ok(dashboard.render(board, new Timestamp(new Date().getTime()).toString()));
-	}
-
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a0c167b8/app/controllers/DeviceController.java
----------------------------------------------------------------------
diff --git a/app/controllers/DeviceController.java b/app/controllers/DeviceController.java
deleted file mode 100644
index 66007de..0000000
--- a/app/controllers/DeviceController.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Copyright (c) 2013 Carnegie Mellon University Silicon Valley. 
- * All rights reserved. 
- * 
- * This program and the accompanying materials are made available
- * under the terms of dual licensing(GPL V2 for Research/Education
- * purposes). GNU Public License v2.0 which accompanies this distribution
- * is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
- * 
- * Please contact http://www.cmu.edu/silicon-valley/ if you have any 
- * questions.
- * 
- * */
-package controllers;
-
-import java.util.List;
-
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.node.ObjectNode;
-
-import models.metadata.Device;
-import play.data.DynamicForm;
-import play.data.Form;
-import play.libs.Json;
-import play.mvc.*;
-import util.APICall;
-import util.APICall.ResponseType;
-import views.html.*;
-
-public class DeviceController extends Controller {
-	final static Form<Device> deviceForm = Form.form(Device.class);
-
-	public static Result devices() {
-		return ok(devices.render(Device.all(), deviceForm));
-	}
-
-	public static Result newDevice() {
-		Form<Device> dc = deviceForm.bindFromRequest();
-
-		ObjectNode jsonData = Json.newObject();
-		try {
-
-			String uri = dc.field("uri").value();
-			if (uri != null && !uri.isEmpty() && !uri.contains(" ")) {
-				jsonData.put("uri", dc.field("uri").value());
-			}
-			jsonData.put("deviceTypeName", dc.field("deviceTypeName").value());
-
-			ObjectNode locationData = Json.newObject();
-			locationData.put("representation", dc.field("representation")
-					.value());
-
-			String longitude = dc.field("longitude").value();
-			if (longitude != null && !longitude.isEmpty()) {
-				locationData.put("longitude", longitude);
-			}
-			String latitude = dc.field("latitude").value();
-			if (latitude != null && !latitude.isEmpty()) {
-				locationData.put("latitude", latitude);
-			}
-			String altitude = dc.field("altitude").value();
-			if (altitude != null && !altitude.isEmpty()) {
-				locationData.put("altitude", altitude);
-			}
-
-			jsonData.put("location", locationData);
-
-			jsonData.put("deviceUserDefinedFields",
-					dc.field("deviceUserDefinedFields").value());
-
-			// create the item by calling the API
-			JsonNode response = Device.create(jsonData);
-
-			// flash the response message
-			Application.flashMsg(response);
-		} catch (IllegalStateException e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall
-					.createResponse(ResponseType.CONVERSIONERROR));
-		} catch (Exception e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall.createResponse(ResponseType.UNKNOWN));
-		}
-		return redirect("/devices");
-	}
-	
-	public static Result editDevice() {
-		DynamicForm df = DynamicForm.form().bindFromRequest();
-		ObjectNode jsonData = Json.newObject();
-		try {
-			String deviceUri = df.field("pk").value();
-			
-			if (deviceUri == null || deviceUri.isEmpty()) {
-				Application.flashMsg(APICall.createResponse(ResponseType.UNKNOWN));
-				return notFound("not found device uri "+deviceUri);
-			}
-			// if not found, it is an empty device
-			Device originalDevice = Device.findDeviceByUri(deviceUri);
-			if (originalDevice == null) {
-				Application.flashMsg(APICall.createResponse(ResponseType.UNKNOWN));
-				return notFound("not found original device uri "+deviceUri);
-			}
-			
-
-			String editField = df.field("name").value();
-			if (editField == null || editField.isEmpty()) {
-				Application.flashMsg(APICall.createResponse(ResponseType.UNKNOWN));
-				return notFound("not found edit field");
-			}
-			
-			jsonData.put("deviceUri", deviceUri);
-			
-			// put the original location data
-			ObjectNode location = Json.newObject();
-			location.put("longitude", originalDevice.getLongitude());
-			location.put("latitude", originalDevice.getLatitude());
-			location.put("altitude", originalDevice.getAltitude());
-			location.put("representation", originalDevice.getRepresentation());
-			
-			if (editField.equals("deviceUserDefinedFields")) {
-				jsonData.put(editField, df.field("value").value());
-			}else{
-				jsonData.put("deviceUserDefinedFields", originalDevice.getDeviceUserDefinedFields());
-				location.put(editField, df.field("value").value());
-			}
-			
-			// put the location
-			jsonData.put("location", location);
-			
-			// Call the edit() method
-			JsonNode response = Device.edit(deviceUri, jsonData);
-
-			// flash the response message
-			Application.flashMsg(response);
-
-		} catch (IllegalStateException e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall
-					.createResponse(ResponseType.CONVERSIONERROR));
-		} catch (Exception e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall.createResponse(ResponseType.UNKNOWN));
-		}
-		return ok("updated");
-	}
-	
-	public static Result deleteDevice() {
-		DynamicForm df = DynamicForm.form().bindFromRequest();
-		String id = df.field("idHolder").value();
-
-		// Call the delete() method
-		JsonNode response = Device.delete(id);
-
-		// flash the response message
-		Application.flashMsg(response);
-		return redirect("/devices");
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a0c167b8/app/controllers/NasaRegistrationController.java
----------------------------------------------------------------------
diff --git a/app/controllers/NasaRegistrationController.java b/app/controllers/NasaRegistrationController.java
index 8d5d125..7d480bf 100644
--- a/app/controllers/NasaRegistrationController.java
+++ b/app/controllers/NasaRegistrationController.java
@@ -25,19 +25,9 @@ import play.mvc.Controller;
 import play.mvc.Result;
 import util.APICall;
 import util.APICall.ResponseType;
-import views.html.index;
-import views.html.sensors;
 import views.html.registration.*;
-import views.html.estimator.*;
 import views.html.climate.*;
-import views.html.climate.tutorial;
 import util.*;
-import models.metadata.ClimateService;
-import models.metadata.NasaRMdata;
-import models.metadata.Sensor;
-
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
 import java.util.*;
 
 import com.fasterxml.jackson.databind.JsonNode;

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a0c167b8/app/controllers/SensorCategoryController.java
----------------------------------------------------------------------
diff --git a/app/controllers/SensorCategoryController.java b/app/controllers/SensorCategoryController.java
deleted file mode 100644
index 05ab75b..0000000
--- a/app/controllers/SensorCategoryController.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Copyright (c) 2013 Carnegie Mellon University Silicon Valley. 
- * All rights reserved. 
- * 
- * This program and the accompanying materials are made available
- * under the terms of dual licensing(GPL V2 for Research/Education
- * purposes). GNU Public License v2.0 which accompanies this distribution
- * is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
- * 
- * Please contact http://www.cmu.edu/silicon-valley/ if you have any 
- * questions.
- * 
- * */
-package controllers;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
-
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.node.ObjectNode;
-
-import models.metadata.SensorCategory;
-import play.data.DynamicForm;
-import play.data.Form;
-import play.libs.Json;
-import play.mvc.*;
-import util.APICall;
-import util.APICall.ResponseType;
-import views.html.*;
-
-public class SensorCategoryController extends Controller {
-	final static Form<SensorCategory> sensorCategoryForm = Form
-			.form(SensorCategory.class);
-
-	public static Result sensorCategories() {
-		return ok(sensorCategories.render(SensorCategory.all(),
-				sensorCategoryForm));
-	}
-
-	public static Result newSensorCategory() {
-		Form<SensorCategory> dc = sensorCategoryForm.bindFromRequest();
-
-		ObjectNode jsonData = Json.newObject();
-		try {
-
-			String sensorCategoryName = dc.field("Name").value();
-			
-			// name should not contain spaces
-			if (sensorCategoryName != null && !sensorCategoryName.isEmpty()
-					&& !sensorCategoryName.contains(" ")) {
-				jsonData.put("sensorCategoryName", sensorCategoryName);
-			}
-			jsonData.put("purpose", dc.field("Purpose").value());
-
-			// create the item by calling the API
-			JsonNode response = SensorCategory.create(jsonData);
-
-			// flash the response message
-			Application.flashMsg(response);
-		} catch (IllegalStateException e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall
-					.createResponse(ResponseType.CONVERSIONERROR));
-		} catch (Exception e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall.createResponse(ResponseType.UNKNOWN));
-		}
-		return redirect("/sensorCategories");
-	}
-
-	public static Result editSensorCategory() {
-		DynamicForm df = DynamicForm.form().bindFromRequest();
-		ObjectNode jsonData = Json.newObject();
-		try {
-			String sensorCategoryName = df.field("pk").value();
-
-			if (sensorCategoryName != null && !sensorCategoryName.isEmpty()) {
-				jsonData.put("sensorCategoryName", sensorCategoryName);
-			}
-
-			String editField = df.field("name").value();  
-			if (editField != null && !editField.isEmpty()) {
-				jsonData.put(editField, df.field("value").value());
-			}
-
-			// Call the edit() method
-			JsonNode response = SensorCategory.edit(jsonData);
-
-			// flash the response message
-			Application.flashMsg(response);
-
-		} catch (IllegalStateException e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall
-					.createResponse(ResponseType.CONVERSIONERROR));
-		} catch (Exception e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall.createResponse(ResponseType.UNKNOWN));
-		}
-		return ok("updated");
-
-	}
-
-	public static Result deleteSensorCategory() {
-		DynamicForm df = DynamicForm.form().bindFromRequest();
-		String sensorCategoryName = df.field("idHolder").value();
-
-		// return a text message
-
-		// Call the delete() method
-		JsonNode response = SensorCategory.delete(sensorCategoryName);
-
-		// flash the response message
-		Application.flashMsg(response);
-
-		return redirect("/sensorCategories");
-	}
-
-	public static Result downloadSensorCategory() {
-		List<SensorCategory> user = SensorCategory.all();
-		// 1. Convert Java object to JSON format
-		ObjectMapper mapper = new ObjectMapper();
-		File file = new File("user.json");
-		try {
-			mapper.writeValue(file, user);
-		} catch (IOException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
-
-		response().setContentType("application/x-download");
-		response().setHeader("Content-disposition",
-				"attachment; filename=user.json");
-		return ok(file);
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a0c167b8/app/controllers/SensorController.java
----------------------------------------------------------------------
diff --git a/app/controllers/SensorController.java b/app/controllers/SensorController.java
deleted file mode 100644
index 87e7394..0000000
--- a/app/controllers/SensorController.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright (c) 2013 Carnegie Mellon University Silicon Valley. 
- * All rights reserved. 
- * 
- * This program and the accompanying materials are made available
- * under the terms of dual licensing(GPL V2 for Research/Education
- * purposes). GNU Public License v2.0 which accompanies this distribution
- * is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
- * 
- * Please contact http://www.cmu.edu/silicon-valley/ if you have any 
- * questions.
- * 
- * */
-package controllers;
-
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.node.ObjectNode;
-
-import models.metadata.Sensor;
-import play.data.DynamicForm;
-import play.data.Form;
-import play.libs.Json;
-import play.mvc.*;
-import util.APICall;
-import util.APICall.ResponseType;
-import views.html.*;
-
-public class SensorController extends Controller {
-
-	final static Form<Sensor> sensorForm = Form.form(Sensor.class);
-
-	public static Result sensors() {
-		return ok(sensors.render(Sensor.all(), sensorForm));
-	}
-
-	public static Result newSensor() {
-		Form<Sensor> dc = sensorForm.bindFromRequest();
-
-		ObjectNode jsonData = Json.newObject();
-		try {
-			String sensorName = dc.field("sensorName").value();
-			
-			// should not contain spaces
-			if (sensorName != null && !sensorName.isEmpty()
-					&& !sensorName.contains(" ")) {
-				jsonData.put("sensorName", sensorName);
-			}
-
-			jsonData.put("sensorTypeName", dc.field("sensorTypeName").value());
-			jsonData.put("deviceUri", dc.field("deviceUri").value());
-			jsonData.put("sensorUserDefinedFields",
-					dc.field("sensorUserDefinedFields").value());
-
-			// create the item by calling the API
-			JsonNode response = Sensor.create(jsonData);
-
-			// flash the response message
-			Application.flashMsg(response);
-		} catch (IllegalStateException e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall
-					.createResponse(ResponseType.CONVERSIONERROR));
-		} catch (Exception e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall.createResponse(ResponseType.UNKNOWN));
-		}
-		return redirect("/sensors");
-	}
-	
-	public static Result editSensor() {
-		DynamicForm df = DynamicForm.form().bindFromRequest();
-		ObjectNode jsonData = Json.newObject();
-		try {
-			String sensorName = df.field("pk").value();
-
-			if (sensorName != null && !sensorName.isEmpty()) {
-				jsonData.put("sensorName", sensorName);
-			}
-
-			String editField = df.field("name").value();  
-			if (editField != null && !editField.isEmpty()) {
-				jsonData.put(editField, df.field("value").value());
-			}
-			
-			// Call the edit() method
-			JsonNode response = Sensor.edit(jsonData);
-
-			// flash the response message
-			Application.flashMsg(response);
-
-		} catch (IllegalStateException e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall
-					.createResponse(ResponseType.CONVERSIONERROR));
-		} catch (Exception e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall.createResponse(ResponseType.UNKNOWN));
-		}
-		return ok("updated");
-
-	}
-
-	public static Result deleteSensor() {
-		DynamicForm df = DynamicForm.form().bindFromRequest();
-		String sensorName = df.field("idHolder").value();
-
-		// return a text message
-
-		// Call the delete() method
-		JsonNode response = Sensor.delete(sensorName);
-
-		// flash the response message
-		Application.flashMsg(response);
-
-		return redirect("/sensors");
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a0c167b8/app/controllers/SensorReadingController.java
----------------------------------------------------------------------
diff --git a/app/controllers/SensorReadingController.java b/app/controllers/SensorReadingController.java
deleted file mode 100644
index 0131da4..0000000
--- a/app/controllers/SensorReadingController.java
+++ /dev/null
@@ -1,336 +0,0 @@
-/*
- * Copyright (c) 2013 Carnegie Mellon University Silicon Valley. 
- * All rights reserved. 
- * 
- * This program and the accompanying materials are made available
- * under the terms of dual licensing(GPL V2 for Research/Education
- * purposes). GNU Public License v2.0 which accompanies this distribution
- * is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
- * 
- * Please contact http://www.cmu.edu/silicon-valley/ if you have any 
- * questions.
- * 
- * */
-package controllers;
-
-import java.io.File;
-import java.io.IOException;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.TimeZone;
-
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-import models.SensorReading;
-import play.data.Form;
-import play.mvc.Controller;
-import play.mvc.Result;
-import util.APICall;
-import util.APICall.ResponseType;
-import views.html.*;
-
-public class SensorReadingController extends Controller {
-	final static Form<SensorReading> sensorReadingForm = Form
-			.form(SensorReading.class);
-
-	public static Result sensorReadings() {
-		return ok(sensorReading.render(sensorReadingForm));
-	}
-
-	public static Result getSensorReadingsWithinRange() {
-		Form<SensorReading> sr = sensorReadingForm.bindFromRequest();
-		String[] postAction = request().body().asFormUrlEncoded().get("action");
-		JsonNode resultNode;
-		File file = new File("sensor.json");
-
-		try {
-			// String deviceName = sr.field("deviceName").value();
-			String sensorName = sr.field("sensorName").value();
-
-			String startDate = sr.field("startDate").value();
-			String startTime = sr.field("startTime").value();
-			Long startTimeStamp = convertToUnixTime(startDate + startTime);
-
-			String endDate = sr.field("endDate").value();
-			String endTime = sr.field("endTime").value();
-			Long endTimeStamp = convertToUnixTime(endDate + endTime);
-
-			resultNode = SensorReading.getReadingsWithinRange(sensorName,
-					startTimeStamp.toString(), endTimeStamp.toString());
-
-			if (resultNode == null || resultNode.has("error")
-					|| !resultNode.isArray()) {
-				Application.flashMsg(resultNode);
-				return ok(sensorReading.render(sensorReadingForm));
-			}
-
-			if (postAction == null || postAction.length == 0) {
-				return badRequest("You must provide a valid action");
-			} else {
-				String action = postAction[0];
-				if ("Submit".equals(action)) {
-					return ok(resultNode);
-				} else if ("Download".equals(action)) {
-					// 1. Convert Java object to JSON format
-					ObjectMapper mapper = new ObjectMapper();
-
-					try {
-						mapper.writeValue(file, resultNode);
-
-					} catch (IOException e) {
-						// TODO Auto-generated catch block
-						e.printStackTrace();
-					}
-
-					response().setContentType("application/x-download");
-					response().setHeader("Content-disposition",
-							"attachment; filename=sensor.json");
-
-					return ok(file);
-
-				} else {
-					return badRequest("This action is not allowed");
-				}
-			}
-
-		} catch (IllegalStateException e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall
-					.createResponse(ResponseType.CONVERSIONERROR));
-		} catch (Exception e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall.createResponse(ResponseType.UNKNOWN));
-		}
-
-		if (postAction == null || postAction.length == 0) {
-			return badRequest("You must provide a valid action");
-		} else {
-
-			String action = postAction[0];
-			if ("Submit".equals(action)) {
-				return ok(sensorReading.render(sensorReadingForm));
-			} else if ("Download".equals(action)) {
-				return ok(file);
-			} else {
-				return badRequest("This action is not allowed");
-			}
-		}
-	}
-
-	public static Result getSensorReadingsAtTimestamp() {
-		Form<SensorReading> sr = sensorReadingForm.bindFromRequest();
-		String[] postAction = request().body().asFormUrlEncoded().get("action");
-		JsonNode resultNode;
-		File file = new File("sensor.json");
-
-		try {
-			// String deviceName = sr.field("deviceName").value();
-			String sensorName = sr.field("sensorName2").value();
-
-			String date = sr.field("Date").value();
-			String time = sr.field("Time").value();
-			Long timeStamp = convertToUnixTime(date + time);
-
-			resultNode = SensorReading.getReadingsAtTimestamp(sensorName,
-					timeStamp.toString());
-
-			if (resultNode == null || resultNode.has("error")) {
-				Application.flashMsg(resultNode);
-				return ok(sensorReading.render(sensorReadingForm));
-			}
-			if (postAction == null || postAction.length == 0) {
-
-				
-				return badRequest("You must provide a valid action");
-			} else {
-
-				System.out.println("");
-				String action = postAction[0];
-				if ("Submit".equals(action)) {
-					return ok(resultNode);
-				} else if ("Download".equals(action)) {
-					// 1. Convert Java object to JSON format
-					ObjectMapper mapper = new ObjectMapper();
-
-					try {
-						mapper.writeValue(file, resultNode);
-
-					} catch (IOException e) {
-						// TODO Auto-generated catch block
-						e.printStackTrace();
-					}
-
-					response().setContentType("application/x-download");
-					response().setHeader("Content-disposition",
-							"attachment; filename=sensor.json");
-
-					return ok(file);
-
-				} else {
-					return badRequest("This action is not allowed");
-				}
-			}
-
-		} catch (IllegalStateException e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall
-					.createResponse(ResponseType.CONVERSIONERROR));
-		} catch (Exception e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall.createResponse(ResponseType.UNKNOWN));
-		}
-
-		if (postAction == null || postAction.length == 0) {
-			return badRequest("You must provide a valid action");
-		} else {
-			String action = postAction[0];
-			if ("Submit".equals(action)) {
-				return ok(sensorReading.render(sensorReadingForm));
-			} else if ("Download".equals(action)) {
-				return ok(file);
-			} else {
-				return badRequest("This action is not allowed");
-			}
-		}
-	}
-
-	public static Result getLatestSensorReadings() {
-		Form<SensorReading> sr = sensorReadingForm.bindFromRequest();
-		String[] postAction = request().body().asFormUrlEncoded().get("action");
-		JsonNode resultNode;
-		File file = new File("sensor.json");
-
-		try {
-			// String deviceName = sr.field("deviceName").value();
-			String sensorTypeName = sr.field("sensorTypeName").value();
-
-			resultNode = SensorReading.getLatestSensorReading(sensorTypeName);
-
-			System.out.println("0 "+resultNode);
-			
-			if (resultNode == null || resultNode.has("error")
-					|| !resultNode.isArray()) {
-				Application.flashMsg(resultNode);
-				return ok(sensorReading.render(sensorReadingForm));
-			}
-
-			System.out.println("1 "+resultNode);
-			if (postAction == null || postAction.length == 0) {
-				return badRequest("You must provide a valid action");
-			} else {
-
-				System.out.println("2 "+resultNode);
-				String action = postAction[0];
-				if ("Submit".equals(action)) {
-					return ok(resultNode);
-				} else if ("Download".equals(action)) {
-					// 1. Convert Java object to JSON format
-					ObjectMapper mapper = new ObjectMapper();
-
-					try {
-						mapper.writeValue(file, resultNode);
-
-					} catch (IOException e) {
-						// TODO Auto-generated catch block
-						e.printStackTrace();
-					}
-
-					response().setContentType("application/x-download");
-					response().setHeader("Content-disposition",
-							"attachment; filename=sensor.json");
-
-					return ok(file);
-
-				} else {
-					return badRequest("This action is not allowed");
-				}
-			}
-
-		} catch (IllegalStateException e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall
-					.createResponse(ResponseType.CONVERSIONERROR));
-		} catch (Exception e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall.createResponse(ResponseType.UNKNOWN));
-		}
-
-		if (postAction == null || postAction.length == 0) {
-			return badRequest("You must provide a valid action");
-		} else {
-			String action = postAction[0];
-			if ("Submit".equals(action)) {
-				return ok(sensorReading.render(sensorReadingForm));
-			} else if ("Download".equals(action)) {
-				return ok(file);
-			} else {
-				return badRequest("This action is not allowed");
-			}
-		}
-	}
-
-	public static Result downloadSensorReadings() {
-		Form<SensorReading> sr = sensorReadingForm.bindFromRequest();
-		JsonNode resultNode;
-		File file = new File("E:\\sensor.json");
-
-		try {
-			//String deviceName = sr.field("deviceName").value();
-			String sensorName = sr.field("sensorName").value();
-
-			String startDate = sr.field("startDate").value();
-			String startTime = sr.field("startTime").value();
-			Long startTimeStamp = convertToUnixTime(startDate + startTime);
-
-			String endDate = sr.field("endDate").value();
-			String endTime = sr.field("endTime").value();
-			Long endTimeStamp = convertToUnixTime(endDate + endTime);
-
-			resultNode = SensorReading.getReadingsWithinRange(sensorName,
-					startTimeStamp.toString(), endTimeStamp.toString());
-
-			if (resultNode == null || resultNode.has("error")
-					|| !resultNode.isArray()) {
-				Application.flashMsg(resultNode);
-				return ok(sensorReading.render(sensorReadingForm));
-			}
-			// 1. Convert Java object to JSON format
-			ObjectMapper mapper = new ObjectMapper();
-
-			try {
-				mapper.writeValue(file, resultNode);
-
-			} catch (IOException e) {
-				// TODO Auto-generated catch block
-				e.printStackTrace();
-			}
-
-			response().setContentType("application/x-download");
-			response().setHeader("Content-disposition",
-					"attachment; filename=sensor.json");
-
-			return ok(file);
-
-		} catch (IllegalStateException e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall
-					.createResponse(ResponseType.CONVERSIONERROR));
-		} catch (Exception e) {
-			e.printStackTrace();
-			Application.flashMsg(APICall.createResponse(ResponseType.UNKNOWN));
-		}
-		return ok(file);
-
-	}
-
-	private static long convertToUnixTime(String timeStamp) throws Exception {
-		DateFormat startTimeStamp = new SimpleDateFormat("yyyy-MM-ddHH:mm:ss");
-		startTimeStamp.setTimeZone(TimeZone.getTimeZone("America/Los_Angeles"));
-		return startTimeStamp.parse(timeStamp).getTime();
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a0c167b8/app/models/Dashboard.java
----------------------------------------------------------------------
diff --git a/app/models/Dashboard.java b/app/models/Dashboard.java
deleted file mode 100644
index 01415aa..0000000
--- a/app/models/Dashboard.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright (c) 2013 Carnegie Mellon University Silicon Valley. 
- * All rights reserved. 
- * 
- * This program and the accompanying materials are made available
- * under the terms of dual licensing(GPL V2 for Research/Education
- * purposes). GNU Public License v2.0 which accompanies this distribution
- * is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
- * 
- * Please contact http://www.cmu.edu/silicon-valley/ if you have any 
- * questions.
- * 
- * */
-package models;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-
-import util.APICall;
-
-import com.fasterxml.jackson.databind.JsonNode;
-
-import models.metadata.Device;
-import models.metadata.Sensor;
-
-public class Dashboard {
-
-	private ArrayList<DashboardItem> items;
-	private int totalCount;
-	private int activeCount;
-
-	public Dashboard() {
-		// TODO Auto-generated constructor stub
-	}
-
-	public Dashboard(ArrayList<DashboardItem> items, int totalCount,
-			int activeCount) {
-		this.items = items;
-		this.totalCount = totalCount;
-		this.activeCount = activeCount;
-	}
-
-	public int getActiveCount() {
-		return activeCount;
-	}
-
-	public ArrayList<DashboardItem> getItems() {
-		return items;
-	}
-
-	public int getTotalCount() {
-		return totalCount;
-	}
-
-	public void setActiveCount(int activeCount) {
-		this.activeCount = activeCount;
-	}
-
-	public void setItems(ArrayList<DashboardItem> items) {
-		this.items = items;
-	}
-
-	public void setTotalCount(int totalCount) {
-		this.totalCount = totalCount;
-	}
-
-	public static Dashboard status() {
-
-		Dashboard dashboard = new Dashboard();
-
-		ArrayList<DashboardItem> dashboardItems = new ArrayList<DashboardItem>();
-		int totalCount = 0;
-		int activeCount = 0;
-
-		// API call for "active" devices
-		JsonNode devicesNode = APICall.callAPI(formatAPIUrlWithCurrentTimestamp());
-		HashSet<String> activeSensorNames = new HashSet<String>();
-
-		if (devicesNode == null || !devicesNode.isArray()) {
-			dashboard.setTotalCount(0);
-			dashboard.setActiveCount(0);
-		} else {
-			for (int i = 0; i < devicesNode.size(); i++) {
-
-				JsonNode json = devicesNode.path(i);
-				activeSensorNames.add(json.findPath("sensorName").asText());
-
-			}
-		}
-
-		List<Device> allDevices = Device.all();
-
-		// build up the hashmap for sensorName and deviceUri
-
-		HashSet<String> activeDevices = getActiveDevices(activeSensorNames,
-				Sensor.allSensorNamesMap());
-
-		for (Device device : allDevices) {
-			DashboardItem dashboardItem = new DashboardItem();
-			dashboardItem.setDevice(device);
-
-			if (activeDevices.contains(device.getDeviceUri())) {
-
-				dashboardItem.setStatus(1);
-				activeCount++;
-			} else {
-				dashboardItem.setStatus(0);
-			}
-			totalCount++;
-			dashboardItems.add(dashboardItem);
-		}
-
-		dashboard.setItems(dashboardItems);
-		dashboard.setTotalCount(totalCount);
-		dashboard.setActiveCount(activeCount);
-
-		return dashboard;
-
-	}
-
-	private static HashSet<String> getActiveDevices(
-			HashSet<String> activeSensorNames,
-			Map<String, Sensor> allSensorNamesMap) {
-		HashSet<String> set = new HashSet<String>();
-		for (String sensorName : activeSensorNames) {
-			if (allSensorNamesMap.containsKey(sensorName)) {
-				set.add(allSensorNamesMap.get(sensorName).getDeviceUri());
-			}
-		}
-		return set;
-	}
-	
-	private static String formatAPIUrlWithCurrentTimestamp(){
-		return util.Constants.NEW_API_URL
-				+ util.Constants.NEW_GET_LAST_MINUTE_DEVICE_READINGS + System.currentTimeMillis() + "/"
-				+ util.Constants.FORMAT;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a0c167b8/app/models/DashboardItem.java
----------------------------------------------------------------------
diff --git a/app/models/DashboardItem.java b/app/models/DashboardItem.java
deleted file mode 100644
index ed01088..0000000
--- a/app/models/DashboardItem.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2013 Carnegie Mellon University Silicon Valley. 
- * All rights reserved. 
- * 
- * This program and the accompanying materials are made available
- * under the terms of dual licensing(GPL V2 for Research/Education
- * purposes). GNU Public License v2.0 which accompanies this distribution
- * is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
- * 
- * Please contact http://www.cmu.edu/silicon-valley/ if you have any 
- * questions.
- * 
- * */
-package models;
-
-import models.metadata.Device;
-
-public class DashboardItem {
-	
-	private int status; // 0: inactive, 1: active
-	private Device device;
-	
-	public DashboardItem() {
-		// TODO Auto-generated constructor stub
-	}
-	
-	public DashboardItem(int status, Device device) {
-		this.status = status;
-		this.device = device;
-	}
-	
-	public Device getDevice() {
-		return device;
-	}
-	public int getStatus() {
-		return status;
-	}
-	public void setDevice(Device device) {
-		this.device = device;
-	}
-	public void setStatus(int status) {
-		this.status = status;
-	}
-	
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a0c167b8/app/models/SensorReading.java
----------------------------------------------------------------------
diff --git a/app/models/SensorReading.java b/app/models/SensorReading.java
deleted file mode 100644
index 098118d..0000000
--- a/app/models/SensorReading.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package models;
-
-import util.APICall;
-
-import com.fasterxml.jackson.databind.JsonNode;
-
-public class SensorReading {
-	private String sensorName;
-	private String startTime;
-	private String endTime;
-
-	private static final String GET_SENSOR_READING_INRANGE_CALL = util.Constants.NEW_API_URL
-			+ util.Constants.NEW_GET_SENSOR_READING_IN_RANGE;
-	
-	private static final String GET_SENSOR_READING_CALL = util.Constants.NEW_API_URL
-			+ util.Constants.NEW_GET_SENSOR_READING;
-	
-	private static final String GET_LATEST_SENSOR_READING_CALL = util.Constants.NEW_API_URL
-			+ util.Constants.NEW_GET_LATEST_SENSOR_READING_IN_ALL_DEVICES;
-
-	public String getSensorName() {
-		return sensorName;
-	}
-
-	public void setSensorName(String sensorName) {
-		this.sensorName = sensorName;
-	}
-
-	public String getStartTime() {
-		return startTime;
-	}
-
-	public void setStartTime(String startTime) {
-		this.startTime = startTime;
-	}
-
-	public String getEndTime() {
-		return endTime;
-	}
-
-	public void setEndTime(String endTime) {
-		this.endTime = endTime;
-	}
-
-	public static JsonNode getReadingsWithinRange(String sensorName,
-			String startTime, String endTime) {
-
-		JsonNode readingsNode = APICall.callAPI(wrapTimeRangeURL(sensorName,
-				startTime, endTime));
-		return readingsNode;
-	}
-	
-
-	public static JsonNode getReadingsAtTimestamp(String sensorName,
-			String time) {
-		System.out.println(wrapTimeURL(sensorName,time));
-		JsonNode readingsNode = APICall.callAPI(wrapTimeURL(sensorName,
-				time));
-		return readingsNode;
-	}
-	
-	public static JsonNode getLatestSensorReading(String sensorTypeName) {
-		JsonNode readingsNode = APICall.callAPI(wrapLatestURL(sensorTypeName));
-		return readingsNode;
-	}
-
-	private static String wrapTimeRangeURL(String sensorName, String startTime,
-			String endTime) {
-		return GET_SENSOR_READING_INRANGE_CALL + sensorName + "/" + startTime + "/"
-				+ endTime + "/json";
-	}
-	
-	private static String wrapTimeURL(String sensorName, String time) {
-		return GET_SENSOR_READING_CALL + sensorName + "/" + time + "/json";
-	}
-	
-	private static String wrapLatestURL(String sensorTypeName) {
-		return GET_LATEST_SENSOR_READING_CALL + sensorTypeName + "/json";
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a0c167b8/app/models/metadata/Device.java
----------------------------------------------------------------------
diff --git a/app/models/metadata/Device.java b/app/models/metadata/Device.java
deleted file mode 100644
index 392bd46..0000000
--- a/app/models/metadata/Device.java
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
- * Copyright (c) 2013 Carnegie Mellon University Silicon Valley. 
- * All rights reserved. 
- * 
- * This program and the accompanying materials are made available
- * under the terms of dual licensing(GPL V2 for Research/Education
- * purposes). GNU Public License v2.0 which accompanies this distribution
- * is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
- * 
- * Please contact http://www.cmu.edu/silicon-valley/ if you have any 
- * questions.
- * 
- * */
-package models.metadata;
-
-import java.util.*;
-
-import util.APICall;
-
-//import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.*;
-
-public class Device {
-
-	private String id;
-	private String deviceUri;
-	// private DeviceType deviceType;
-	private double longitude;
-	private double latitude;
-	private double altitude;
-
-	// newly added
-	private String deviceTypeName;
-	private String representation;
-	private String deviceUserDefinedFields;
-	private List<String> sensorTypeNames = new ArrayList<String>();
-	private List<String> sensorNames = new ArrayList<String>();
-
-	/* The following are API */
-	private static final String GET_DEVICES_CALL = util.Constants.NEW_API_URL
-			+ util.Constants.NEW_GET_DEVICES + util.Constants.FORMAT;
-	private static final String ADD_DEVICE_CALL = util.Constants.NEW_API_URL
-			+ util.Constants.NEW_ADD_DEVICE;
-	private static final String DELETE_DEVICE_CALL = util.Constants.NEW_API_URL
-			+ util.Constants.NEW_DELETE_DEVICE;
-	private static final String EDIT_DEVICE_CALL = util.Constants.NEW_API_URL
-			+ util.Constants.NEW_EDIT_DEVICE;
-
-	public Device() {
-	}
-
-	public String getId() {
-		return id;
-	}
-
-	public String getDeviceUri() {
-		return deviceUri;
-	}
-
-	public void setId(String id) {
-		this.id = id;
-	}
-
-	public void setDeviceUri(String uri) {
-		this.deviceUri = uri;
-	}
-
-	public double getLongitude() {
-		return longitude;
-	}
-
-	public void setLongitude(double longitude) {
-		this.longitude = longitude;
-	}
-
-	public double getLatitude() {
-		return latitude;
-	}
-
-	public void setLatitude(double latitude) {
-		this.latitude = latitude;
-	}
-
-	public double getAltitude() {
-		return altitude;
-	}
-
-	public void setAltitude(double altitude) {
-		this.altitude = altitude;
-	}
-
-	public String getDeviceTypeName() {
-		return deviceTypeName;
-	}
-
-	public void setDeviceTypeName(String deviceTypeName) {
-		this.deviceTypeName = deviceTypeName;
-	}
-
-	public List<String> getSensorTypeNames() {
-		return sensorTypeNames;
-	}
-
-	public void addSensorTypeName(String sensorTypeName) {
-		this.sensorTypeNames.add(sensorTypeName);
-	}
-
-	public void deleteSensorTypeName(String sensorTypeName) {
-		for (int i = 0; i < this.sensorTypeNames.size(); i++) {
-			if (sensorTypeName.equals(this.sensorTypeNames.get(i))) {
-				this.sensorTypeNames.remove(i);
-			}
-		}
-	}
-
-	public List<String> getSensorNames() {
-		return sensorNames;
-	}
-
-	public void addSensorNames(String sensorName) {
-		this.sensorNames.add(sensorName);
-	}
-
-	public void deleteSensorName(String sensorName) {
-		for (int i = 0; i < this.sensorNames.size(); i++) {
-			if (sensorName.equals(this.sensorNames.get(i))) {
-				this.sensorNames.remove(i);
-			}
-		}
-	}
-
-	public String getDeviceUserDefinedFields() {
-		return deviceUserDefinedFields;
-	}
-
-	public void setDeviceUserDefinedFields(String deviceUserDefinedFields) {
-		this.deviceUserDefinedFields = deviceUserDefinedFields;
-	}
-
-	public String getRepresentation() {
-		return representation;
-	}
-
-	public void setRepresentation(String representation) {
-		this.representation = representation;
-	}
-
-	/**
-	 * Method to call the API to add a new device
-	 * 
-	 * @param jsonData
-	 * @return
-	 */
-	public static JsonNode create(JsonNode jsonData) {
-		return APICall.postAPI(ADD_DEVICE_CALL, jsonData);
-	}
-
-	/**
-	 * Method to call the API to edit a device
-	 * 
-	 * @param jsonData
-	 * @return
-	 */
-	public static JsonNode edit(String deviceUri, JsonNode jsonData) {
-		return APICall.putAPI(EDIT_DEVICE_CALL + deviceUri, jsonData);
-	}
-
-	/**
-	 * Method to call the API to delete a device
-	 * 
-	 * @param id
-	 * @return the response json node from server
-	 */
-	public static JsonNode delete(String deviceUri) {
-		return APICall.deleteAPI(DELETE_DEVICE_CALL + deviceUri);
-	}
-
-	/**
-	 * Method to display all devices
-	 * 
-	 * @return a list of all devices
-	 */
-	public static List<Device> all() {
-		List<Device> allDevices = new ArrayList<Device>();
-
-		// API Call: http://einstein.sv.cmu.edu/get_devices/json
-		final JsonNode devicesNode = APICall.callAPI(GET_DEVICES_CALL);
-
-		// If no value is returned
-		if (devicesNode == null || devicesNode.has("error")
-				|| !devicesNode.isArray()) {
-			return allDevices;
-		}
-
-		for (int i = 0; i < devicesNode.size(); i++) {
-			JsonNode json = devicesNode.path(i);
-			Device newDevice = new Device();
-
-			newDevice.setId(UUID.randomUUID().toString());
-
-			newDevice.setDeviceUri(json.findPath("uri").asText());
-			newDevice.setDeviceTypeName(json.findPath("deviceTypeName")
-					.asText());
-
-			JsonNode sensorNamesJson = json.findPath("sensorNames");
-			for (int j = 0; j < sensorNamesJson.size(); j++) {
-				newDevice.addSensorNames(sensorNamesJson.get(j).asText());
-			}
-
-			JsonNode sensorTypeNamesJson = json.findPath("sensorTypeNames");
-			for (int j = 0; j < sensorTypeNamesJson.size(); j++) {
-				newDevice
-						.addSensorTypeName(sensorTypeNamesJson.get(j).asText());
-			}
-			JsonNode locationNode = json.findPath("location");
-			newDevice.setRepresentation(locationNode.findPath("representation")
-					.asText());
-			newDevice.setLongitude(locationNode.findPath("longitude")
-					.asDouble());
-			newDevice.setLatitude(locationNode.findPath("latitude").asDouble());
-			newDevice.setAltitude(locationNode.findPath("altitude").asDouble());
-
-			newDevice.setDeviceUserDefinedFields(json.findPath(
-					"deviceUserDefinedFields").asText());
-
-			allDevices.add(newDevice);
-		}
-
-		return allDevices;
-	}
-
-	/**
-	 * Method to display all devices' name with id
-	 * 
-	 * @return a list of all devices' name
-	 */
-	public static List<String> allDeviceUri() {
-		List<Device> allList = all();
-		List<String> resultList = new ArrayList<String>();
-		for (Device element : allList) {
-			String elementUri = element.getDeviceUri();
-			if (elementUri != null && elementUri != "")
-				resultList.add(elementUri);
-		}
-		return resultList;
-	}
-	
-	/**
-	 * find a device by its URI
-	 * 
-	 * @param deviceUri
-	 * @return the founded result. If not found, return an empty device
-	 */
-	public static Device findDeviceByUri(String deviceUri){
-		List<Device> allList = all();
-		for (Device element : allList) {
-			String elementUri = element.getDeviceUri();
-			if (elementUri.equals(deviceUri))
-				return element;
-		}
-		return new Device();
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a0c167b8/app/models/metadata/DeviceType.java
----------------------------------------------------------------------
diff --git a/app/models/metadata/DeviceType.java b/app/models/metadata/DeviceType.java
deleted file mode 100644
index 9082844..0000000
--- a/app/models/metadata/DeviceType.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * Copyright (c) 2013 Carnegie Mellon University Silicon Valley. 
- * All rights reserved. 
- * 
- * This program and the accompanying materials are made available
- * under the terms of dual licensing(GPL V2 for Research/Education
- * purposes). GNU Public License v2.0 which accompanies this distribution
- * is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
- * 
- * Please contact http://www.cmu.edu/silicon-valley/ if you have any 
- * questions.
- * 
- * */
-package models.metadata;
-
-import java.util.*;
-
-import util.APICall;
-
-//import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.*;
-
-public class DeviceType {
-
-	private String id;
-	private String deviceTypeName;
-	private String manufacturer;
-	private double version;
-	private String deviceTypeUserDefinedFields;
-
-	private List<String> sensorTypeNames = new ArrayList<String>();
-
-	// http://einstein.sv.cmu.edu/get_devices/json
-	private static final String GET_DEVICE_TYPES_CALL = util.Constants.NEW_API_URL
-			+ util.Constants.NEW_GET_DEVICE_TYPES + util.Constants.FORMAT;
-	private static final String ADD_DEVICE_TYPE_CALL = util.Constants.NEW_API_URL
-			+ util.Constants.NEW_ADD_DEVICE_TYPE;
-	private static final String DELETE_DEVICE_TYPE_CALL = util.Constants.NEW_API_URL
-			+ util.Constants.NEW_DELETE_DEVICE_TYPE;
-	private static final String EDIT_DEVICE_TYPE_CALL = util.Constants.NEW_API_URL
-			+ util.Constants.NEW_EDIT_DEVICE_TYPE;
-
-	// Constructors
-	public DeviceType() {
-	}
-
-	public DeviceType(String id, String deviceTypeName, String manufacturer,
-			double version, List<String> sensorTypeNames,
-			String deviceTypeUserDefinedFields) {
-		super();
-		this.id = id;
-		this.deviceTypeName = deviceTypeName;
-		this.manufacturer = manufacturer;
-		this.version = version;
-		this.sensorTypeNames = sensorTypeNames;
-		this.deviceTypeUserDefinedFields = deviceTypeUserDefinedFields;
-	}
-
-	// Getters
-	public String getId() {
-		return id;
-	}
-
-	public String getDeviceTypeName() {
-		return deviceTypeName;
-	}
-
-	public String getManufacturer() {
-		return manufacturer;
-	}
-
-	public double getVersion() {
-		return version;
-	}
-
-	public List<String> getSensorTypeNames() {
-		return sensorTypeNames;
-	}
-
-	public String getDeviceTypeUserDefinedFields() {
-		return deviceTypeUserDefinedFields;
-	}
-
-	// Setters
-	public void setId(String id) {
-		this.id = id;
-	}
-
-	public void setDeviceTypeName(String deviceTypeName) {
-		this.deviceTypeName = deviceTypeName;
-	}
-
-	public void setManufacturer(String manufacturer) {
-		this.manufacturer = manufacturer;
-	}
-
-	public void setVersion(double version) {
-		this.version = version;
-	}
-
-	public void setSensorTypeNames(List<String> sensorTypeNames) {
-		this.sensorTypeNames = sensorTypeNames;
-	}
-
-	public void setDeviceTypeUserDefinedFields(
-			String deviceTypeUserDefinedFields) {
-		this.deviceTypeUserDefinedFields = deviceTypeUserDefinedFields;
-	}
-
-	public void addSensorTypeName(String sensorTypeName) {
-		this.sensorTypeNames.add(sensorTypeName);
-	}
-
-	public void deleteSensorTypeName(String sensorTypeName) {
-		for (int i = 0; i < this.sensorTypeNames.size(); i++) {
-			if (sensorTypeName.equals(this.sensorTypeNames.get(i))) {
-				this.sensorTypeNames.remove(i);
-			}
-		}
-	}
-
-	/**
-	 * Method to call the API to add a new device type
-	 * 
-	 * @param jsonData
-	 * @return the response json from the API server
-	 */
-	public static JsonNode create(JsonNode jsonData) {
-		return APICall.postAPI(ADD_DEVICE_TYPE_CALL, jsonData);
-	}
-
-	/**
-	 * Method to call the API to edit a device type
-	 * 
-	 * @param jsonData
-	 * @return the response json from the API server
-	 */
-	public static JsonNode edit(String deviceTypeName, JsonNode jsonData) {
-		return APICall.putAPI(EDIT_DEVICE_TYPE_CALL + deviceTypeName, jsonData);
-	}
-
-	/**
-	 * Method to call the API to delete a device type with its id
-	 * 
-	 * @param id
-	 * @return the response json from the API server
-	 */
-	public static JsonNode delete(String deviceTypeName) {
-		return APICall.deleteAPI(DELETE_DEVICE_TYPE_CALL + deviceTypeName);
-	}
-
-	/**
-	 * Method to display all devices
-	 * 
-	 * @return List of all device types
-	 */
-	public static List<DeviceType> all() {
-
-		List<DeviceType> allDeviceTypes = new ArrayList<DeviceType>();
-
-		JsonNode deviceTypesNode = APICall.callAPI(GET_DEVICE_TYPES_CALL);
-
-		if (deviceTypesNode == null || deviceTypesNode.has("error")
-				|| !deviceTypesNode.isArray())
-			return allDeviceTypes;
-
-		for (int i = 0; i < deviceTypesNode.size(); i++) {
-			JsonNode json = deviceTypesNode.path(i);
-			DeviceType newDeviceType = new DeviceType();
-
-			newDeviceType.setId(UUID.randomUUID().toString());
-			newDeviceType.setDeviceTypeName(json.findPath("deviceTypeName")
-					.asText());
-			newDeviceType.setManufacturer(json.findPath("manufacturer")
-					.asText());
-			newDeviceType.setVersion(json.findPath("version").asDouble());
-			newDeviceType.setDeviceTypeUserDefinedFields(json.findPath(
-					"deviceTypeUserDefinedFields").asText());
-
-			JsonNode sensorTypeNamesJson = json.findPath("sensorTypeNames");
-			for (int j = 0; j < sensorTypeNamesJson.size(); j++) {
-				newDeviceType.addSensorTypeName(sensorTypeNamesJson.get(j)
-						.asText());
-			}
-
-			allDeviceTypes.add(newDeviceType);
-		}
-
-		return allDeviceTypes;
-
-	}
-
-	/**
-	 * Method to display all device types' name
-	 * 
-	 * @return a list of all device types' name
-	 */
-	public static List<String> allDeviceTypeName() {
-		List<DeviceType> allList = all();
-		List<String> resultList = new ArrayList<String>();
-		for (DeviceType element : allList) {
-			String elementName = element.getDeviceTypeName();
-			if (elementName != null)
-				resultList.add(elementName);
-		}
-		return resultList;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a0c167b8/app/models/metadata/Sensor.java
----------------------------------------------------------------------
diff --git a/app/models/metadata/Sensor.java b/app/models/metadata/Sensor.java
deleted file mode 100644
index b56037f..0000000
--- a/app/models/metadata/Sensor.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
- * Copyright (c) 2013 Carnegie Mellon University Silicon Valley. 
- * All rights reserved. 
- * 
- * This program and the accompanying materials are made available
- * under the terms of dual licensing(GPL V2 for Research/Education
- * purposes). GNU Public License v2.0 which accompanies this distribution
- * is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
- * 
- * Please contact http://www.cmu.edu/silicon-valley/ if you have any 
- * questions.
- * 
- * */
-package models.metadata;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
-import com.fasterxml.jackson.databind.JsonNode;
-
-import util.APICall;
-
-/**
- * @author lyman
- *
- */
-public class Sensor {
-	private String id;
-	private String sensorName;
-	// private SensorType sensorType;
-	// private Device device;
-	private String sensorTypeName;
-	private String deviceUri;
-	private String sensorCategoryName;
-	private String sensorUserDefinedFields;
-
-	public Sensor() {
-
-	}
-
-	// http://einstein.sv.cmu.edu/get_sensors/json
-	private static final String GET_SENSORS_CALL = util.Constants.NEW_API_URL
-			+ util.Constants.NEW_GET_SENSORS + util.Constants.FORMAT;
-
-	private static final String DELETE_SENSOR_CALL = util.Constants.NEW_API_URL
-			+ util.Constants.NEW_DELETE_SENSOR;
-	private static final String ADD_SENSOR_CALL = util.Constants.NEW_API_URL
-			+ util.Constants.NEW_ADD_SENSOR;
-	private static final String EDIT_SENSOR_CALL = util.Constants.NEW_API_URL
-			+ util.Constants.NEW_EDIT_SENSOR;
-
-	public String getId() {
-		return id;
-	}
-
-	public void setId(String id) {
-		this.id = id;
-	}
-
-	public String getSensorName() {
-		return sensorName;
-	}
-
-	public void setSensorName(String sensorName) {
-		this.sensorName = sensorName;
-	}
-
-	// public Device getDevice() {
-	// return device;
-	// }
-	// public void setDevice(Device device) {
-	// this.device = device;
-	// }
-
-	public String getDeviceUri() {
-		return deviceUri;
-	}
-
-	public void setDeviceUri(String deviceUri) {
-		this.deviceUri = deviceUri;
-	}
-
-	public String getSensorTypeName() {
-		return sensorTypeName;
-	}
-
-	public void setSensorTypeName(String sensorTypeName) {
-		this.sensorTypeName = sensorTypeName;
-	}
-
-	public String getSensorCategoryName() {
-		return sensorCategoryName;
-	}
-
-	public void setSensorCategoryName(String sensorCategoryName) {
-		this.sensorCategoryName = sensorCategoryName;
-	}
-
-	public String getSensorUserDefinedFields() {
-		return sensorUserDefinedFields;
-	}
-
-	public void setSensorUserDefinedFields(String sensorUserDefinedFields) {
-		this.sensorUserDefinedFields = sensorUserDefinedFields;
-	}
-
-
-	/**
-	 * Method to display all sensors
-	 * 
-	 * @return a list of all sensors
-	 */
-	public static List<Sensor> all() {
-		List<Sensor> allSensors = new ArrayList<Sensor>();
-
-		// Call the API to get the json string
-		JsonNode sensorsNode = APICall.callAPI(GET_SENSORS_CALL);
-
-		// if no value is returned or error or is not json array
-		if (sensorsNode == null || sensorsNode.has("error")
-				|| !sensorsNode.isArray()) {
-			return allSensors;
-		}
-
-		// parse the json string into object
-		for (int i = 0; i < sensorsNode.size(); i++) {
-			JsonNode json = sensorsNode.path(i);
-			Sensor newSensor = new Sensor();
-
-			newSensor.setId(UUID.randomUUID().toString());
-			newSensor.setSensorName(json.findPath("sensorName").asText());
-			newSensor.setSensorTypeName(json.findPath("sensorTypeName")
-					.asText());
-			newSensor.setDeviceUri(json.findPath("deviceUri").asText());
-			newSensor.setSensorCategoryName(json.findPath("sensorCategoryName")
-					.asText());
-			newSensor.setSensorUserDefinedFields(json.findPath(
-					"sensorUserDefinedFields").asText());
-
-			allSensors.add(newSensor);
-		}
-
-		return allSensors;
-
-	}
-
-	/**
-	 * Method to call the API to add a new sensor
-	 * 
-	 * @param jsonData
-	 * @return the response json from the API server
-	 */
-	public static JsonNode create(JsonNode jsonData) {
-		return APICall.postAPI(ADD_SENSOR_CALL, jsonData);
-	}
-
-	public static JsonNode edit(JsonNode jsonData) {
-		return APICall.postAPI(EDIT_SENSOR_CALL, jsonData);
-	}
-	
-	/**
-	 * Method to call the API to delete a sensor with its name
-	 * 
-	 * @param sensorName
-	 * @return the response json from the API server
-	 */
-	public static JsonNode delete(String sensorName) {
-		return APICall.deleteAPI(DELETE_SENSOR_CALL + sensorName);
-	}
-
-	/**
-	 * Generate a list of all sensor names
-	 * 
-	 * @return a list of all sensor names
-	 */
-	public static List<String> allSensorNames(){
-		List<String> res = new ArrayList<String>();
-		for (Sensor sensor : all()) {
-			res.add(sensor.getSensorName());
-		}
-		return res;
-	}
-	
-	
-	
-	/**
-	 * Generate a map between all sensor names and sensor object
-	 * @return a map
-	 */
-	public static Map<String, Sensor> allSensorNamesMap() {
-		List<Sensor> allList = all();
-		
-		HashMap<String, Sensor> result = new HashMap<String, Sensor>();
-		for (Sensor element : allList) {
-			String elementName = element.getSensorName();
-			if (elementName != null)
-				result.put(elementName, element);
-		}
-		return result;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a0c167b8/app/models/metadata/SensorCategory.java
----------------------------------------------------------------------
diff --git a/app/models/metadata/SensorCategory.java b/app/models/metadata/SensorCategory.java
deleted file mode 100644
index f5b4171..0000000
--- a/app/models/metadata/SensorCategory.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright (c) 2013 Carnegie Mellon University Silicon Valley. 
- * All rights reserved. 
- * 
- * This program and the accompanying materials are made available
- * under the terms of dual licensing(GPL V2 for Research/Education
- * purposes). GNU Public License v2.0 which accompanies this distribution
- * is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
- * 
- * Please contact http://www.cmu.edu/silicon-valley/ if you have any 
- * questions.
- * 
- * */
-package models.metadata;
-
-import java.util.*;
-
-import com.fasterxml.jackson.databind.JsonNode;
-
-import util.APICall;
-
-public class SensorCategory {
-
-	private String id;
-	private String sensorCategoryName;
-	private String purpose;
-	private static final String GET_SENSOR_CATEGORYS_CALL = util.Constants.NEW_API_URL
-			+ util.Constants.NEW_GET_SENSOR_CATEGORY + util.Constants.FORMAT;
-	private static final String ADD_SENSOR_CATEGOTY_CALL = util.Constants.NEW_API_URL
-			+ util.Constants.NEW_ADD_SENSOR_CATEGORY;
-	private static final String DELETE_SENSOR_CATEGOTY_CALL = util.Constants.NEW_API_URL
-			+ util.Constants.NEW_DELETE_SENSOR_CATEGORY;
-	private static final String EDIT_SENSOR_CATEGOTY_CALL = util.Constants.NEW_API_URL
-			+ util.Constants.NEW_EDIT_SENSOR_CATEGORY;
-
-	public SensorCategory() {
-		// TODO Auto-generated constructor stub
-	}
-
-	public String getId() {
-		return id;
-	}
-
-	public String getSensorCategoryName() {
-		return sensorCategoryName;
-	}
-
-	public String getPurpose() {
-		return purpose;
-	}
-
-	public void setId(String id) {
-		this.id = id;
-	}
-
-	public void setSensorCategoryName(String sensorCategoryName) {
-		this.sensorCategoryName = sensorCategoryName;
-	}
-
-	public void setPurpose(String purpose) {
-		this.purpose = purpose;
-	}
-
-	public static SensorCategory find(String id) {
-		SensorCategory sensorCategory = new SensorCategory();
-		sensorCategory.setId(id);
-		return sensorCategory;
-	}
-
-	/**
-	 * Generate the list of all sensor categories
-	 * 
-	 * @return a list of all the sensor categories
-	 */
-	public static List<SensorCategory> all() {
-
-		List<SensorCategory> sensorCategories = new ArrayList<SensorCategory>();
-
-		JsonNode sensorCategoriesNode = APICall
-				.callAPI(GET_SENSOR_CATEGORYS_CALL);
-
-		// if no value is returned or error or is not json array
-		if (sensorCategoriesNode == null || sensorCategoriesNode.has("error")
-				|| !sensorCategoriesNode.isArray()) {
-			return sensorCategories;
-		}
-
-		// parse the json string into object
-		for (int i = 0; i < sensorCategoriesNode.size(); i++) {
-			JsonNode json = sensorCategoriesNode.path(i);
-			SensorCategory newCategory = new SensorCategory();
-			newCategory.setSensorCategoryName(json.findPath(
-					"sensorCategoryName").asText());
-			newCategory.setPurpose(json.findPath("purpose").asText());
-			sensorCategories.add(newCategory);
-		}
-		return sensorCategories;
-	}
-
-	/**
-	 * Create a new sensor category
-	 * 
-	 * @param jsonData
-	 * @return the response from the API server
-	 */
-	public static JsonNode create(JsonNode jsonData) {
-		return APICall.postAPI(ADD_SENSOR_CATEGOTY_CALL, jsonData);
-	}
-
-	/**
-	 * Edit a sensor category
-	 * 
-	 * @param jsonData
-	 * @return
-	 */
-	public static JsonNode edit(JsonNode jsonData) {
-		return APICall.postAPI(EDIT_SENSOR_CATEGOTY_CALL, jsonData);
-	}
-
-	/**
-	 * Delete a sensor category
-	 * 
-	 * @param sensorCategoryName
-	 * @return
-	 */
-	public static JsonNode delete(String sensorCategoryName) {
-		return APICall.deleteAPI(DELETE_SENSOR_CATEGOTY_CALL
-				+ sensorCategoryName);
-	}
-
-	/**
-	 * Generate a list of sensor category names
-	 * 
-	 * @return a list of sensor category names
-	 */
-	public static List<String> allSensorCategoryName() {
-		List<SensorCategory> allList = all();
-		List<String> resultList = new ArrayList<String>();
-		for (SensorCategory element : allList) {
-			String elementName = element.getSensorCategoryName();
-			if (elementName != null)
-				resultList.add(elementName);
-		}
-		return resultList;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a0c167b8/app/models/metadata/SensorType.java
----------------------------------------------------------------------
diff --git a/app/models/metadata/SensorType.java b/app/models/metadata/SensorType.java
deleted file mode 100644
index 5bea518..0000000
--- a/app/models/metadata/SensorType.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- * Copyright (c) 2013 Carnegie Mellon University Silicon Valley. 
- * All rights reserved. 
- * 
- * This program and the accompanying materials are made available
- * under the terms of dual licensing(GPL V2 for Research/Education
- * purposes). GNU Public License v2.0 which accompanies this distribution
- * is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
- * 
- * Please contact http://www.cmu.edu/silicon-valley/ if you have any 
- * questions.
- * 
- * */
-package models.metadata;
-
-import java.util.*;
-
-import util.APICall;
-
-import com.fasterxml.jackson.databind.JsonNode;
-
-public class SensorType {
-
-	private String id;
-	private String sensorTypeName;
-	private String manufacturer;
-	private double version;
-	private double maxValue;
-	private double minValue;
-	private String unit;
-	private String interpreter;
-
-	// newly added attributes
-	private String sensorTypeUserDefinedFields;
-	private String sensorCategoryName;
-
-	// removed attributes
-	// private SensorCategory sensorCategory;
-
-	// http://einstein.sv.cmu.edu/get_devices/json
-	private static final String GET_SENSOR_TYPES_CALL = util.Constants.NEW_API_URL
-			+ util.Constants.NEW_GET_SENSOR_TYPES + util.Constants.FORMAT;
-
-	private static final String ADD_SENSOR_TYPE_CALL = util.Constants.NEW_API_URL
-			+ util.Constants.NEW_ADD_SENSOR_TYPE;
-	private static final String DELETE_SENSOR_TYPE_CALL = util.Constants.NEW_API_URL
-			+ util.Constants.NEW_DELETE_SENSOR_TYPE;
-	private static final String EDIT_SENSOR_TYPE_CALL = util.Constants.NEW_API_URL
-			+ util.Constants.NEW_EDIT_SENSOR_TYPE;
-
-	public SensorType() {
-		// TODO Auto-generated constructor stub
-
-	}
-
-	public String getId() {
-		return id;
-	}
-
-	public void setId(String id) {
-		this.id = id;
-	}
-
-	public String getSensorTypeName() {
-		return sensorTypeName;
-	}
-
-	public void setSensorTypeName(String sensorTypeName) {
-		this.sensorTypeName = sensorTypeName;
-	}
-
-	public String getManufacturer() {
-		return manufacturer;
-	}
-
-	public void setManufacturer(String manufacturer) {
-		this.manufacturer = manufacturer;
-	}
-
-	public double getVersion() {
-		return version;
-	}
-
-	public void setVersion(double version) {
-		this.version = version;
-	}
-
-	public double getMaxValue() {
-		return maxValue;
-	}
-
-	public void setMaxValue(double maxValue) {
-		this.maxValue = maxValue;
-	}
-
-	public double getMinValue() {
-		return minValue;
-	}
-
-	public void setMinValue(double minValue) {
-		this.minValue = minValue;
-	}
-
-	public String getUnit() {
-		return unit;
-	}
-
-	public void setUnit(String unit) {
-		this.unit = unit;
-	}
-
-	public String getInterpreter() {
-		return interpreter;
-	}
-
-	public void setInterpreter(String interpreter) {
-		this.interpreter = interpreter;
-	}
-
-	// public SensorCategory getSensorCategory() {
-	// return sensorCategory;
-	// }
-	//
-	// public void setSensorCategory(SensorCategory sensorCategory) {
-	// this.sensorCategory = sensorCategory;
-	// }
-
-	public String getSensorTypeUserDefinedFields() {
-		return sensorTypeUserDefinedFields;
-	}
-
-	public void setSensorTypeUserDefinedFields(
-			String sensorTypeUserDefinedFields) {
-		this.sensorTypeUserDefinedFields = sensorTypeUserDefinedFields;
-	}
-
-	public String getSensorCategoryName() {
-		return sensorCategoryName;
-	}
-
-	public void setSensorCategoryName(String sensorCategoryName) {
-		this.sensorCategoryName = sensorCategoryName;
-	}
-
-	/**
-	 * Get a list of all sensor types
-	 * @return a list of all sensor types
-	 */
-	public static List<SensorType> all() {
-		List<SensorType> allSensorTypes = new ArrayList<SensorType>();
-
-		// Call the API to get the json string
-		JsonNode sensorTypesNode = APICall.callAPI(GET_SENSOR_TYPES_CALL);
-
-		if (sensorTypesNode == null || sensorTypesNode.has("error")
-				|| !sensorTypesNode.isArray()) {
-			return allSensorTypes;
-		}
-
-		// parse the json string into object
-		// parse the json string into object
-		for (int i = 0; i < sensorTypesNode.size(); i++) {
-			JsonNode json = sensorTypesNode.path(i);
-			SensorType newSensorType = new SensorType();
-
-			newSensorType.setId(UUID.randomUUID().toString());
-			newSensorType.setSensorTypeName(json.findPath("sensorTypeName")
-					.asText());
-			newSensorType.setManufacturer(json.findPath("manufacturer")
-					.asText());
-			newSensorType.setVersion(json.findPath("version").asDouble());
-			newSensorType.setMaxValue(json.findPath("maximumValue").asDouble());
-			newSensorType.setMinValue(json.findPath("minimumValue").asDouble());
-			newSensorType.setUnit(json.findPath("unit").asText());
-			newSensorType.setInterpreter(json.findPath("interpreter").asText());
-			newSensorType.setSensorTypeUserDefinedFields(json.findPath(
-					"sensorTypeUserDefinedFields").asText());
-			newSensorType.setSensorCategoryName(json.findPath(
-					"sensorCategoryName").asText());
-
-			// newSensorType.setSensorCategoryName();
-
-			allSensorTypes.add(newSensorType);
-		}
-
-
-		return allSensorTypes;
-
-	}
-
-
-	/**
-	 * Method to display all sensor types' name
-	 * 
-	 * @return a list of all sensor types' name
-	 */
-	public static List<String> allSensorTypeName() {
-		List<SensorType> allList = all();
-		List<String> resultList = new ArrayList<String>();
-		for (SensorType element : allList) {
-			String elementName = element.getSensorTypeName();
-			if (elementName != null)
-				resultList.add(elementName);
-		}
-		return resultList;
-	}
-
-	/**
-	 * Method to call the API to add a new sensor type
-	 * 
-	 * @param jsonData
-	 * @return the response json from the API server
-	 */
-	public static JsonNode create(JsonNode jsonData) {
-		return APICall.postAPI(ADD_SENSOR_TYPE_CALL, jsonData);
-	}
-	
-	/**
-	 * Method to call the API to edit the sensor type
-	 * 
-	 * @param jsonData
-	 * @return the response json from the API server
-	 */
-	public static JsonNode edit(JsonNode jsonData){
-		return APICall.postAPI(EDIT_SENSOR_TYPE_CALL, jsonData);
-	}
-
-	/**
-	 * Method to call the API to delete a sensor type by its name
-	 * @param sensorTypeName
-	 * @return the response json from the API server
-	 */
-	public static JsonNode delete(String sensorTypeName) {
-		return APICall.deleteAPI(DELETE_SENSOR_TYPE_CALL + sensorTypeName);
-	}
-
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a0c167b8/app/views/dashboard.scala.html
----------------------------------------------------------------------
diff --git a/app/views/dashboard.scala.html b/app/views/dashboard.scala.html
deleted file mode 100644
index be6e081..0000000
--- a/app/views/dashboard.scala.html
+++ /dev/null
@@ -1,112 +0,0 @@
-
-@(dashboard: Dashboard, currentTime: String) 
-@import helper._ 
-
-@main("Dashboard") {
-
-<link rel="stylesheet" href='@routes.Assets.at("stylesheets/jquery.jqplot.min.css")'>
-
-<script src='@routes.Assets.at("javascripts/jquery.jqplot.min.js")'
-	type="text/javascript"></script>
-<script src='@routes.Assets.at("javascripts/jqplot.pieRenderer.min.js")'
-	type="text/javascript"></script>
-	
-<script class="code" type="text/javascript">
-      $(document).ready(
-        function(){
-          active = parseInt($("#activeCount").attr("value"));
-          inactive = parseInt($("#totalCount").attr("value")) - active;
-          var data = [ ['Active', active],['Inactive', inactive] ];
-          var plot1 = jQuery.jqplot ('healthchart', [data], 
-            { 
-              seriesDefaults: {                
-                seriesColors: [ "#dff0d8", "#f2dede", "#fcf8e3", "#4bb2c5", "#c5b47f", "#EAA228"],                
-                renderer: jQuery.jqplot.PieRenderer, 
-                rendererOptions: {                  
-                  showDataLabels: true
-                }
-              }, 
-              legend: { show:true, location: 'e' }
-            }
-          );
-      });
-</script>
-	
-	@flash_message()
-	<input id="activeCount" type="hidden" value="@dashboard.getActiveCount()" />
-	<input id="totalCount" type="hidden" value="@dashboard.getTotalCount()" />
-	<div class="row">
-		<h2>Last Check time : @currentTime</h2>
-	</div>
-	
-	<div class="row">
-		<h2>Device status</h2>
-		<p>You may observe the status of the devices in this table. Active devices 
-		  are in green rows while inactive devices are shown in red. An inactive device is one that 
-		  has not posted a sensor reading in the last 60 seconds.</p>
-	</div>
-	<div class="row">
-		<h3>Statistics</h3>
-		<p>Active devices: @dashboard.getActiveCount()</p>
-		<p>Total devices: @dashboard.getTotalCount()</p>		
-        <div id="healthchart" style="height:300px; width:500px;"></div>
-    </div>
-          
-	<div class="row">
-		
-		<table class="table table-bordered table-condensed">
-			<thead>
-				<tr>
-					<th>Device Uri</th>
-					<th>Device Type</th>
-					<th>Location</th>
-					<th>Status</th>
-				</tr>
-			</thead>
-		
-			<tbody>
-			
-
-				@for(boardItem <- dashboard.getItems()) {
-					<style>
-						.active {
-							color: green;
-							font: bold;
-						}
-						.inactive {
-							color: #f2dede;
-							font: italic;
-						}
-						.inactiveLine{
-							background-color: #fcf8e3;
-						}
-						.activeLine{
-							background-color: #dff0d8;
-						}
-					</style>
-					@defining(boardItem.getStatus() == 1){ isActive =>	
-					@if(isActive){
-						<tr class='activeLine'>
-					}else{
-						<tr class='inactiveLine'>
-					}
-						<td>@boardItem.getDevice().getDeviceUri()</td>
-						<td>@boardItem.getDevice().getDeviceTypeName()</td>
-						
-						<td>Longitude: @boardItem.getDevice().getLongitude(), Latitude: @boardItem.getDevice().getLatitude(), Altitude: @boardItem.getDevice().getAltitude()</td>
-						
-						<td>
-							@if(isActive){
-								<span class="active">Active</span>
-							}else{
-								<span class="inactive">Inactive</span>
-							}
-						</td>
-						</tr>
-					}				
-				}
-			
-			</tbody>				
-		</table>
-	</div>
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a0c167b8/app/views/devices.scala.html
----------------------------------------------------------------------
diff --git a/app/views/devices.scala.html b/app/views/devices.scala.html
deleted file mode 100644
index 9048c3e..0000000
--- a/app/views/devices.scala.html
+++ /dev/null
@@ -1,141 +0,0 @@
-
-@(devices: List[metadata.Device], deviceForm: play.data.Form[metadata.Device])
-
-@import helper._
-
-@scripts = {
-	<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
-	<script src='@routes.Assets.at("javascripts/device_search.js")'></script>
-}
-
-@main("Devices", scripts) {
-    
-    @flash_message()
-    
-    <div class="visual_search"></div>
-    
-    <h1>@devices.size() Devices</h1>
-		<table class="table table-striped table-bordered table-condensed">
-			<tr>
-	    	<td>URI</td>
-	    	<td>Device Type</td>
-	    	<td>Sensor Type Names within device</td>
-	    	<td>Sensor Names within device</td>
-	    	
-	    	<td>Location: Longitude</td>
-	    	<td>Location: Latitude</td>
-	    	<td>Location: Altitude</td>
-	    	<td>Location: Interpreter</td>
-	    	
-	    	<td>User Defined Fields</td>
-	    	
-	    	@if(session.get("email")){
-	    	<td>Operation</td>
-	    	}
-	    	</tr>
-
-    	@for(device <- devices) {
-    	<tr id="@device.getId()" class="devices">
-            <td class="deviceUri">@device.getDeviceUri()</td>
-            <td class="deviceTypeName">@device.getDeviceTypeName()</td>
-       		<td class="sensorTypeNames">@device.getSensorTypeNames()</td>
-       		<td class="sensorNames">@device.getSensorNames()</td>
-       		
-       		<td class="longitude">
-	       		<span class="@device.getDeviceUri() editable" data-name="longitude">
-	       		@device.getLongitude()
-	       		</span>
-       		</td>
-       		<td class="latitude">
-       			<span class="@device.getDeviceUri() editable" data-name="latitude">
-       			@device.getLatitude()
-       			</span>
-       		</td>
-       		<td class="altitude">
-       			<span class="@device.getDeviceUri() editable" data-name="altitude">
-       			@device.getAltitude()
-       			</span>
-       		</td>
-       		<td class="representation">
-       			<span class="@device.getDeviceUri() editable" data-name="representation">
-       			@device.getRepresentation()
-       			</span>
-       		</td>
-       		
-       		<td class="deviceUserDefinedFields">
-       			<span class="@device.getDeviceUri() editable"
-       				data-name='deviceUserDefinedFields'>
-            		@device.getDeviceUserDefinedFields()
-       			</span>
-       		</td>
-
-			@if(session.get("email")){
-				<td class="operation">
-						<input type="button" class="edit-btn btn btn-primary" value="Edit" 
-							data-pk='@device.getDeviceUri()' 
-							data-url='@routes.DeviceController.editDevice()'>		
-					@form(routes.DeviceController.deleteDevice()){
-              		 	<input name="idHolder" type="hidden" value="@device.getDeviceUri()">
-       					<input type="submit"  class="btn btn-danger" value="Delete" onclick="return confirm('Are you sure you want to delete this item?')">
-           			}
-						
-				</td>
-			}
-    	</tr>
-        }
-    </table>
-    
-    @if(session.get("email")){
-    <h2>Add a new device</h2>
-    
-    @form(routes.DeviceController.newDevice()) {
-        		
-        		@inputText(
-	                deviceForm("uri"), 
-	                '_label -> "URI *(Please DO NOT contain spaces)",
-	                '_error -> deviceForm.globalError                                
-            	)
-        		@select(
-        			deviceForm("deviceTypeName"), 
-                	options(metadata.DeviceType.allDeviceTypeName()),
-        			'_label -> "Device Type Name",
-              	  	'_error -> deviceForm.globalError
-        		)
-		        		
-		        @inputText(
-	                deviceForm("representation"), 
-	                '_label -> "Location Interpreter",
-	                'placeholder-> "GPS",                 
-	                '_error -> deviceForm.globalError                                
-		        )
-		        @inputText(
-	                deviceForm("longitude"), 
-	                '_label -> "Location Longitude",
-	                'placeholder-> "37.410355",                 
-	                '_error -> deviceForm.globalError                                
-		        )
-		        @inputText(
-	                deviceForm("latitude"), 
-	                '_label -> "Location Latitude",                 
-	                'placeholder-> "-122.059661",                 
-	                '_error -> deviceForm.globalError                                
-		        )
-		        @inputText(
-	                deviceForm("altitude"), 
-	                '_label -> "Location Altitude",                 
-	                'placeholder-> "0",                 
-	                '_error -> deviceForm.globalError                                
-		        )       		
-        		
-        		@inputText(
-	                deviceForm("deviceUserDefinedFields"), 
-	                '_label -> "User Defined Fields",
-	                '_error -> deviceForm.globalError                                
-            	)
-        <div class="actions">
-            <input type="submit" class="btn primary" value="Register">
-            <a href="@routes.DeviceController.devices()" class="btn">Cancel</a>
-        </div>
-    }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a0c167b8/app/views/header.scala.html
----------------------------------------------------------------------
diff --git a/app/views/header.scala.html b/app/views/header.scala.html
index 80d13c3..798a72e 100644
--- a/app/views/header.scala.html
+++ b/app/views/header.scala.html
@@ -16,35 +16,7 @@
 			<div class="navbar-collapse collapse" style="height:">
 				<ul class="nav navbar-nav navbar-right">
 
-					<li><a href="@routes.Application.index()">Home</a></li>
-					
-					<li class="dropdown"><a href="#"
-						class="dropdown-toggle" data-toggle="dropdown">Meta Data <b
-							class="caret"></b></a>
-						<ul class="dropdown-menu">
-							<li><a href="@routes.SensorCategoryController.sensorCategories()">1. Sensor
-									Categories</a></li>
-							<li><a href="">2. Sensor
-									Types</a></li>
-							<li><a href="">3. Device Types</a></li>							
-							<li><a href="@routes.DeviceController.devices()">4. Devices</a></li>
-							<li><a href="@routes.SensorController.sensors()">5. Sensors</a></li>
-						</ul></li>
-
-					<li class="dropdown"><a href="#" class="dropdown-toggle"
-						data-toggle="dropdown">Sensor Data<b class="caret"></b></a>
-						<ul class="dropdown-menu">
-							<li><a href="@routes.SensorReadingController.sensorReadings()">Data Export</a></li>
-							
-						</ul></li>
-						
-					<li class="dropdown"><a href="#" class="dropdown-toggle"
-						data-toggle="dropdown">Console Management<b class="caret"></b></a>
-						<ul class="dropdown-menu">
-							<li><a href="@routes.DashboardController.dashboard()">Dashboard</a></li>
-							<li><a href="http://sensorserviceplatform.github.io/VirtualSensorEditor/">Virtual Sensor Editor</a></li>
-							<li><a href="http://sensorserviceplatform.github.io/Visualization/">Virtualization</a></li>							
-						</ul></li>					
+					<li><a href="@routes.Application.index()">Home</a></li>				
 											
 					<li><a href="@routes.AboutusController.aboutus()">About Us</a></li>
 

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a0c167b8/app/views/sensorCategories.scala.html
----------------------------------------------------------------------
diff --git a/app/views/sensorCategories.scala.html b/app/views/sensorCategories.scala.html
deleted file mode 100644
index 798f4e7..0000000
--- a/app/views/sensorCategories.scala.html
+++ /dev/null
@@ -1,76 +0,0 @@
-
-@(sensorCategories: List[metadata.SensorCategory], sensorCategoryForm: play.data.Form[metadata.SensorCategory])
-
-@import helper._
-
-@scripts = {
-	<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
-}
-
-@main("Sensor Categories", scripts) {
-	
-	@flash_message()    
-
-    <h1>@sensorCategories.size() Sensor Categories</h1>
-		<table class="table table-striped table-bordered table-condensed">
-	<tr>
-		<td>Sensor Category Name</td>
-		<td>Purpose</td> 
-		@if(session.get("email")){
-			<td>Operation</td> 
-		}
-	</tr>
-
-	@for(sensorCategory <- sensorCategories) {
-	<tr>
-		<td>@sensorCategory.getSensorCategoryName()</td>
-
-		<td><span class="@sensorCategory.getSensorCategoryName() editable" data-name='purpose'>
-				@sensorCategory.getPurpose() </span></td>
-
-		@if(session.get("email")){
-			<td class="operation">
-				<input type="button" class="edit-btn btn btn-primary" value="Edit" 
-					data-pk='@sensorCategory.getSensorCategoryName()' 
-					data-url='@routes.SensorCategoryController.editSensorCategory()' 
-				>
-				@form(routes.SensorCategoryController.deleteSensorCategory()){ 
-					<input
-						name="idHolder" class="hidden" type="hidden"
-						value="@sensorCategory.getSensorCategoryName()"> 
-					<input
-						type="submit" class="btn btn-danger delete-btn" value="Delete"
-						onclick="return confirm('Are you sure you want to delete this item?')">
-				}
-			</td> 
-		}
-	</tr>
-	}
-    </table>
-    
-     @if(session.get("email")){
-	    <h2>Add a new sensor category</h2>
-	    
-	    @form(routes.SensorCategoryController.newSensorCategory()) {
-	        
-	        @inputText(
-	        	sensorCategoryForm("Name"),
-	        	'_label -> "Name * (Please DO NOT contain spaces)"
-	        )
-	        @inputText(
-	        	sensorCategoryForm("Purpose"),
-	        	'_label -> "Purpose"
-	        ) 
-	
-	        <input class="btn" type="submit" value="Create">
-	        <a href="@routes.SensorCategoryController.sensorCategories()" class="btn">Cancel</a>
-	    }
-	
-		<br>
-		    
-	    @form(routes.SensorCategoryController.downloadSensorCategory(), 'class -> "form-horizontal", 'role -> "form") {
-	
-	        <button type="submit" name="action" value="download">Download</button>
-	    }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/a0c167b8/app/views/sensorReading.scala.html
----------------------------------------------------------------------
diff --git a/app/views/sensorReading.scala.html b/app/views/sensorReading.scala.html
deleted file mode 100644
index 63f0c64..0000000
--- a/app/views/sensorReading.scala.html
+++ /dev/null
@@ -1,138 +0,0 @@
-@(sensorReadingForm: play.data.Form[SensorReading]) 
-@import helper._
-
-
-@main("Sensor Reading") { 
-
-@flash_message() 
-    
-    
-
-@helper.form(action = routes.SensorReadingController.getSensorReadingsWithinRange) {
-<fieldset>
-	<legend>Sensor Reading within a time range</legend>
-
-
-	@select( 
-		sensorReadingForm("sensorName"),
-		options(metadata.Sensor.allSensorNames()),
-	 	'_label -> "Sensor Name",
-		'_error -> sensorReadingForm.globalError
-	)
-	<div class="ui-picker">
-
-		<p>
-			<label>Start Date</label> <input class="startDate" type="date"
-				name="startDate" />
-		</p>
-		<p>
-			<label>Start Time</label> <input class="startTime" name="startTime"
-				type="text" value="10:59:00" />
-		</p>
-
-		<p>
-			<label>End Date</label> <input class="endDate" type="date"
-				name="endDate" />
-		</p>
-		<p>
-			<label>End Time</label> <input class="endTime" name="endTime"
-				type="text" value="11:00:00" />
-		</p>
-	</div>
-
-</fieldset>
-
-
-<div class="actions">
-	<p>
-		<button type="submit" class="btn primary" name="action" value="Download">Download Json File</button>
-		 <a
-		href="@routes.Application.index" class="btn">Cancel</a>
-	</p>
-</div>
-
-}
-
-@helper.form(action = routes.SensorReadingController.getSensorReadingsAtTimestamp) {
-<fieldset>
-	<legend>Sensor Reading at a Specific Timestamp</legend>
-
-
-	@select( 
-		sensorReadingForm("sensorName2"),
-		options(metadata.Sensor.allSensorNames()),
-	 	'_label -> "Sensor Name",
-		'_error -> sensorReadingForm.globalError
-	)
-	<div class="ui-picker">
-
-		<p>
-			<label>Date</label> <input class="startDate" type="date"
-				name="Date" />
-		</p>
-		<p>
-			<label>Time</label> <input class="startTime" name="Time"
-				type="text" value="10:59:00" />
-		</p>
-
-	</div>
-
-</fieldset>
-
-
-<div class="actions">
-	<p>
-		<button type="submit" class="btn primary" name="action" value="Download">Download Json File</button>
-		<a
-		href="@routes.Application.index" class="btn">Cancel</a>
-	</p>
-</div>
-}
-
-
-
-@helper.form(action = routes.SensorReadingController.getLatestSensorReadings()) {
-<fieldset>
-	<legend>Latest Sensor Reading at a Specific Timestamp for one type in all registered devices</legend>
-
-
-	@select( 
-		sensorReadingForm("sensorType"),
-		options(metadata.SensorType.allSensorTypeName()),
-	 	'_label -> "Sensor Type Name",
-		'_error -> sensorReadingForm.globalError
-	)
-</fieldset>
-
-
-<div class="actions">
-	<p>
-		<button type="submit" class="btn primary" name="action" value="Download">Download Json File</button>
-		<a
-		href="@routes.Application.index" class="btn">Cancel</a>
-	</p>
-</div>
-
-}
-
-	<script type="text/javascript">
-
-	$(function() {
-		Date.prototype.toDateInputValue = (function() {
-			var local = new Date(this);
-			local.setMinutes(this.getMinutes() - this.getTimezoneOffset());
-			return local.toJSON().slice(0, 10);
-		});
-		
-		
-		var curTimestamp = new Date();
-		$('.startDate').val(curTimestamp.toDateInputValue());
-		$('.endDate').val(curTimestamp.toDateInputValue());
-		$('.startTime').val("09:00:00");
-		$('.endTime').val("18:00:00");
-		
-		
-		});
-	</script>
-
-}


[29/50] [abbrv] incubator-cmda git commit: Delete some useless files

Posted by xi...@apache.org.
Delete some useless files

Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/cd1b303b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/cd1b303b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/cd1b303b

Branch: refs/heads/master
Commit: cd1b303b446e52da06815e41c89843322f19fb17
Parents: b87c13a
Author: mingqi830 <mq...@andrew.cmu.edu>
Authored: Fri Sep 4 15:11:14 2015 -0700
Committer: mingqi830 <mq...@andrew.cmu.edu>
Committed: Fri Sep 4 15:11:14 2015 -0700

----------------------------------------------------------------------
 a.c                |   7 -------
 scala-2.10.3.tgz   | Bin 30531249 -> 0 bytes
 sensor.json        |   1 -
 setup_constants.sh |  11 -----------
 user.json          |   1 -
 5 files changed, 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/cd1b303b/a.c
----------------------------------------------------------------------
diff --git a/a.c b/a.c
deleted file mode 100644
index 093c70e..0000000
--- a/a.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-int main(){
-	char a[200];
-	printf("%lu\n", strlen(a));
-}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/cd1b303b/scala-2.10.3.tgz
----------------------------------------------------------------------
diff --git a/scala-2.10.3.tgz b/scala-2.10.3.tgz
deleted file mode 100644
index 8173314..0000000
Binary files a/scala-2.10.3.tgz and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/cd1b303b/sensor.json
----------------------------------------------------------------------
diff --git a/sensor.json b/sensor.json
deleted file mode 100644
index 1507374..0000000
--- a/sensor.json
+++ /dev/null
@@ -1 +0,0 @@
-[{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:55 AM","value":"20.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:54 AM","value":"22.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:54 AM","value":"25.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:54 AM","value":"22.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:54 AM","value":"26.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:54 AM","value":"28.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:53 AM","value":"42.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:53 AM","value":"53.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:53 AM","value":"27.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:53 AM","v
 alue":"22.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:53 AM","value":"21.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:53 AM","value":"19.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:52 AM","value":"18.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:52 AM","value":"19.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:52 AM","value":"18.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:52 AM","value":"17.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:50 AM","value":"16.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:50 AM","value":"15.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:49 AM","value":"14.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10
 :59:49 AM","value":"15.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:49 AM","value":"16.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:48 AM","value":"17.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:48 AM","value":"16.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:48 AM","value":"16.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:48 AM","value":"14.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:47 AM","value":"15.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:47 AM","value":"15.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:47 AM","value":"16.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:47 AM","value":"16.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Ma
 r 24, 2014 10:59:47 AM","value":"16.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:47 AM","value":"17.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:47 AM","value":"17.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:47 AM","value":"16.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:47 AM","value":"16.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:47 AM","value":"16.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:46 AM","value":"15.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:46 AM","value":"15.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:46 AM","value":"15.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:46 AM","value":"18.0"},{"sensorName":"androidLight","isIndoor":false,"t
 imeStamp":"Mar 24, 2014 10:59:44 AM","value":"19.0"},{"sensorName":"androidLight","isIndoor":false,"timeStamp":"Mar 24, 2014 10:59:44 AM","value":"20.0"}]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/cd1b303b/setup_constants.sh
----------------------------------------------------------------------
diff --git a/setup_constants.sh b/setup_constants.sh
deleted file mode 100644
index b05efbb..0000000
--- a/setup_constants.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /usr/bin/env bash
-#Changes all instances of port 9020 to the port you hosted your app on.
-sed  -i -r 's/:9020/:9038/g' /media/wwang3/JPL-Front/app/util/Constants.java
-sed  -i -r 's/:9020/:9038/g' /media/wwang3/JPL-Front/app/models/DataSet.java
-sed  -i -r 's/:9020/:9038/g' /media/wwang3/JPL-Front/app/models/NasaRegistration.java
-sed  -i -r 's/:9020/:9038/g' /media/wwang3/JPL-Front/app/controllers/AccountController.java
-#Changes all instances of localhost to a specified IP
-#sed  -i -r 's/localhost/10.0.20.144/g' /media/wwang3/JPL-Front/app/util/Constants.java
-#sed  -i -r 's/localhost/10.0.20.144/g' /media/wwang3/JPL-Front/app/models/DataSet.java
-#sed  -i -r 's/localhost/10.0.20.144/g' /media/wwang3/JPL-Front/app/models/NasaRegistration.java
-#sed  -i -r 's/localhost/10.0.20.144/g' /media/wwang3/JPL-Front/app/controllers/AccountController.java

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/cd1b303b/user.json
----------------------------------------------------------------------
diff --git a/user.json b/user.json
deleted file mode 100644
index 00bd727..0000000
--- a/user.json
+++ /dev/null
@@ -1 +0,0 @@
-[{"id":null,"climateServiceName":"2-D_Variable_Map","purpose":"This service generates a map of a 2-dimensional variable with time averaging and spatial subsetting.  Select a data source (model or observation), a variable name, a time range, and a spatial range (lat-lon box) below.","url":"http://einstein.sv.cmu.edu:9003/cmac/web/twoDimMap.html","scenario":"1","version":"1","rootservice":"1"},{"id":null,"climateServiceName":"2-D_Variable_Zonal_Mean","purpose":"This service generates a graph of a 2-dimensional variable's zonal mean with time averaing.  Select a data source (model or observation), a variable name, and a time range below.","url":"http://einstein.sv.cmu.edu:9003/cmac/web/twoDimZonalMean.html","scenario":"1","version":"1","rootservice":"1"},{"id":null,"climateServiceName":"2-D_Variable_Time_Series","purpose":"This service generates a graph of a 2-dimensional variable's time series with monthly averaged values.  Select a data source (model or observation), a variable name,
  a time range, and a spatial range below.","url":"http://einstein.sv.cmu.edu:9003/cmac/web/twoDimTimeSeries.html","scenario":"1","version":"1","rootservice":"1"},{"id":null,"climateServiceName":"3-D_Variable_2-D_Slice","purpose":"This service generates a slice map of a 3-dimensional variable at a selected pressure level.  Select a data source, a variable name, a time range, a spatial range, and a pressure level below.","url":"http://einstein.sv.cmu.edu:9003/cmac/web/twoDimSlice3D.html","scenario":"1","version":"1","rootservice":"1"},{"id":null,"climateServiceName":"3-D_Variable_Zonal_Mean","purpose":"This service generates a contour plot of zonal-mean vertical profiles of a 3-dimensional variable.  Select a data source, a variable name, a time range, and a pressure range below.","url":"http://einstein.sv.cmu.edu:9003/cmac/web/threeDimZonalMean.html","scenario":"1","version":"1","rootservice":"1"},{"id":null,"climateServiceName":"3-D_Variable_Average_Vertical_Profile","purpose":"This
  service generates the average of a three-dimensional variable over a specified region and time and display the average as a function of pressure level as an X-Y plot. ","url":"http://einstein.sv.cmu.edu:9003/cmac/web/threeDimVarVertical.html","scenario":"1","version":"1","rootservice":"1"},{"id":null,"climateServiceName":"Difference_Plot_of_Two_Time_Averaged_Variables","purpose":"This service calculates the differences between two specified variables and displays the lat-lon maps of the two variables and their differences.","url":"http://einstein.sv.cmu.edu:9003/cmac/web/diffPlot2Vars.html","scenario":"1","version":"1","rootservice":"1"},{"id":null,"climateServiceName":"Conditional_Sampling","purpose":"This service sorts one variable by the values of another variable (environmental condition, e.g. SST) and displays the averaged value of the first variable as a function of the bin value of the second variable.","url":"http://www.cs.ucl.ac.uk/staff/w.langdon/bloat_csrp-97-29/node2.ht
 ml","scenario":"1","version":"1","rootservice":"1"},{"id":null,"climateServiceName":"Scatter_and_Histogram_Plot_of_Two_Variables","purpose":"This service generates a scatter plot between two specified variables and the histograms of the two variables, and calculates the correlation of the two variables. ","url":"http://einstein.sv.cmu.edu:9003/cmac/web/scatterPlot2Vars.html","scenario":"1","version":"1","rootservice":"1"},{"id":null,"climateServiceName":"Scatte s","purpose":"This service generates a scatter plot between two specified variables and the histograms of the two variables, and calculates the correlation of the two variables. ","url":"http://einstein.sv.cmu.edu:9003/cmac/web/scatterPlot2Vars.html","scenario":"1","version":"1","rootservice":"1"},{"id":null,"climateServiceName":"tets test","purpose":"tes","url":"12","scenario":"1","version":"1","rootservice":"1"}]
\ No newline at end of file


[43/50] [abbrv] incubator-cmda git commit: add comment to all views packages

Posted by xi...@apache.org.
add comment to all views packages


Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/0b286267
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/0b286267
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/0b286267

Branch: refs/heads/master
Commit: 0b2862675d1bfa71399240e09d47dad2d697eac3
Parents: 94545d6
Author: cat1021 <lo...@gmail.com>
Authored: Fri Sep 4 16:30:01 2015 -0700
Committer: cat1021 <lo...@gmail.com>
Committed: Fri Sep 4 16:30:01 2015 -0700

----------------------------------------------------------------------
 app/views/flash_message.scala.html | 16 ++++++++++++++++
 app/views/index.scala.html         | 17 +++++++++++++++++
 2 files changed, 33 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/0b286267/app/views/flash_message.scala.html
----------------------------------------------------------------------
diff --git a/app/views/flash_message.scala.html b/app/views/flash_message.scala.html
index 4adbc5c..aa45530 100644
--- a/app/views/flash_message.scala.html
+++ b/app/views/flash_message.scala.html
@@ -1,3 +1,19 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
 
 @import helper._
 

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/0b286267/app/views/index.scala.html
----------------------------------------------------------------------
diff --git a/app/views/index.scala.html b/app/views/index.scala.html
index adb4b31..d26d92f 100644
--- a/app/views/index.scala.html
+++ b/app/views/index.scala.html
@@ -1,3 +1,20 @@
+@*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one or more		   *
+ * contributor license agreements.  See the NOTICE file distributed with	   *
+ * this work for additional information regarding copyright ownership.         *
+ * The ASF licenses this file to You under the Apache License, Version 2.0     *
+ * (the "License"); you may not use this file except in compliance with        *
+ * the License.  You may obtain a copy of the License at                       *
+ *                                                                             *
+ *    http://www.apache.org/licenses/LICENSE-2.0                               *
+ *																			   *
+ * Unless required by applicable law or agreed to in writing, software         *
+ * distributed under the License is distributed on an "AS IS" BASIS,           *
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    *
+ * See the License for the specific language governing permissions and         *
+ * limitations under the License.											   *
+ *******************************************************************************@ 
+
 @(message: String)
 
 @main("Welcome to Play") {


[31/50] [abbrv] incubator-cmda git commit: modify controller

Posted by xi...@apache.org.
modify controller


Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/085f450b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/085f450b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/085f450b

Branch: refs/heads/master
Commit: 085f450b3d38b7e66be764fd0ec0a9303720f3b0
Parents: cd1b303
Author: cat1021 <lo...@gmail.com>
Authored: Fri Sep 4 15:50:04 2015 -0700
Committer: cat1021 <lo...@gmail.com>
Committed: Fri Sep 4 15:50:04 2015 -0700

----------------------------------------------------------------------
 app/controllers/AboutusController.java        |  25 +-
 app/controllers/AccountController.java        |  63 +--
 app/controllers/Application.java              |  29 +-
 app/controllers/BugReportController.java      |  41 +-
 app/controllers/ClimateServiceController.java | 533 +++++++--------------
 app/controllers/HttpHelper.java               |  20 +-
 app/controllers/dataSetController.java        |  19 +-
 app/util/Constants.java                       |   2 +-
 8 files changed, 204 insertions(+), 528 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/085f450b/app/controllers/AboutusController.java
----------------------------------------------------------------------
diff --git a/app/controllers/AboutusController.java b/app/controllers/AboutusController.java
index eee5174..b27c8e0 100644
--- a/app/controllers/AboutusController.java
+++ b/app/controllers/AboutusController.java
@@ -1,38 +1,15 @@
 package controllers;
 
-/*
- * Copyright (c) 2013 Carnegie Mellon University Silicon Valley. 
- * All rights reserved. 
- * 
- * This program and the accompanying materials are made available
- * under the terms of dual licensing(GPL V2 for Research/Education
- * purposes). GNU Public License v2.0 which accompanies this distribution
- * is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
- * 
- * Please contact http://www.cmu.edu/silicon-valley/ if you have any 
- * questions.
- * 
- * */
-
-import java.util.List;
-
-import play.data.Form;
 import play.mvc.*;
 import views.html.climate.*;
 
-
 public class AboutusController extends Controller {
 		
-    public static Result aboutus() {
+    public static Result aboutUs() {
     	return ok(aboutus.render("test"));
     }
     
     public static Result aboutProject(){
     	return ok(aboutProject.render("test"));
     }
-
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/085f450b/app/controllers/AccountController.java
----------------------------------------------------------------------
diff --git a/app/controllers/AccountController.java b/app/controllers/AccountController.java
index ca5d8c6..b885eeb 100644
--- a/app/controllers/AccountController.java
+++ b/app/controllers/AccountController.java
@@ -1,55 +1,33 @@
 package controllers;
 
-import java.text.DateFormat;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.node.ObjectNode;
-//import com.gargoylesoftware.htmlunit.javascript.host.Console;
-
-
-
-
-
-import models.metadata.ClimateService;
 import models.metadata.ServiceLog;
-
-import org.apache.commons.collections.map.HashedMap;
-
 import play.Logger;
 import play.data.Form;
 import play.libs.Json;
 import play.mvc.*;
-import scala.Console;
 import util.APICall;
 import util.APICall.ResponseType;
-import util.TimeConvert;
 import views.html.climate.*;
 
-/******************************************************************************
- * TODO: Change the name of the controller to support; Later to service execution log
- ******************************************************************************/
-
-
-
 public class AccountController extends Controller {
 
 	final static Form<ServiceLog> serviceLogForm = Form
 			.form(ServiceLog.class);
 
-
 	public static Result getServiceLog() {
 		return ok(serviceLog.render(ServiceLog.all(),
 				serviceLogForm));
 	}
 	
-	// Sync userId according to purpose
 	public static Result syncData(){
 		return ok(serviceLog.render(ServiceLog.syncDataByPurpose(),
 				serviceLogForm));
@@ -59,8 +37,6 @@ public class AccountController extends Controller {
 		return ok(searchServiceLog.render(serviceLogForm));
 	}
 
-	
-//this is  the one we are using now	
 	public static Result getSearchServiceLogOneDimension() {
 		Form<ServiceLog> dc = serviceLogForm.bindFromRequest();
 		ObjectNode jsonData = Json.newObject();
@@ -70,29 +46,18 @@ public class AccountController extends Controller {
 		String userId = "";
 		String startTime = "";
 		String endTime = "";
-		
 		String dataSetStartTime = "";
 		String dataSetEndTime = "";
-		
-//		String startLatitude = "";
-//		String endLatitude = "";
 		Date executionStartTime = null, executionEndTime= null;
+		
 		try {
 			dataSource = dc.field("Data Source").value().replace("/", "_");
-			//Logger.info("data "+dataSource);
 			variableName = dc.field("Variable Name").value();
 			executionPurpose = dc.field("Execution Purpose").value();
-			//userId = dc.field("User Id").value().replace(" ", "%20");
-			//Logger.info("data "+test);
-			//startTime = TimeConvert.datetoTimeStamp(dc.field("Start Time").value());
-			//endTime = TimeConvert.datetoTimeStamp(dc.field("End Time").value());
 			startTime = dc.field("Execution Start Time").value();
 			endTime = dc.field("Execution End Time").value();
-//			startLatitude = dc.field("Start Latitude").value();
-//			endLatitude = dc.field("End Latitude").value();
 			dataSetStartTime = dc.field("Dataset Start Time").value();
 			dataSetEndTime = dc.field("Dataset End Time").value();
-
 			SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MM/dd/yyyy HH:mm");
 
 			if (!startTime.isEmpty()) {
@@ -103,6 +68,7 @@ public class AccountController extends Controller {
 					return badRequest("Wrong Date Format :" + startTime);
 				}
 			}
+			
 			if (!endTime.isEmpty()) {
 				try {
 					executionEndTime = simpleDateFormat.parse(endTime);
@@ -205,33 +171,26 @@ public class AccountController extends Controller {
 			Application.flashMsg(APICall.createResponse(ResponseType.UNKNOWN));
 		}
 
-		//Data source and variable names are parameters
 		Map<String, String> parameters = new HashMap<String, String>();
 		parameters.put("model", dataSource);
 		parameters.put("var", variableName);
 		parameters.put("startT", dataSetStartTime);
 		parameters.put("endT", dataSetEndTime);
-		
 		List<ServiceLog> response = ServiceLog.queryExecutionLogs(userId, executionStartTime, executionEndTime, executionPurpose, dataSetStartTime, dataSetEndTime, parameters);
 		return ok(searchLogResult.render(response));
 
 	}
 
-	
-// deprecated one
 	public static Result getSearchServiceLog() {
 		Form<ServiceLog> dc = serviceLogForm.bindFromRequest();
 		String userId = "", startTime = "", endTime = "";
 		Date start=null, end=null;
+		
 		try {
-
-			//userId = dc.field("User Id").value().replace(" ", "%20");
 			startTime = dc.field("Start Time").value();
 			endTime = dc.field("End Time").value();
 			Logger.info(""+startTime);
 			Logger.info(""+endTime);
-
-
 			SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm");
 
 			if (!startTime.isEmpty()) {
@@ -242,6 +201,7 @@ public class AccountController extends Controller {
 					return badRequest("Wrong Date Format :" + startTime);
 				}
 			}
+			
 			if (!endTime.isEmpty()) {
 				try {
 					end = simpleDateFormat.parse(endTime);
@@ -275,8 +235,6 @@ public class AccountController extends Controller {
 			endTime = dc.field("End Time").value();
 			Logger.info(""+startTime);
 			Logger.info(""+endTime);
-
-
 			SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MM/dd/yyyy HH:mm");
 
 			if (!startTime.isEmpty()) {
@@ -287,6 +245,7 @@ public class AccountController extends Controller {
 					return badRequest("Wrong Date Format :" + startTime);
 				}
 			}
+			
 			if (!endTime.isEmpty()) {
 				try {
 					end = simpleDateFormat.parse(endTime);
@@ -295,6 +254,7 @@ public class AccountController extends Controller {
 					return badRequest("Wrong Date Format :" + endTime);
 				}
 			}
+			
 		} catch (IllegalStateException e) {
 			e.printStackTrace();
 			Application.flashMsg(APICall
@@ -321,12 +281,9 @@ public class AccountController extends Controller {
 
 			userId = dc.field("User Id").value().replace(" ", "%20");
 			startTime = dc.field("Start Time").value();
-			//System.out.println("test"+startTime);
 			endTime = dc.field("End Time").value();
 			Logger.info(""+startTime);
 			Logger.info(""+endTime);
-
-
 			SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MM/dd/yyyy HH:mm");
 
 			if (!startTime.isEmpty()) {
@@ -337,6 +294,7 @@ public class AccountController extends Controller {
 					return badRequest("Wrong Date Format :" + startTime);
 				}
 			}
+			
 			if (!endTime.isEmpty()) {
 				try {
 					end = simpleDateFormat.parse(endTime);
@@ -345,6 +303,7 @@ public class AccountController extends Controller {
 					return badRequest("Wrong Date Format :" + endTime);
 				}
 			}
+			
 		} catch (IllegalStateException e) {
 			e.printStackTrace();
 			Application.flashMsg(APICall
@@ -365,12 +324,8 @@ public class AccountController extends Controller {
 		if (end != null) {
 			queryJson.put("executionEndTime", end.getTime());
 		}
-		//System.out.println("start"+startTime);
-		//System.out.println(queryJson.toString());
 		JsonNode response = APICall.postAPI("http://localhost:9034/workflow/generateWorkflowJson", queryJson);
-//		Application.flashMsg(response);
 		String resStr = response.toString();
-		
 		List<ServiceLog> responseList = ServiceLog.queryExecutionLogs(userId, start, end, null, null, null, null);
 		return ok(searchLogResultWorkflow.render(responseList,userId, startTime, endTime, resStr));
 	}
@@ -386,11 +341,13 @@ public class AccountController extends Controller {
 		String resStr = response.toString();
 		return ok(views.html.climate.recommend.render(resStr));
 	}
+	
 	public static Result getDatasetRecommend() {
 		JsonNode response = APICall.callAPI("http://einstein.sv.cmu.edu:9026/api/dgraph");
 		String resStr = response.toString();
 		return ok(views.html.climate.dataRecommend.render(resStr));
 	}
+	
 	public static Result getScientistRecommend() {
 		JsonNode response = APICall.callAPI("http://einstein.sv.cmu.edu:9026/api/scgraph");
 		String resStr = response.toString();

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/085f450b/app/controllers/Application.java
----------------------------------------------------------------------
diff --git a/app/controllers/Application.java b/app/controllers/Application.java
index 53686f5..7bdfed5 100644
--- a/app/controllers/Application.java
+++ b/app/controllers/Application.java
@@ -1,52 +1,25 @@
-/*
- * Copyright (c) 2013 Carnegie Mellon University Silicon Valley. 
- * All rights reserved. 
- * 
- * This program and the accompanying materials are made available
- * under the terms of dual licensing(GPL V2 for Research/Education
- * purposes). GNU Public License v2.0 which accompanies this distribution
- * is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
- * 
- * Please contact http://www.cmu.edu/silicon-valley/ if you have any 
- * questions.
- * 
- * */
 package controllers;
 
 import java.util.Iterator;
 import java.util.Map.Entry;
-
 import com.fasterxml.jackson.databind.JsonNode;
-
 import play.mvc.*;
-import play.data.*;
-import static play.data.Form.*;
 import views.html.*;
 
 public class Application extends Controller {
-	//final static Form<SensorType> sensorTypeForm = Form.form(SensorType.class);
 	
     public static Result index() {
         return ok(index.render(""));
     }
 
-    // -- Authentication
     public static class Login {
         
         public String email;
         public String password;
         
         public String validate() {
-            //if(User.authenticate(email, password) == null) 
-//            if(!email.equals("admin@admin.com"))
-//                return "Invalid user or password";
-            
             return null;
-        }
-        
+        } 
     }
     
     public static void flashMsg(JsonNode jsonNode){

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/085f450b/app/controllers/BugReportController.java
----------------------------------------------------------------------
diff --git a/app/controllers/BugReportController.java b/app/controllers/BugReportController.java
index f23de93..f5fc9a8 100644
--- a/app/controllers/BugReportController.java
+++ b/app/controllers/BugReportController.java
@@ -1,19 +1,3 @@
-/*
- * Copyright (c) 2013 Carnegie Mellon University Silicon Valley. 
- * All rights reserved. 
- * 
- * This program and the accompanying materials are made available
- * under the terms of dual licensing(GPL V2 for Research/Education
- * purposes). GNU Public License v2.0 which accompanies this distribution
- * is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
- * 
- * Please contact http://www.cmu.edu/silicon-valley/ if you have any 
- * questions.
- * 
- * */
 package controllers;
 
 import models.BugReport;
@@ -23,10 +7,8 @@ import play.mvc.*;
 import util.APICall;
 import util.APICall.ResponseType;
 import views.html.climate.*;
-
 import java.util.*;
 
-
 public class BugReportController extends Controller {
 	final static Form<BugReport> bugReportForm = Form.form(BugReport.class);
 
@@ -38,17 +20,15 @@ public class BugReportController extends Controller {
 	@play.db.jpa.Transactional
 	public static Result newReport() {
 		Form<BugReport> filledForm = bugReportForm.bindFromRequest();
-
 		BugReport report = new BugReport();
+		
 		try {
-			// Validations
 			report.setTitle(filledForm.get().getTitle());
 			report.setName(filledForm.get().getName());
 			report.setEmail(filledForm.get().getEmail());
 			report.setOrganization(filledForm.get().getOrganization());
 			report.setDescription(filledForm.get().getDescription());
 			report.setSolved(0);
-
 			report.save();
 			return redirect(routes.BugReportController.list());
 		} catch (IllegalStateException e) {
@@ -63,8 +43,7 @@ public class BugReportController extends Controller {
 		BugReport bugReport = new BugReport();
 		List<Object[]> list = BugReport.getAll();
 		LinkedList<BugReport> bugList = new LinkedList<BugReport>();
-		// title VARCHAR(255), organization_name VARCHAR(255), email
-		// VARCHAR(255), description
+
 		for (Object[] e : list) {
 			BugReport bug = new BugReport();
 			bug.setId((Integer)e[0]);
@@ -78,14 +57,6 @@ public class BugReportController extends Controller {
 		}
 		return ok(bugs.render(bugList));
 	}
-
-	/*
-	 * public static Result authenticate() { Form<Login> loginForm =
-	 * form(Login.class).bindFromRequest(); if(loginForm.hasErrors()) return
-	 * badRequest(login.render(loginForm)); else { session("email",
-	 * loginForm.get().email); return redirect(
-	 * routes.DeviceTypeController.deviceTypes() ); } }
-	 */
 	
 	@play.db.jpa.Transactional
 	public static Result deleteReport() {
@@ -93,8 +64,7 @@ public class BugReportController extends Controller {
 		
 		try {
 			int id = Integer.valueOf(df.field("idHolder").value());
-		
-			// Call the delete() method
+
 			if(BugReport.delete(id)){
 				Application.flashMsg(APICall.createResponse(ResponseType.SUCCESS));
 			}else {
@@ -113,8 +83,7 @@ public class BugReportController extends Controller {
 		
 		try {
 			int id = Integer.valueOf(df.field("idHolder").value());
-		
-			// Call the delete() method
+
 			if(BugReport.solve(id)){
 				Application.flashMsg(APICall.createResponse(ResponseType.SUCCESS));
 			}else {
@@ -126,6 +95,4 @@ public class BugReportController extends Controller {
 		}
 		return redirect(routes.BugReportController.list());
 	}
-
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/085f450b/app/controllers/ClimateServiceController.java
----------------------------------------------------------------------
diff --git a/app/controllers/ClimateServiceController.java b/app/controllers/ClimateServiceController.java
index 0606f65..7c919cc 100644
--- a/app/controllers/ClimateServiceController.java
+++ b/app/controllers/ClimateServiceController.java
@@ -1,11 +1,7 @@
 package controllers;
 
-import static play.data.Form.form;
-import models.DataSet;
-import models.BugReport;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.node.ObjectNode;
-
 import models.metadata.ClimateService;
 import models.metadata.DiffPlotTwoTimeAveragedVar;
 import models.metadata.RegridAndDownload;
@@ -31,16 +27,13 @@ import util.APICall.ResponseType;
 import util.Constants;
 import views.html.climate.*;
 import play.data.DynamicForm;
-
 import java.io.File;
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.text.DateFormat;
 import java.text.SimpleDateFormat;
-import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
-
 import com.fasterxml.jackson.databind.ObjectMapper;
 
 public class ClimateServiceController extends Controller {
@@ -48,7 +41,6 @@ public class ClimateServiceController extends Controller {
 	final static Form<ClimateService> climateServiceForm = Form
 			.form(ClimateService.class);
 
-	
 	public static Result home(String email, String vfile, String dataset) {
 		return ok(home.render(email, vfile, dataset));
 	}
@@ -83,32 +75,26 @@ public class ClimateServiceController extends Controller {
 
 	public static Result newClimateService() {
 		Form<ClimateService> dc = climateServiceForm.bindFromRequest();
-
 		ObjectNode jsonData = Json.newObject();
 		try {
 
 			String originalClimateServiceName = dc.field("Name").value();
 			String newClimateServiceName = originalClimateServiceName.replace(' ', '-');
 
-			// name should not contain spaces
 			if (newClimateServiceName != null && !newClimateServiceName.isEmpty()) {
 				jsonData.put("name", newClimateServiceName);
 			}
-			jsonData.put("creatorId", 1);    //TODO, since we don't have login/account id yet use a default val
+			
+			jsonData.put("creatorId", 1);
 			jsonData.put("purpose", dc.field("Purpose").value());
 			jsonData.put("url", dc.field("Url").value());
 			DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm");
-			//get current date time with Date()
 			Date date = new Date();
 			jsonData.put("createTime", dateFormat.format(date));
 			jsonData.put("scenario", dc.field("Scenario").value());
 			jsonData.put("versionNo", dc.field("Version").value());
 			jsonData.put("rootServiceId", dc.field("Root_Service").value());
-
-			// create the item by calling the API
 			JsonNode response = ClimateService.create(jsonData);
-
-			// flash the response message
 			Application.flashMsg(response);
 		} catch (IllegalStateException e) {
 			e.printStackTrace();
@@ -131,9 +117,8 @@ public class ClimateServiceController extends Controller {
 			if (climateServiceName != null && !climateServiceName.isEmpty()) {
 				jsonData.put("name", climateServiceName);
 			}
-
-			// if not found, it is an empty ClimateService
 			ClimateService originalService = ClimateService.findServiceByName(climateServiceName);
+			
 			if (originalService == null) {
 				Application.flashMsg(APICall.createResponse(ResponseType.UNKNOWN));
 				return notFound("not found original climateService " + climateServiceName);
@@ -144,22 +129,22 @@ public class ClimateServiceController extends Controller {
 			jsonData.put("url", originalService.getUrl());
 			jsonData.put("scenario", originalService.getScenario());
 			jsonData.put("versionNo", originalService.getVersion());
+			
 			if (originalService.getRootservice() != null)
+				
 				jsonData.put("rootServiceId", originalService.getRootservice());
-
 			String editField = df.field("name").value();
+			
 			if (editField != null && !editField.isEmpty()) {
 				jsonData.put(editField, df.field("value").value());
 			}
+			
 			if (editField == null || editField.isEmpty()) {
 				Application.flashMsg(APICall.createResponse(ResponseType.UNKNOWN));
 				return notFound("not found edit field");
 			}
 
-			// Call the edit() method
 			JsonNode response = ClimateService.edit(climateServiceName, jsonData);
-
-			// flash the response message
 			Application.flashMsg(response);
 
 		} catch (IllegalStateException e) {
@@ -174,10 +159,8 @@ public class ClimateServiceController extends Controller {
 
 	}
 
-	//get parameters of a service log by serviceConfigurationId
 	public static Result getConfigurationByConfId() {
 		String output = "";
-
 		TwoDVarMap twoDVarMap = new TwoDVarMap();
 		TwoDVarZonalMean twoDVarZonalMean = new TwoDVarZonalMean();
 		ScatterHistogramTwoVar scatterHistogram = new ScatterHistogramTwoVar();
@@ -200,16 +183,10 @@ public class ClimateServiceController extends Controller {
 				return notFound("confId is null or empty");
 			}
 
-			// Call API
-			//JsonNode response = APICall.callAPI("http://localhost:9008/getConfigurationByConId/json");
 			JsonNode response = APICall.callAPI(Constants.NEW_BACKEND + Constants.SERVICE_EXECUTION_LOG + Constants.SERVICE_EXECUTION_LOG_GET + logId);
-
 			int configurationId = response.path("serviceConfiguration").path("id").asInt();
-
 			JsonNode responseConfigItems = APICall.callAPI(Constants.NEW_BACKEND + Constants.CONFIG_ITEM + Constants.GET_CONFIG_ITEMS_BY_CONFIG + configurationId);
-//			Console.print(responseSpec.toString());
 			String serviceName = response.path("climateService").path("name").asText();
-
 			//TODO:
 			if (serviceName.equals("2-D-Variable-Zonal-Mean")) {
 				//TODO: DO NOT USE node.findPath(key)!!!!!  use find(key) instead to get your immediate children if you know the json structure (and we do).
@@ -218,21 +195,16 @@ public class ClimateServiceController extends Controller {
 					String parameterName = responseConfigItems.get(i).path("parameter").path("purpose").textValue();
 					String parameterValue = responseConfigItems.get(i).path("value").textValue();
 
-					//	String parameterName = response.get(i).path("parameterPurpose").textValue();
 					if (parameterName.equals("data source")) {
 						twoDVarZonalMean.setDataSource(parameterValue);
-
 					} else if (parameterName.equals("variable name")) {
 						twoDVarZonalMean.setVariableName(parameterValue);
-
 					} else if (parameterName.equals("start year-month")) {
 						twoDVarZonalMean.setStartYearMonth(parameterValue);
-
 					} else if (parameterName.equals("end year-month")) {
 						twoDVarZonalMean.setEndYearMonth(parameterValue);
 					} else if (parameterName.equals("select months")) {
 						String[] months = parameterValue.split(",");
-
 						for (int j = 0; j < months.length; j++) {
 							if (months[j].equals("1")) {
 								twoDVarZonalMean.addMonth("jan");
@@ -259,7 +231,6 @@ public class ClimateServiceController extends Controller {
 							} else if (months[j].equals("12")) {
 								twoDVarZonalMean.addMonth("dec");
 							}
-
 						}
 						twoDVarZonalMean.changeSelectMonths();
 					} else if (parameterName.equals("start lat (deg)")) {
@@ -275,24 +246,20 @@ public class ClimateServiceController extends Controller {
 				twoDVarZonalMean.setDataURL(response.path("dataUrl").textValue());
 				return ok(views.html.climate.twoDVariableZonelMean.render(twoDVarZonalMean));
 			}
-			else if (serviceName.equals("2-D-Variable-Map")) {//Old ID 12
+			else if (serviceName.equals("2-D-Variable-Map")) {
 				for (int i = 0; i < responseConfigItems.size(); i++) {
 					String parameterName = responseConfigItems.get(i).path("parameter").path("purpose").textValue();
 					String parameterValue = responseConfigItems.get(i).path("value").textValue();
 					if (parameterName.equals("model")) {
 						twoDVarMap.setDataSource(parameterValue);
-
 					} else if (parameterName.equals("var")) {
 						twoDVarMap.setVariableName(parameterValue);
-
 					} else if (parameterName.equals("startT")) {
 						twoDVarMap.setStartYearMonth(parameterValue);
-
 					} else if (parameterName.equals("endT")) {
 						twoDVarMap.setEndYearMonth(parameterValue);
 					} else if (parameterName.equals("months")) {
 						String[] months = parameterValue.split(",");
-
 						for (int j = 0; j < months.length; j++) {
 							if (months[j].equals("1")) {
 								twoDVarMap.addMonth("jan");
@@ -338,207 +305,123 @@ public class ClimateServiceController extends Controller {
 				twoDVarMap.setDataURL(response.path("dataUrl").textValue());
 				return ok(views.html.climate.twoDVariableMap.render(twoDVarMap));
 			}
-			//Old ID 21
-//			else if (serviceName.equals("2-D-Variable-Map")){
-//				for(int i=0; i<response.size(); i++){
-//					String parameterName = responseConfigItems.get(i).get("parameter").get("purpose").textValue();
-//					String parameterValue = responseConfigItems.get(i).get("value").textValue();
-//					if(parameterName.equals("model2")){
-//						para_21.setDataSourceE(parameterValue);
-//						
-//					}else if(parameterName.equals("model1")){
-//						para_21.setDataSourceP(parameterValue);
-//						
-//					}else if(parameterName.equals("var2")){
-//						para_21.setVariableNameE(parameterValue);
-//						
-//					}else if(parameterName.equals("var1")){
-//						para_21.setVariableNameP(parameterValue);
-//					}else if(parameterName.equals("pre1")){
-//						para_21.setPressureRangeP(parameterValue);
-//					}
-//					else if(parameterName.equals("pre2")){
-//						para_21.setPressureRangeE(parameterValue);
-//					}else if(parameterName.equals("startT")){
-//						para_21.setStartYearMonth(parameterValue);
-//					}else if(parameterName.equals("endT")){
-//						para_21.setEndYearMonth(parameterValue);
-//					}else if(parameterName.equals("lon1")){
-//						para_21.setStartLon(parameterValue);
-//					}else if(parameterName.equals("lon2")){
-//						para_21.setEndLon(parameterValue);
-//					}else if(parameterName.equals("lat1")){
-//						Console.print("aaa"+parameterValue);
-//						para_21.setStartLat(parameterValue);
-//					}else if(parameterName.equals("lat2")){
-//						para_21.setEndLat(parameterValue);
-//					}else if(parameterName.equals("months")){
-//						String[] months = parameterValue.split(",");
-//						
-//						for(int j=0; j<months.length; j++){
-//							if(months[j].equals("1")){
-//								para_21.addMonth("jan");
-//							}else if(months[j].equals("2")){
-//								para_21.addMonth("feb");
-//							}else if(months[j].equals("3")){
-//								para_21.addMonth("mar");
-//							}else if(months[j].equals("4")){
-//								para_21.addMonth("apr");
-//							}else if(months[j].equals("5")){
-//								para_21.addMonth("may");
-//							}else if(months[j].equals("6")){
-//								para_21.addMonth("jun");
-//							}else if(months[j].equals("7")){
-//								para_21.addMonth("jul");
-//							}else if(months[j].equals("8")){
-//								para_21.addMonth("aug");
-//							}else if(months[j].equals("9")){
-//								para_21.addMonth("sep");
-//							}else if(months[j].equals("10")){
-//								para_21.addMonth("oct");
-//							}else if(months[j].equals("11")){
-//								para_21.addMonth("nov");
-//							}else if(months[j].equals("12")){
-//								para_21.addMonth("dec");
-//							}
-//						}
-//					}
-//				}
-//				twoDVarMap.setExecutionPurpose(response.path("purpose").textValue());
-//				twoDVarMap.setImage(response.path("plotUrl").textValue());
-//				twoDVarMap.setDataURL(response.path("dataUrl").textValue());
-//				return ok(views.html.climate.twoDVariableMap.render(twoDVarMap));
-//			}
-				else if (serviceName.equals("Conditional-Sampling-with-One-Variable"))
-				{    //Old ID 21
-					for (int i = 0; i < responseConfigItems.size(); i++) {
-						String parameterName = responseConfigItems.get(i).path("parameter").path("purpose").textValue();
-						String parameterValue = responseConfigItems.get(i).path("value").textValue();
-						if (parameterName.equals("model2")) {
-							conditionalSampling.setDataSourceE(parameterValue);
-
-						} else if (parameterName.equals("model1")) {
-							conditionalSampling.setDataSourceP(parameterValue);
-
-						} else if (parameterName.equals("var2")) {
-							conditionalSampling.setVariableNameE(parameterValue);
-
-						} else if (parameterName.equals("var1")) {
-							conditionalSampling.setVariableNameP(parameterValue);
-						} else if (parameterName.equals("pre1")) {
-							conditionalSampling.setPressureRangeP(parameterValue);
-						} else if (parameterName.equals("pre2")) {
-							conditionalSampling.setPressureRangeE(parameterValue);
-						} else if (parameterName.equals("startT")) {
-							conditionalSampling.setStartYearMonth(parameterValue);
-						} else if (parameterName.equals("endT")) {
-							conditionalSampling.setEndYearMonth(parameterValue);
-						} else if (parameterName.equals("lon1")) {
-							conditionalSampling.setStartLon(parameterValue);
-						} else if (parameterName.equals("lon2")) {
-							conditionalSampling.setEndLon(parameterValue);
-						} else if (parameterName.equals("lat1")) {
-							conditionalSampling.setStartLat(parameterValue);
-						} else if (parameterName.equals("lat2")) {
-							conditionalSampling.setEndLat(parameterValue);
-						} else if (parameterName.equals("months")) {
-							String[] months = parameterValue.split(",");
-
-							for (int j = 0; j < months.length; j++) {
-								if (months[j].equals("1")) {
-									conditionalSampling.addMonth("jan");
-								} else if (months[j].equals("2")) {
-									conditionalSampling.addMonth("feb");
-								} else if (months[j].equals("3")) {
-									conditionalSampling.addMonth("mar");
-								} else if (months[j].equals("4")) {
-									conditionalSampling.addMonth("apr");
-								} else if (months[j].equals("5")) {
-									conditionalSampling.addMonth("may");
-								} else if (months[j].equals("6")) {
-									conditionalSampling.addMonth("jun");
-								} else if (months[j].equals("7")) {
-									conditionalSampling.addMonth("jul");
-								} else if (months[j].equals("8")) {
-									conditionalSampling.addMonth("aug");
-								} else if (months[j].equals("9")) {
-									conditionalSampling.addMonth("sep");
-								} else if (months[j].equals("10")) {
-									conditionalSampling.addMonth("oct");
-								} else if (months[j].equals("11")) {
-									conditionalSampling.addMonth("nov");
-								} else if (months[j].equals("12")) {
-									conditionalSampling.addMonth("dec");
-								}
-
+			else if (serviceName.equals("Conditional-Sampling-with-One-Variable")){
+				for (int i = 0; i < responseConfigItems.size(); i++) {
+					String parameterName = responseConfigItems.get(i).path("parameter").path("purpose").textValue();
+					String parameterValue = responseConfigItems.get(i).path("value").textValue();
+					if (parameterName.equals("model2")) {
+						conditionalSampling.setDataSourceE(parameterValue);
+					} else if (parameterName.equals("model1")) {
+						conditionalSampling.setDataSourceP(parameterValue);
+					} else if (parameterName.equals("var2")) {
+						conditionalSampling.setVariableNameE(parameterValue);
+					} else if (parameterName.equals("var1")) {
+						conditionalSampling.setVariableNameP(parameterValue);
+					} else if (parameterName.equals("pre1")) {
+						conditionalSampling.setPressureRangeP(parameterValue);
+					} else if (parameterName.equals("pre2")) {
+						conditionalSampling.setPressureRangeE(parameterValue);
+					} else if (parameterName.equals("startT")) {
+						conditionalSampling.setStartYearMonth(parameterValue);
+					} else if (parameterName.equals("endT")) {
+						conditionalSampling.setEndYearMonth(parameterValue);
+					} else if (parameterName.equals("lon1")) {
+						conditionalSampling.setStartLon(parameterValue);
+					} else if (parameterName.equals("lon2")) {
+						conditionalSampling.setEndLon(parameterValue);
+					} else if (parameterName.equals("lat1")) {
+						conditionalSampling.setStartLat(parameterValue);
+					} else if (parameterName.equals("lat2")) {
+						conditionalSampling.setEndLat(parameterValue);
+					} else if (parameterName.equals("months")) {
+						String[] months = parameterValue.split(",");
+						for (int j = 0; j < months.length; j++) {
+							if (months[j].equals("1")) {
+								conditionalSampling.addMonth("jan");
+							} else if (months[j].equals("2")) {
+								conditionalSampling.addMonth("feb");
+							} else if (months[j].equals("3")) {
+								conditionalSampling.addMonth("mar");
+							} else if (months[j].equals("4")) {
+								conditionalSampling.addMonth("apr");
+							} else if (months[j].equals("5")) {
+								conditionalSampling.addMonth("may");
+							} else if (months[j].equals("6")) {
+								conditionalSampling.addMonth("jun");
+							} else if (months[j].equals("7")) {
+								conditionalSampling.addMonth("jul");
+							} else if (months[j].equals("8")) {
+								conditionalSampling.addMonth("aug");
+							} else if (months[j].equals("9")) {
+								conditionalSampling.addMonth("sep");
+							} else if (months[j].equals("10")) {
+								conditionalSampling.addMonth("oct");
+							} else if (months[j].equals("11")) {
+								conditionalSampling.addMonth("nov");
+							} else if (months[j].equals("12")) {
+								conditionalSampling.addMonth("dec");
 							}
-							conditionalSampling.changeSelectMonths();
-						} else if (parameterName.equals("bin_min")) {
-							conditionalSampling.setBin_min(parameterValue);
-						} else if (parameterName.equals("bin_max")) {
-							conditionalSampling.setBin_max(parameterValue);
-						} else if (parameterName.equals("bin_n")) {
-							conditionalSampling.setBin_n(parameterValue);
-						} else if (parameterName.equals("displayOpt")) {
-							int paramBit=Integer.parseInt(parameterValue);
-							int bitmaskX = 0x1;
-							int bitmaskY = 0x2;
-							int bitmaskZ = 0x4;
-
-							conditionalSampling.setX(Integer.toString(paramBit & bitmaskX, 2));
-							conditionalSampling.setY(Integer.toString((paramBit & bitmaskY)>>1, 2));
-							conditionalSampling.setZ(Integer.toString((paramBit & bitmaskZ)>>2, 2));
 
 						}
+						conditionalSampling.changeSelectMonths();
+					} else if (parameterName.equals("bin_min")) {
+						conditionalSampling.setBin_min(parameterValue);
+					} else if (parameterName.equals("bin_max")) {
+						conditionalSampling.setBin_max(parameterValue);
+					} else if (parameterName.equals("bin_n")) {
+						conditionalSampling.setBin_n(parameterValue);
+					} else if (parameterName.equals("displayOpt")) {
+						int paramBit=Integer.parseInt(parameterValue);
+						int bitmaskX = 0x1;
+						int bitmaskY = 0x2;
+						int bitmaskZ = 0x4;
+						conditionalSampling.setX(Integer.toString(paramBit & bitmaskX, 2));
+						conditionalSampling.setY(Integer.toString((paramBit & bitmaskY)>>1, 2));
+						conditionalSampling.setZ(Integer.toString((paramBit & bitmaskZ)>>2, 2));
 					}
-					conditionalSampling.setExecutionPurpose(response.path("purpose").textValue());
-					conditionalSampling.setImage(response.path("plotUrl").textValue());
-					conditionalSampling.setDataURL(response.path("dataUrl").textValue());
-					return ok(views.html.climate.conditionalSampling.render(conditionalSampling));
-				}else if (serviceName.equals("2-D-Variable-Time-Series")){    //Old ID 1595
-					for (int i = 0; i < responseConfigItems.size(); i++) {
-						String parameterName = responseConfigItems.get(i).path("parameter").path("purpose").textValue();
-						String parameterValue = responseConfigItems.get(i).path("value").textValue();
-						if (parameterName.equals("model")) {
-							twoDVarTimeSeries.setDataSource(parameterValue);
-
-						} else if (parameterName.equals("var")) {
-							twoDVarTimeSeries.setVariableName(parameterValue);
-
-						} else if (parameterName.equals("startT")) {
-							twoDVarTimeSeries.setStartYearMonth(parameterValue);
-
-						} else if (parameterName.equals("endT")) {
-							twoDVarTimeSeries.setEndYearMonth(parameterValue);
-						} else if (parameterName.equals("lat1")) {
-							twoDVarTimeSeries.setStartLat(parameterValue);
-						} else if (parameterName.equals("lat2")) {
-							twoDVarTimeSeries.setEndLat(parameterValue);
-						} else if (parameterName.equals("lon1")) {
-							twoDVarTimeSeries.setStartLon(parameterValue);
-						} else if (parameterName.equals("lon2")) {
-							twoDVarTimeSeries.setEndLon(parameterValue);
-						} else if (parameterName.equals("scale")) {
-							twoDVarTimeSeries.setVariableScale(parameterValue);
-						}
+				}
+				conditionalSampling.setExecutionPurpose(response.path("purpose").textValue());
+				conditionalSampling.setImage(response.path("plotUrl").textValue());
+				conditionalSampling.setDataURL(response.path("dataUrl").textValue());
+				return ok(views.html.climate.conditionalSampling.render(conditionalSampling));
+			}else if (serviceName.equals("2-D-Variable-Time-Series")){
+				for (int i = 0; i < responseConfigItems.size(); i++) {
+					String parameterName = responseConfigItems.get(i).path("parameter").path("purpose").textValue();
+					String parameterValue = responseConfigItems.get(i).path("value").textValue();
+					if (parameterName.equals("model")) {
+						twoDVarTimeSeries.setDataSource(parameterValue);
+					} else if (parameterName.equals("var")) {
+						twoDVarTimeSeries.setVariableName(parameterValue);
+					} else if (parameterName.equals("startT")) {
+						twoDVarTimeSeries.setStartYearMonth(parameterValue);
+					} else if (parameterName.equals("endT")) {
+						twoDVarTimeSeries.setEndYearMonth(parameterValue);
+					} else if (parameterName.equals("lat1")) {
+						twoDVarTimeSeries.setStartLat(parameterValue);
+					} else if (parameterName.equals("lat2")) {
+						twoDVarTimeSeries.setEndLat(parameterValue);
+					} else if (parameterName.equals("lon1")) {
+						twoDVarTimeSeries.setStartLon(parameterValue);
+					} else if (parameterName.equals("lon2")) {
+						twoDVarTimeSeries.setEndLon(parameterValue);
+					} else if (parameterName.equals("scale")) {
+						twoDVarTimeSeries.setVariableScale(parameterValue);
 					}
-					twoDVarTimeSeries.setExecutionPurpose(response.path("purpose").textValue());
-					twoDVarTimeSeries.setImage(response.path("plotUrl").textValue());
-					twoDVarTimeSeries.setDataURL(response.path("dataUrl").textValue());
-					return ok(views.html.climate.twoDVariableTimeSeries.render(twoDVarTimeSeries));
-			}else if (serviceName.equals("Regrid-and-Download")){    //NEW ONE the 10th
+				}
+				twoDVarTimeSeries.setExecutionPurpose(response.path("purpose").textValue());
+				twoDVarTimeSeries.setImage(response.path("plotUrl").textValue());
+				twoDVarTimeSeries.setDataURL(response.path("dataUrl").textValue());
+				return ok(views.html.climate.twoDVariableTimeSeries.render(twoDVarTimeSeries));
+			}else if (serviceName.equals("Regrid-and-Download")){
 				for (int i = 0; i < responseConfigItems.size(); i++) {
 					String parameterName = responseConfigItems.get(i).path("parameter").path("purpose").textValue();
 					String parameterValue = responseConfigItems.get(i).path("value").textValue();
 					if (parameterName.equals("model")) {
 						regridAndDownload.setDataSource(parameterValue);
-
 					} else if (parameterName.equals("var")) {
 						regridAndDownload.setVariableName(parameterValue);
-
 					} else if (parameterName.equals("startT")) {
 						regridAndDownload.setStartYearMonth(parameterValue);
-
 					} else if (parameterName.equals("endT")) {
 						regridAndDownload.setEndYearMonth(parameterValue);
 					} else if (parameterName.equals("lat1")) {
@@ -562,85 +445,78 @@ public class ClimateServiceController extends Controller {
 				regridAndDownload.setDataURL(response.path("dataUrl").textValue());
 				return ok(views.html.climate.regridAndDownload.render(regridAndDownload));
 			}else if (serviceName.equals("3-D-Variable-Zonal-Mean")){
-					// old ID 1597
-					String press1 = "";
-					String press2 = "";
-					for (int i = 0; i < responseConfigItems.size(); i++) {
-						String parameterName = responseConfigItems.get(i).path("parameter").path("purpose").textValue();
-						String parameterValue = responseConfigItems.get(i).path("value").textValue();
-						if (parameterName.equals("model")) {
-							threeDVarZonalMean.setDataSource(parameterValue);
-
-						} else if (parameterName.equals("var")) {
-							threeDVarZonalMean.setVariableName(parameterValue);
-
-						} else if (parameterName.equals("startT")) {
-							threeDVarZonalMean.setStartYearMonth(parameterValue);
-
-						} else if (parameterName.equals("endT")) {
-							threeDVarZonalMean.setEndYearMonth(parameterValue);
-						} else if (parameterName.equals("lat1")) {
-							threeDVarZonalMean.setStartLat(parameterValue);
-						} else if (parameterName.equals("lat2")) {
-							threeDVarZonalMean.setEndLat(parameterValue);
-						} else if (parameterName.equals("pres1")) {
-							press1 = parameterValue;
-							//Console.println(press1);
-						} else if (parameterName.equals("pres2")) {
-							press2 = parameterValue;
-
-						} else if (parameterName.equals("months")) {
-							String[] months = parameterValue.split(",");
-
-							for (int j = 0; j < months.length; j++) {
-								if (months[j].equals("1")) {
-									threeDVarZonalMean.addMonth("jan");
-								} else if (months[j].equals("2")) {
-									threeDVarZonalMean.addMonth("feb");
-								} else if (months[j].equals("3")) {
-									threeDVarZonalMean.addMonth("mar");
-								} else if (months[j].equals("4")) {
-									threeDVarZonalMean.addMonth("apr");
-								} else if (months[j].equals("5")) {
-									threeDVarZonalMean.addMonth("may");
-								} else if (months[j].equals("6")) {
-									threeDVarZonalMean.addMonth("jun");
-								} else if (months[j].equals("7")) {
-									threeDVarZonalMean.addMonth("jul");
-								} else if (months[j].equals("8")) {
-									threeDVarZonalMean.addMonth("aug");
-								} else if (months[j].equals("9")) {
-									threeDVarZonalMean.addMonth("sep");
-								} else if (months[j].equals("10")) {
-									threeDVarZonalMean.addMonth("oct");
-								} else if (months[j].equals("11")) {
-									threeDVarZonalMean.addMonth("nov");
-								} else if (months[j].equals("12")) {
-									threeDVarZonalMean.addMonth("dec");
-								}
-							}
-						} else if (parameterName.equals("scale")) {
-							if (parameterValue.equals("2")) {
-								threeDVarZonalMean.setPressureScale("2");
-								threeDVarZonalMean.setColorScale("0");
-							} else if (parameterValue.equals("0")) {
-								threeDVarZonalMean.setPressureScale("0");
-								threeDVarZonalMean.setColorScale("0");
-							} else if (parameterValue.equals("4")) {
-								threeDVarZonalMean.setPressureScale("0");
-								threeDVarZonalMean.setColorScale("4");
-							} else if (parameterValue.equals("6")) {
-								threeDVarZonalMean.setPressureScale("2");
-								threeDVarZonalMean.setColorScale("4");
+				String press1 = "";
+				String press2 = "";
+				for (int i = 0; i < responseConfigItems.size(); i++) {
+					String parameterName = responseConfigItems.get(i).path("parameter").path("purpose").textValue();
+					String parameterValue = responseConfigItems.get(i).path("value").textValue();
+					if (parameterName.equals("model")) {
+						threeDVarZonalMean.setDataSource(parameterValue);
+					} else if (parameterName.equals("var")) {
+						threeDVarZonalMean.setVariableName(parameterValue);
+					} else if (parameterName.equals("startT")) {
+						threeDVarZonalMean.setStartYearMonth(parameterValue);
+					} else if (parameterName.equals("endT")) {
+						threeDVarZonalMean.setEndYearMonth(parameterValue);
+					} else if (parameterName.equals("lat1")) {
+						threeDVarZonalMean.setStartLat(parameterValue);
+					} else if (parameterName.equals("lat2")) {
+						threeDVarZonalMean.setEndLat(parameterValue);
+					} else if (parameterName.equals("pres1")) {
+						press1 = parameterValue;
+					} else if (parameterName.equals("pres2")) {
+						press2 = parameterValue;
+					} else if (parameterName.equals("months")) {
+						String[] months = parameterValue.split(",");
+						for (int j = 0; j < months.length; j++) {
+							if (months[j].equals("1")) {
+								threeDVarZonalMean.addMonth("jan");
+							} else if (months[j].equals("2")) {
+								threeDVarZonalMean.addMonth("feb");
+							} else if (months[j].equals("3")) {
+								threeDVarZonalMean.addMonth("mar");
+							} else if (months[j].equals("4")) {
+								threeDVarZonalMean.addMonth("apr");
+							} else if (months[j].equals("5")) {
+								threeDVarZonalMean.addMonth("may");
+							} else if (months[j].equals("6")) {
+								threeDVarZonalMean.addMonth("jun");
+							} else if (months[j].equals("7")) {
+								threeDVarZonalMean.addMonth("jul");
+							} else if (months[j].equals("8")) {
+								threeDVarZonalMean.addMonth("aug");
+							} else if (months[j].equals("9")) {
+								threeDVarZonalMean.addMonth("sep");
+							} else if (months[j].equals("10")) {
+								threeDVarZonalMean.addMonth("oct");
+							} else if (months[j].equals("11")) {
+								threeDVarZonalMean.addMonth("nov");
+							} else if (months[j].equals("12")) {
+								threeDVarZonalMean.addMonth("dec");
 							}
 						}
+					} else if (parameterName.equals("scale")) {
+						if (parameterValue.equals("2")) {
+							threeDVarZonalMean.setPressureScale("2");
+							threeDVarZonalMean.setColorScale("0");
+						} else if (parameterValue.equals("0")) {
+							threeDVarZonalMean.setPressureScale("0");
+							threeDVarZonalMean.setColorScale("0");
+						} else if (parameterValue.equals("4")) {
+							threeDVarZonalMean.setPressureScale("0");
+							threeDVarZonalMean.setColorScale("4");
+						} else if (parameterValue.equals("6")) {
+							threeDVarZonalMean.setPressureScale("2");
+							threeDVarZonalMean.setColorScale("4");
+						}
 					}
-					if (!press1.isEmpty() & !press2.isEmpty())
-						threeDVarZonalMean.setPressureRange("" + (Integer.parseInt(press1) / 100) + "," + (Integer.parseInt(press2) / 100));
-					threeDVarZonalMean.setExecutionPurpose(response.path("purpose").textValue());
-					threeDVarZonalMean.setImage(response.path("plotUrl").textValue());
-					threeDVarZonalMean.setDataURL(response.path("dataUrl").textValue());
-					return ok(views.html.climate.threeDVariableZonalMean.render(threeDVarZonalMean));
+				}
+				if (!press1.isEmpty() & !press2.isEmpty())
+					threeDVarZonalMean.setPressureRange("" + (Integer.parseInt(press1) / 100) + "," + (Integer.parseInt(press2) / 100));
+				threeDVarZonalMean.setExecutionPurpose(response.path("purpose").textValue());
+				threeDVarZonalMean.setImage(response.path("plotUrl").textValue());
+				threeDVarZonalMean.setDataURL(response.path("dataUrl").textValue());
+				return ok(views.html.climate.threeDVariableZonalMean.render(threeDVarZonalMean));
 			}else if (serviceName.equals("Scatter-and-Histogram-Plot-of-Two-Variables")){                    //"19")){
 					scatterHistogram.setPressureLevel1("N/A");
 					scatterHistogram.setPressureLevel2("N/A");
@@ -687,13 +563,10 @@ public class ClimateServiceController extends Controller {
 						String parameterValue = responseConfigItems.get(i).path("value").textValue();
 						if (parameterName.equals("model1")) {
 							diffPlotTwoTimeAvg.setSource1(parameterValue);
-
 						} else if (parameterName.equals("model2")) {
 							diffPlotTwoTimeAvg.setSource2(parameterValue);
-
 						} else if (parameterName.equals("var1")) {
 							diffPlotTwoTimeAvg.setVaribaleName1(parameterValue);
-
 						} else if (parameterName.equals("var2")) {
 							diffPlotTwoTimeAvg.setVaribaleName2(parameterValue);
 						} else if (parameterName.equals("pre1")) {
@@ -724,10 +597,8 @@ public class ClimateServiceController extends Controller {
 						String parameterValue = responseConfigItems.get(i).path("value").textValue();
 						if (parameterName.equals("model")) {
 							threeDVarAvgVertical.setDataSource(parameterValue);
-
 						} else if (parameterName.equals("var")) {
 							threeDVarAvgVertical.setVariableName(parameterValue);
-
 						} else if (parameterName.equals("startT")) {
 							threeDVarAvgVertical.setStartYearMonth(parameterValue);
 						} else if (parameterName.equals("endT")) {
@@ -742,7 +613,6 @@ public class ClimateServiceController extends Controller {
 							threeDVarAvgVertical.setEndLat(parameterValue);
 						} else if (parameterName.equals("months")) {
 							String[] months = parameterValue.split(",");
-
 							for (int j = 0; j < months.length; j++) {
 								if (months[j].equals("1")) {
 									threeDVarAvgVertical.addMonth("jan");
@@ -769,7 +639,6 @@ public class ClimateServiceController extends Controller {
 								} else if (months[j].equals("12")) {
 									threeDVarAvgVertical.addMonth("dec");
 								}
-
 							}
 							threeDVarAvgVertical.changeSelectMonths();
 						} else if (parameterName.equals("scale")) {
@@ -799,10 +668,8 @@ public class ClimateServiceController extends Controller {
 						String parameterValue = responseConfigItems.get(i).path("value").textValue();
 						if (parameterName.equals("model")) {
 							threeDVar2DSlice.setDataSource(parameterValue);
-
 						} else if (parameterName.equals("var")) {
 							threeDVar2DSlice.setVariableName(parameterValue);
-
 						} else if (parameterName.equals("pr")) {
 							threeDVar2DSlice.setPressureLevel(parameterValue);
 						} else if (parameterName.equals("startT")) {
@@ -819,7 +686,6 @@ public class ClimateServiceController extends Controller {
 							threeDVar2DSlice.setEndLat(parameterValue);
 						} else if (parameterName.equals("months")) {
 							String[] months = parameterValue.split(",");
-
 							for (int j = 0; j < months.length; j++) {
 								if (months[j].equals("1")) {
 									threeDVar2DSlice.addMonth("jan");
@@ -846,12 +712,10 @@ public class ClimateServiceController extends Controller {
 								} else if (months[j].equals("12")) {
 									threeDVar2DSlice.addMonth("dec");
 								}
-
 							}
 							threeDVar2DSlice.changeSelectMonths();
 						} else if (parameterName.equals("scale")) {
 							threeDVar2DSlice.setColorScale(parameterValue);
-
 						}
 					}
 					threeDVar2DSlice.setExecutionPurpose(response.path("purpose").textValue());
@@ -868,13 +732,10 @@ public class ClimateServiceController extends Controller {
 					String parameterValue = responseConfigItems.get(i).path("value").textValue();
 					if (parameterName.equals("model1")) {
 						correlationMap.setSource1(parameterValue);
-						
 					} else if (parameterName.equals("model2")) {
 						correlationMap.setSource2(parameterValue);
-
 					} else if (parameterName.equals("var1")) {
 						correlationMap.setVariableName1(parameterValue);
-
 					} else if (parameterName.equals("var2")) {
 						correlationMap.setVariableName2(parameterValue);
 					} else if (parameterName.equals("pres1")) {
@@ -910,15 +771,13 @@ public class ClimateServiceController extends Controller {
 						conditionalSampling2Var.setDataSourceP(parameterValue);
 					} else if (parameterName.equals("model2")) {
 						conditionalSampling2Var.setDataSourceE1(parameterValue);
-					}else if (parameterName.equals("model3")) {
+					} else if (parameterName.equals("model3")) {
 						conditionalSampling2Var.setDataSourceE2(parameterValue);
-
-					}else if (parameterName.equals("var1")) {
+					} else if (parameterName.equals("var1")) {
 						conditionalSampling2Var.setVariableNameP(parameterValue);
-
 					} else if (parameterName.equals("var2")) {
 						conditionalSampling2Var.setVariableNameE1(parameterValue);
-					}else if (parameterName.equals("var3")) {
+					} else if (parameterName.equals("var3")) {
 						conditionalSampling2Var.setVariableNameE2(parameterValue);
 					} else if (parameterName.equals("pres1")) {
 						conditionalSampling2Var.setPressureRange1(parameterValue);
@@ -938,7 +797,6 @@ public class ClimateServiceController extends Controller {
 						conditionalSampling2Var.setEndLat(parameterValue);
 					} else if (parameterName.equals("months")) {
 						String[] months = parameterValue.split(",");
-
 						for (int j = 0; j < months.length; j++) {
 							if (months[j].equals("1")) {
 								conditionalSampling2Var.addMonth("jan");
@@ -965,7 +823,6 @@ public class ClimateServiceController extends Controller {
 							} else if (months[j].equals("12")) {
 								conditionalSampling2Var.addMonth("dec");
 							}
-
 						}
 						conditionalSampling2Var.changeSelectMonths();
 					} else if (parameterName.equals("bin_min1")) {
@@ -974,7 +831,7 @@ public class ClimateServiceController extends Controller {
 						conditionalSampling2Var.setBin_max1(parameterValue);
 					} else if (parameterName.equals("bin_n1")) {
 						conditionalSampling2Var.setBin_n1(parameterValue);
-					}else if (parameterName.equals("bin_min2")) {
+					} else if (parameterName.equals("bin_min2")) {
 						conditionalSampling2Var.setBin_min2(parameterValue);
 					} else if (parameterName.equals("bin_max2")) {
 						conditionalSampling2Var.setBin_max2(parameterValue);
@@ -989,11 +846,9 @@ public class ClimateServiceController extends Controller {
 						int bitmaskX = 0x1;
 						int bitmaskY = 0x2;
 						int bitmaskZ = 0x4;
-
 						conditionalSampling2Var.setX(Integer.toString(paramBit & bitmaskX, 2));
 						conditionalSampling2Var.setY(Integer.toString((paramBit & bitmaskY)>>1, 2));
 						conditionalSampling2Var.setZ(Integer.toString((paramBit & bitmaskZ)>>2, 2));
-
 					}
 				}
 				conditionalSampling2Var.setExecutionPurpose(response.path("purpose").textValue());
@@ -1003,11 +858,8 @@ public class ClimateServiceController extends Controller {
 			}else{
 				
 			}
-
-			// flash the response message
 			Application.flashMsg(response);
 			Application.flashMsg(response);
-
 		}catch (IllegalStateException e) {
 			e.printStackTrace();
 			Application.flashMsg(APICall
@@ -1025,15 +877,8 @@ public class ClimateServiceController extends Controller {
 		DynamicForm df = DynamicForm.form().bindFromRequest();
 		String climateServiceId = df.field("idHolder").value();
 		Logger.debug(climateServiceId);
-
-		// return a text message
-
-		// Call the delete() method
 		JsonNode response = ClimateService.delete(climateServiceId);
-
-		// flash the response message
 		Application.flashMsg(response);
-
 		return redirect("/climate/climateServices");
 	}
 
@@ -1041,21 +886,13 @@ public class ClimateServiceController extends Controller {
 		DynamicForm df = DynamicForm.form().bindFromRequest();
 		String confId = df.field("idHolder").value();
 		Logger.debug(confId);
-
-		// return a text message
-
-		// Call the delete() method
 		JsonNode response = ServiceLog.deleteServiceLog(confId);
-
-		// flash the response message
 		Application.flashMsg(response);
-
 		return redirect("/serviceLog");
 	}
 
 	public static Result downloadClimateService() {
 		List<ClimateService> user = ClimateService.all();
-		// 1. Convert Java object to JSON format
 		ObjectMapper mapper = new ObjectMapper();
 		File file = new File("user.json");
 		try {
@@ -1064,7 +901,6 @@ public class ClimateServiceController extends Controller {
 			// TODO Auto-generated catch block
 			e.printStackTrace();
 		}
-
 		response().setContentType("application/x-download");
 		response().setHeader("Content-disposition",
 				"attachment; filename=user.json");
@@ -1072,7 +908,6 @@ public class ClimateServiceController extends Controller {
 	}
 	
 	public static Result oneService(String url) {
-		
 		return ok(oneService.render("/assets/html/" + url));
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/085f450b/app/controllers/HttpHelper.java
----------------------------------------------------------------------
diff --git a/app/controllers/HttpHelper.java b/app/controllers/HttpHelper.java
index 2943243..3ddf5f1 100644
--- a/app/controllers/HttpHelper.java
+++ b/app/controllers/HttpHelper.java
@@ -13,8 +13,6 @@ import com.google.gson.JsonObject;
 public class HttpHelper {
 	public static String HttpUserReg(String urlStr, JsonObject jsonObj, String operation)
 			throws Exception {
-		// String URLStr = "http://einstein.sv.cmu.edu:9000/addContestUser";
-
         if (operation.equals("post")) {
             System.out.println("Reached inside post");
             return httpPost(urlStr, jsonObj.toString());
@@ -37,16 +35,11 @@ public class HttpHelper {
         conn.setRequestProperty("Content-Type", "application/json");
         conn.setRequestProperty("Accept", "application/json");
         conn.setDoOutput(true);
-
-        // Create the form content
         OutputStream out = conn.getOutputStream();
         Writer writer = new OutputStreamWriter(out, "UTF-8");
-
         writer.write(jsonString);
-
         writer.close();
         out.close();
-
         return getHttpResponse(conn, 200);
 	}
 
@@ -58,27 +51,20 @@ public class HttpHelper {
         conn.setRequestProperty("Content-Type", "text/plain");
         conn.setRequestProperty("Accept", "application/json");
         conn.setDoOutput(true);
-
-        // Create the form content
         OutputStream out = conn.getOutputStream();
         Writer writer = new OutputStreamWriter(out, "UTF-8");
-
         writer.write(textString);
-
         writer.close();
         out.close();
-
         return getHttpResponse(conn, 200);
     }
+    
 	public static String httpDelete(String urlStr)
 			throws Exception {
         URL url = new URL(urlStr);
         HttpURLConnection conn = (HttpURLConnection) url.openConnection();
         conn.setRequestMethod("DELETE");
-        // conn.setRequestProperty("Content-Type", "application/json");
-        // conn.setRequestProperty("Accept", "application/json");
         conn.setDoOutput(true);
-
         conn.connect();
         return getHttpResponse(conn, 201);
 	}
@@ -89,9 +75,7 @@ public class HttpHelper {
         HttpURLConnection conn = (HttpURLConnection) url.openConnection();
         conn.setRequestMethod("GET");
         conn.setDoOutput(true);
-
         conn.connect();
-
         return getHttpResponse(conn, 200);
     }
 
@@ -102,7 +86,6 @@ public class HttpHelper {
             throw new IOException(conn.getResponseMessage());
         }
 
-        // Buffer the result into a string
         BufferedReader rd = new BufferedReader(new InputStreamReader(
                 conn.getInputStream()));
         StringBuilder sb = new StringBuilder();
@@ -111,7 +94,6 @@ public class HttpHelper {
             sb.append(line);
         }
         rd.close();
-
         conn.disconnect();
         return sb.toString();
     }

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/085f450b/app/controllers/dataSetController.java
----------------------------------------------------------------------
diff --git a/app/controllers/dataSetController.java b/app/controllers/dataSetController.java
index fce03a0..dcb60b6 100644
--- a/app/controllers/dataSetController.java
+++ b/app/controllers/dataSetController.java
@@ -1,26 +1,14 @@
 package controllers;
 
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.node.JsonNodeFactory;
 import com.fasterxml.jackson.databind.node.ObjectNode;
-import com.google.gson.Gson;
-import com.google.gson.reflect.TypeToken;
-
 import models.DataSet;
-import models.metadata.ClimateService;
-import models.metadata.ServiceLog;
 import play.data.Form;
 import play.libs.Json;
 import play.mvc.Controller;
 import play.mvc.Result;
 import util.APICall;
-import util.Constants;
 import util.APICall.ResponseType;
 import views.html.climate.*;
-
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.lang.reflect.Type;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.*;
@@ -52,15 +40,14 @@ public class dataSetController extends Controller{
 		
 		try {
 			dataSetName = dc.field("Dataset Name").value();
-			//Logger.info("data "+dataSource);
 			agency = dc.field("Agency").value();
 			instrument = dc.field("Instrument").value();
 			physicalVariable = dc.field("Physical Variable").value();
 			gridDimension = dc.field("Grid Dimension").value();
 			startTime = dc.field("Dataset Start Time").value();
 			endTime = dc.field("Dataset End Time").value();
-			
 			SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMM");
+			
 			if (!startTime.isEmpty()) {
 				try {
 					dataSetStartTime = simpleDateFormat.parse(startTime);
@@ -76,6 +63,7 @@ public class dataSetController extends Controller{
 					return badRequest("Wrong Date Format :" + startTime);
 				}
 			}
+			
 			if (!endTime.isEmpty()) {
 				try {
 					dataSetEndTime = simpleDateFormat.parse(endTime);
@@ -92,8 +80,6 @@ public class dataSetController extends Controller{
 					return badRequest("Wrong Date Format :" + endTime);
 				}
 			}
-			
-
 		} catch (IllegalStateException e) {
 			e.printStackTrace();
 			Application.flashMsg(APICall
@@ -102,7 +88,6 @@ public class dataSetController extends Controller{
 			e.printStackTrace();
 			Application.flashMsg(APICall.createResponse(ResponseType.UNKNOWN));
 		}
-
 		List<DataSet> response = DataSet.queryDataSet(dataSetName, agency, instrument, physicalVariable, gridDimension, dataSetStartTime, dataSetEndTime);
 		return ok(dataSetList.render(response, dataSetForm));
 	}

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/085f450b/app/util/Constants.java
----------------------------------------------------------------------
diff --git a/app/util/Constants.java b/app/util/Constants.java
index 51a72d5..a2813ae 100644
--- a/app/util/Constants.java
+++ b/app/util/Constants.java
@@ -36,7 +36,7 @@ public class Constants {
     public static final String GET_DATASETLIST ="getDatasetList/";
 
 	//New backend API (MySQL database)
-	public static final String NEW_BACKEND = "http://localhost:9034/";
+	public static final String NEW_BACKEND = "http://einstein.sv.cmu.edu:9034/";
 	//New service execution log stuff
 	public static final String SERVICE_EXECUTION_LOG =	"serviceExecutionLog/";
 	public static final String SERVICE_EXECUTION_LOG_QUERY =	"queryServiceExecutionLogs";


[32/50] [abbrv] incubator-cmda git commit: Merge branch 'master' of https://github.com/cmusv-sc/ApacheCMDA-Frontend

Posted by xi...@apache.org.
Merge branch 'master' of https://github.com/cmusv-sc/ApacheCMDA-Frontend


Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/87f7a8fb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/87f7a8fb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/87f7a8fb

Branch: refs/heads/master
Commit: 87f7a8fbe3c0173691d0931466aa4ab3e338515d
Parents: 085f450 5fc73a2
Author: cat1021 <lo...@gmail.com>
Authored: Fri Sep 4 15:50:12 2015 -0700
Committer: cat1021 <lo...@gmail.com>
Committed: Fri Sep 4 15:50:12 2015 -0700

----------------------------------------------------------------------
 LICENSE | 202 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 NOTICE  |   6 ++
 2 files changed, 208 insertions(+)
----------------------------------------------------------------------



[44/50] [abbrv] incubator-cmda git commit: Merge branch 'master' of https://github.com/cmusv-sc/ApacheCMDA-Frontend

Posted by xi...@apache.org.
Merge branch 'master' of https://github.com/cmusv-sc/ApacheCMDA-Frontend


Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/a4768f3a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/a4768f3a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/a4768f3a

Branch: refs/heads/master
Commit: a4768f3ac5f5bbb3c00adde2ab2fec51ff841e06
Parents: 0b28626 bca08e0
Author: cat1021 <lo...@gmail.com>
Authored: Fri Sep 4 16:30:12 2015 -0700
Committer: cat1021 <lo...@gmail.com>
Committed: Fri Sep 4 16:30:12 2015 -0700

----------------------------------------------------------------------
 app/controllers/AboutusController.java          | 17 +++++++++++
 app/controllers/AccountController.java          | 17 +++++++++++
 app/controllers/Application.java                | 17 +++++++++++
 app/controllers/BugReportController.java        | 17 +++++++++++
 app/controllers/ClimateServiceController.java   | 17 +++++++++++
 app/controllers/HttpHelper.java                 | 17 +++++++++++
 app/controllers/dataSetController.java          | 17 +++++++++++
 app/models/BugReport.java                       | 31 ++++++++++----------
 app/models/DataSet.java                         | 17 +++++++++++
 app/models/User.java                            | 17 +++++++++++
 app/models/metadata/ClimateService.java         | 31 ++++++++++----------
 app/models/metadata/ConditionalSampling.java    | 17 +++++++++++
 .../metadata/ConditionalSampling2Var.java       | 17 +++++++++++
 app/models/metadata/CorrelationMap.java         | 17 +++++++++++
 .../metadata/DiffPlotTwoTimeAveragedVar.java    | 17 +++++++++++
 app/models/metadata/RegridAndDownload.java      | 17 +++++++++++
 app/models/metadata/ScatterHistogramTwoVar.java | 17 +++++++++++
 app/models/metadata/ServiceLog.java             | 27 +++++++++++------
 app/models/metadata/ThreeDVar2DSlice.java       | 17 +++++++++++
 .../metadata/ThreeDVarAvgVertical4Profile.java  | 17 +++++++++++
 app/models/metadata/ThreeDVarZonalMean.java     | 17 +++++++++++
 app/models/metadata/TwoDVarMap.java             | 17 +++++++++++
 app/models/metadata/TwoDVarTimeSeries.java      | 17 +++++++++++
 app/models/metadata/TwoDVarZonalMean.java       | 17 +++++++++++
 app/util/APICall.java                           | 31 ++++++++++----------
 app/util/Constants.java                         | 31 ++++++++++----------
 app/util/DBHandler.java                         | 31 ++++++++++----------
 app/util/TimeConvert.java                       | 19 ++++++++++--
 28 files changed, 472 insertions(+), 86 deletions(-)
----------------------------------------------------------------------



[26/50] [abbrv] incubator-cmda git commit: modify diff

Posted by xi...@apache.org.
modify diff


Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/190fe2e6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/190fe2e6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/190fe2e6

Branch: refs/heads/master
Commit: 190fe2e62eb08865351b0a7fc1e9a1fab928095c
Parents: b4a4455
Author: cat1021 <lo...@gmail.com>
Authored: Thu Sep 3 17:05:02 2015 -0700
Committer: cat1021 <lo...@gmail.com>
Committed: Thu Sep 3 17:05:02 2015 -0700

----------------------------------------------------------------------
 .../climate/differencePlotTwoTimeAveragedVariables.scala.html      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/190fe2e6/app/views/climate/differencePlotTwoTimeAveragedVariables.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/differencePlotTwoTimeAveragedVariables.scala.html b/app/views/climate/differencePlotTwoTimeAveragedVariables.scala.html
index 07a327d..fcfcdaf 100644
--- a/app/views/climate/differencePlotTwoTimeAveragedVariables.scala.html
+++ b/app/views/climate/differencePlotTwoTimeAveragedVariables.scala.html
@@ -6,7 +6,7 @@
 <script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
 <script type="text/javascript"
 	src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
-<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js"></script>
+<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js"></script> 
 	<script type="
 	text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
 <script type="text/javascript"


[40/50] [abbrv] incubator-cmda git commit: Add License

Posted by xi...@apache.org.
Add License 

Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/07e3c1f3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/07e3c1f3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/07e3c1f3

Branch: refs/heads/master
Commit: 07e3c1f32deae404c2b43c52b83114e501a127c8
Parents: 73a41cb
Author: mingqi830 <mq...@andrew.cmu.edu>
Authored: Fri Sep 4 16:28:19 2015 -0700
Committer: mingqi830 <mq...@andrew.cmu.edu>
Committed: Fri Sep 4 16:28:19 2015 -0700

----------------------------------------------------------------------
 app/controllers/AboutusController.java          | 17 +++++++++++
 app/controllers/AccountController.java          | 17 +++++++++++
 app/controllers/Application.java                | 17 +++++++++++
 app/controllers/BugReportController.java        | 17 +++++++++++
 app/controllers/ClimateServiceController.java   | 17 +++++++++++
 app/controllers/HttpHelper.java                 | 17 +++++++++++
 app/controllers/dataSetController.java          | 17 +++++++++++
 app/models/BugReport.java                       | 31 ++++++++++----------
 app/models/DataSet.java                         | 17 +++++++++++
 app/models/User.java                            | 17 +++++++++++
 app/models/metadata/ClimateService.java         | 31 ++++++++++----------
 app/models/metadata/ConditionalSampling.java    | 17 +++++++++++
 .../metadata/ConditionalSampling2Var.java       | 17 +++++++++++
 app/models/metadata/CorrelationMap.java         | 17 +++++++++++
 .../metadata/DiffPlotTwoTimeAveragedVar.java    | 17 +++++++++++
 app/models/metadata/RegridAndDownload.java      | 17 +++++++++++
 app/models/metadata/ScatterHistogramTwoVar.java | 17 +++++++++++
 app/models/metadata/ServiceLog.java             | 27 +++++++++++------
 app/models/metadata/ThreeDVar2DSlice.java       | 17 +++++++++++
 .../metadata/ThreeDVarAvgVertical4Profile.java  | 17 +++++++++++
 app/models/metadata/ThreeDVarZonalMean.java     | 17 +++++++++++
 app/models/metadata/TwoDVarMap.java             | 17 +++++++++++
 app/models/metadata/TwoDVarTimeSeries.java      | 17 +++++++++++
 app/models/metadata/TwoDVarZonalMean.java       | 17 +++++++++++
 app/util/APICall.java                           | 31 ++++++++++----------
 app/util/Constants.java                         | 31 ++++++++++----------
 app/util/DBHandler.java                         | 31 ++++++++++----------
 app/util/TimeConvert.java                       | 19 ++++++++++--
 28 files changed, 472 insertions(+), 86 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07e3c1f3/app/controllers/AboutusController.java
----------------------------------------------------------------------
diff --git a/app/controllers/AboutusController.java b/app/controllers/AboutusController.java
index b27c8e0..6954462 100644
--- a/app/controllers/AboutusController.java
+++ b/app/controllers/AboutusController.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package controllers;
 
 import play.mvc.*;

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07e3c1f3/app/controllers/AccountController.java
----------------------------------------------------------------------
diff --git a/app/controllers/AccountController.java b/app/controllers/AccountController.java
index b885eeb..804125f 100644
--- a/app/controllers/AccountController.java
+++ b/app/controllers/AccountController.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package controllers;
 
 import java.text.ParseException;

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07e3c1f3/app/controllers/Application.java
----------------------------------------------------------------------
diff --git a/app/controllers/Application.java b/app/controllers/Application.java
index 7bdfed5..943d923 100644
--- a/app/controllers/Application.java
+++ b/app/controllers/Application.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package controllers;
 
 import java.util.Iterator;

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07e3c1f3/app/controllers/BugReportController.java
----------------------------------------------------------------------
diff --git a/app/controllers/BugReportController.java b/app/controllers/BugReportController.java
index f5fc9a8..f231d32 100644
--- a/app/controllers/BugReportController.java
+++ b/app/controllers/BugReportController.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package controllers;
 
 import models.BugReport;

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07e3c1f3/app/controllers/ClimateServiceController.java
----------------------------------------------------------------------
diff --git a/app/controllers/ClimateServiceController.java b/app/controllers/ClimateServiceController.java
index 7c919cc..2c6aa1c 100644
--- a/app/controllers/ClimateServiceController.java
+++ b/app/controllers/ClimateServiceController.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package controllers;
 
 import com.fasterxml.jackson.databind.JsonNode;

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07e3c1f3/app/controllers/HttpHelper.java
----------------------------------------------------------------------
diff --git a/app/controllers/HttpHelper.java b/app/controllers/HttpHelper.java
index 3ddf5f1..9dc17d0 100644
--- a/app/controllers/HttpHelper.java
+++ b/app/controllers/HttpHelper.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package controllers;
 
 import java.io.BufferedReader;

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07e3c1f3/app/controllers/dataSetController.java
----------------------------------------------------------------------
diff --git a/app/controllers/dataSetController.java b/app/controllers/dataSetController.java
index dcb60b6..2289ab9 100644
--- a/app/controllers/dataSetController.java
+++ b/app/controllers/dataSetController.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package controllers;
 
 import com.fasterxml.jackson.databind.node.ObjectNode;

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07e3c1f3/app/models/BugReport.java
----------------------------------------------------------------------
diff --git a/app/models/BugReport.java b/app/models/BugReport.java
index 5555d0f..7c15d0d 100644
--- a/app/models/BugReport.java
+++ b/app/models/BugReport.java
@@ -1,19 +1,20 @@
 /*
- * Copyright (c) 2013 Carnegie Mellon University Silicon Valley. 
- * All rights reserved. 
- * 
- * This program and the accompanying materials are made available
- * under the terms of dual licensing(GPL V2 for Research/Education
- * purposes). GNU Public License v2.0 which accompanies this distribution
- * is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
- * 
- * Please contact http://www.cmu.edu/silicon-valley/ if you have any 
- * questions.
- * 
- * */
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package models;
 
 import java.util.*;

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07e3c1f3/app/models/DataSet.java
----------------------------------------------------------------------
diff --git a/app/models/DataSet.java b/app/models/DataSet.java
index 821bf90..91200eb 100644
--- a/app/models/DataSet.java
+++ b/app/models/DataSet.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package models;
 
 import java.text.ParseException;

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07e3c1f3/app/models/User.java
----------------------------------------------------------------------
diff --git a/app/models/User.java b/app/models/User.java
index 6bf8eda..04cc9d3 100644
--- a/app/models/User.java
+++ b/app/models/User.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package models;
 
 //import javax.persistence.*;

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07e3c1f3/app/models/metadata/ClimateService.java
----------------------------------------------------------------------
diff --git a/app/models/metadata/ClimateService.java b/app/models/metadata/ClimateService.java
index f45c7df..96a40e0 100644
--- a/app/models/metadata/ClimateService.java
+++ b/app/models/metadata/ClimateService.java
@@ -1,19 +1,20 @@
 /*
- * Copyright (c) 2013 Carnegie Mellon University Silicon Valley. 
- * All rights reserved. 
- * 
- * This program and the accompanying materials are made available
- * under the terms of dual licensing(GPL V2 for Research/Education
- * purposes). GNU Public License v2.0 which accompanies this distribution
- * is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
- * 
- * Please contact http://www.cmu.edu/silicon-valley/ if you have any 
- * questions.
- * 
- * */
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package models.metadata;
 
 import java.io.UnsupportedEncodingException;

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07e3c1f3/app/models/metadata/ConditionalSampling.java
----------------------------------------------------------------------
diff --git a/app/models/metadata/ConditionalSampling.java b/app/models/metadata/ConditionalSampling.java
index ae9f1ba..dbe1332 100644
--- a/app/models/metadata/ConditionalSampling.java
+++ b/app/models/metadata/ConditionalSampling.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package models.metadata;
 
 import java.util.ArrayList;

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07e3c1f3/app/models/metadata/ConditionalSampling2Var.java
----------------------------------------------------------------------
diff --git a/app/models/metadata/ConditionalSampling2Var.java b/app/models/metadata/ConditionalSampling2Var.java
index bb8a88e..6c69796 100644
--- a/app/models/metadata/ConditionalSampling2Var.java
+++ b/app/models/metadata/ConditionalSampling2Var.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package models.metadata;
 
 import java.util.ArrayList;

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07e3c1f3/app/models/metadata/CorrelationMap.java
----------------------------------------------------------------------
diff --git a/app/models/metadata/CorrelationMap.java b/app/models/metadata/CorrelationMap.java
index a7414d4..f2c0061 100644
--- a/app/models/metadata/CorrelationMap.java
+++ b/app/models/metadata/CorrelationMap.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package models.metadata;
 
 public class CorrelationMap {

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07e3c1f3/app/models/metadata/DiffPlotTwoTimeAveragedVar.java
----------------------------------------------------------------------
diff --git a/app/models/metadata/DiffPlotTwoTimeAveragedVar.java b/app/models/metadata/DiffPlotTwoTimeAveragedVar.java
index 1c031ac..f6ef290 100644
--- a/app/models/metadata/DiffPlotTwoTimeAveragedVar.java
+++ b/app/models/metadata/DiffPlotTwoTimeAveragedVar.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package models.metadata;
 
 public class DiffPlotTwoTimeAveragedVar {

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07e3c1f3/app/models/metadata/RegridAndDownload.java
----------------------------------------------------------------------
diff --git a/app/models/metadata/RegridAndDownload.java b/app/models/metadata/RegridAndDownload.java
index 75f8523..935d8a6 100644
--- a/app/models/metadata/RegridAndDownload.java
+++ b/app/models/metadata/RegridAndDownload.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package models.metadata;
 
 public class RegridAndDownload {

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07e3c1f3/app/models/metadata/ScatterHistogramTwoVar.java
----------------------------------------------------------------------
diff --git a/app/models/metadata/ScatterHistogramTwoVar.java b/app/models/metadata/ScatterHistogramTwoVar.java
index 5fdeaa4..abcbcd3 100644
--- a/app/models/metadata/ScatterHistogramTwoVar.java
+++ b/app/models/metadata/ScatterHistogramTwoVar.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package models.metadata;
 
 public class ScatterHistogramTwoVar {

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07e3c1f3/app/models/metadata/ServiceLog.java
----------------------------------------------------------------------
diff --git a/app/models/metadata/ServiceLog.java b/app/models/metadata/ServiceLog.java
index 4031dac..9cb9a39 100644
--- a/app/models/metadata/ServiceLog.java
+++ b/app/models/metadata/ServiceLog.java
@@ -1,4 +1,21 @@
- package models.metadata;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package models.metadata;
 
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
@@ -8,7 +25,6 @@ import util.APICall;
 import util.Constants;
 
 import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
@@ -16,13 +32,6 @@ import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
-import play.Logger;
-import util.APICall;
-import util.TimeConvert;
-import scala.Console;
-
-import com.fasterxml.jackson.databind.JsonNode;
-
 public class ServiceLog {
 
 	private String serviceExecutionLogId;

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07e3c1f3/app/models/metadata/ThreeDVar2DSlice.java
----------------------------------------------------------------------
diff --git a/app/models/metadata/ThreeDVar2DSlice.java b/app/models/metadata/ThreeDVar2DSlice.java
index 6e9e0f5..0d31acc 100644
--- a/app/models/metadata/ThreeDVar2DSlice.java
+++ b/app/models/metadata/ThreeDVar2DSlice.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package models.metadata;
 
 import java.util.ArrayList;

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07e3c1f3/app/models/metadata/ThreeDVarAvgVertical4Profile.java
----------------------------------------------------------------------
diff --git a/app/models/metadata/ThreeDVarAvgVertical4Profile.java b/app/models/metadata/ThreeDVarAvgVertical4Profile.java
index 495f65b..5161722 100644
--- a/app/models/metadata/ThreeDVarAvgVertical4Profile.java
+++ b/app/models/metadata/ThreeDVarAvgVertical4Profile.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package models.metadata;
 
 import java.util.ArrayList;

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07e3c1f3/app/models/metadata/ThreeDVarZonalMean.java
----------------------------------------------------------------------
diff --git a/app/models/metadata/ThreeDVarZonalMean.java b/app/models/metadata/ThreeDVarZonalMean.java
index e147787..c16d1f4 100644
--- a/app/models/metadata/ThreeDVarZonalMean.java
+++ b/app/models/metadata/ThreeDVarZonalMean.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package models.metadata;
 
 import java.util.ArrayList;

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07e3c1f3/app/models/metadata/TwoDVarMap.java
----------------------------------------------------------------------
diff --git a/app/models/metadata/TwoDVarMap.java b/app/models/metadata/TwoDVarMap.java
index 34a8e07..539e8db 100644
--- a/app/models/metadata/TwoDVarMap.java
+++ b/app/models/metadata/TwoDVarMap.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package models.metadata;
 
 import java.util.ArrayList;

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07e3c1f3/app/models/metadata/TwoDVarTimeSeries.java
----------------------------------------------------------------------
diff --git a/app/models/metadata/TwoDVarTimeSeries.java b/app/models/metadata/TwoDVarTimeSeries.java
index e068f5b..97c6f42 100644
--- a/app/models/metadata/TwoDVarTimeSeries.java
+++ b/app/models/metadata/TwoDVarTimeSeries.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package models.metadata;
 
 public class TwoDVarTimeSeries {

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07e3c1f3/app/models/metadata/TwoDVarZonalMean.java
----------------------------------------------------------------------
diff --git a/app/models/metadata/TwoDVarZonalMean.java b/app/models/metadata/TwoDVarZonalMean.java
index 45af27e..3b57d69 100644
--- a/app/models/metadata/TwoDVarZonalMean.java
+++ b/app/models/metadata/TwoDVarZonalMean.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package models.metadata;
 
 import java.util.ArrayList;

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07e3c1f3/app/util/APICall.java
----------------------------------------------------------------------
diff --git a/app/util/APICall.java b/app/util/APICall.java
index 7967923..2c147d5 100644
--- a/app/util/APICall.java
+++ b/app/util/APICall.java
@@ -1,19 +1,20 @@
 /*
- * Copyright (c) 2013 Carnegie Mellon University Silicon Valley. 
- * All rights reserved. 
- * 
- * This program and the accompanying materials are made available
- * under the terms of dual licensing(GPL V2 for Research/Education
- * purposes). GNU Public License v2.0 which accompanies this distribution
- * is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
- * 
- * Please contact http://www.cmu.edu/silicon-valley/ if you have any 
- * questions.
- * 
- * */
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package util;
 
 import play.Logger;

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07e3c1f3/app/util/Constants.java
----------------------------------------------------------------------
diff --git a/app/util/Constants.java b/app/util/Constants.java
index 51a72d5..0e7f8c1 100644
--- a/app/util/Constants.java
+++ b/app/util/Constants.java
@@ -1,19 +1,20 @@
 /*
- * Copyright (c) 2013 Carnegie Mellon University Silicon Valley. 
- * All rights reserved. 
- * 
- * This program and the accompanying materials are made available
- * under the terms of dual licensing(GPL V2 for Research/Education
- * purposes). GNU Public License v2.0 which accompanies this distribution
- * is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
- * 
- * Please contact http://www.cmu.edu/silicon-valley/ if you have any 
- * questions.
- * 
- * */
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package util;
 
 public class Constants {

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07e3c1f3/app/util/DBHandler.java
----------------------------------------------------------------------
diff --git a/app/util/DBHandler.java b/app/util/DBHandler.java
index 5436f47..7528df2 100644
--- a/app/util/DBHandler.java
+++ b/app/util/DBHandler.java
@@ -1,19 +1,20 @@
 /*
- * Copyright (c) 2013 Carnegie Mellon University Silicon Valley. 
- * All rights reserved. 
- * 
- * This program and the accompanying materials are made available
- * under the terms of dual licensing(GPL V2 for Research/Education
- * purposes). GNU Public License v2.0 which accompanies this distribution
- * is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
- * 
- * Please contact http://www.cmu.edu/silicon-valley/ if you have any 
- * questions.
- * 
- * */
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package util;
 
 public class DBHandler{

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/07e3c1f3/app/util/TimeConvert.java
----------------------------------------------------------------------
diff --git a/app/util/TimeConvert.java b/app/util/TimeConvert.java
index 7e3b8db..dad6438 100644
--- a/app/util/TimeConvert.java
+++ b/app/util/TimeConvert.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package util;
 
 import java.text.DateFormat;
@@ -5,8 +22,6 @@ import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 
-import play.Logger;
-
 public class TimeConvert {
 
 	public static final String timeStamptoDate (String timeStamp) {



[16/50] [abbrv] incubator-cmda git commit: delete comments

Posted by xi...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/f22b3e32/app/views/climate/scatterAndHistogramTwoVariable.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/scatterAndHistogramTwoVariable.scala.html b/app/views/climate/scatterAndHistogramTwoVariable.scala.html
index a22a37d..5baf9b5 100644
--- a/app/views/climate/scatterAndHistogramTwoVariable.scala.html
+++ b/app/views/climate/scatterAndHistogramTwoVariable.scala.html
@@ -1,28 +1,20 @@
-@(parameters: metadata.ScatterHistogramTwoVar)
-
-@import helper._
-
+@(parameters: metadata.ScatterHistogramTwoVar) @import helper._
 <link rel="stylesheet"
 	href='@routes.Assets.at("stylesheets/livefitler.css")'>
-
 @scripts = {
-	<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
-	<script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
-	<script type="text/javascript" src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
-	<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js"></script>
-	<script type="text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
-	<script type="text/javascript" src="@routes.Assets.at("javascripts/xmisc.js")"></script>
-	<script type="text/javascript">
+<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
+<script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
+<script type="text/javascript"
+	src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
+<script type="text/javascript" src="https:
+	<script type="
+	text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
+<script type="text/javascript" src="@routes.Assets.at("javascripts/xmisc.js")"></script>
+<script type="text/javascript">
 	var Response = null;
     var variable1 = "";
     var variable2 = "";
-
-
-    // called on load or reload
     window.onload = function() {
-      
-      // no data to download yet
-      //disable_download_button();
       changeDataSource();
       select_data1(1);
       changeDataSource2();
@@ -31,7 +23,6 @@
       select_var1(1);
       changeVariableName2();
       select_var1(2); 
-      
       disable_pres1(1);
       disable_pres1(2);
       $('#t0').val($('#startYearMonth').text());
@@ -46,14 +37,10 @@
       $('#Image').html('<img src="'+imageUrl+'" width=680 />');
       $('#data_url').html($('#dataURL').text());
       $('#Response').html($('serviceResponseText').text());
-      
     }
-    
     function changeDataSource(){
     	var dataSource = $('#source1').text();
-     	//dataSource = "NASA_QuikSCAT";
      	var x = document.getElementById("data1");
-     	
      	if(dataSource == "cccma_canesm2" ){
      		x.options[0].selected=true;
      	}
@@ -132,14 +119,10 @@
      	else if(dataSource == "ecmwf_interim" ){
      		x.options[25].selected=true;
      	}
-        //$('#data option:contains('+dataSource+')').prop({selected: true});
     }
-    
     function changeDataSource2(){
     	var dataSource = $('#source2').text();
-     	//dataSource = "NASA_QuikSCAT";
      	var x = document.getElementById("data2");
-     	
      	if(dataSource == "cccma_canesm2" ){
         x.options[0].selected=true;
       }
@@ -218,9 +201,7 @@
       else if(dataSource == "ecmwf_interim" ){
         x.options[25].selected=true;
       }
-        //$('#data option:contains('+dataSource+')').prop({selected: true});
     }
-    
     function changeVariableName(){
     	var var_string = $('#variableName1').text();
      	var x = document.getElementById("var1");
@@ -275,7 +256,6 @@
         else if (var_string == "rsut")
         	x.options[24].selected=true;
     }
-    
     function changeVariableName2(){
     	var var_string = $('#variableName2').text();
      	var x = document.getElementById("var2");
@@ -330,33 +310,25 @@
         else if (var_string == "rsut")
         	x.options[24].selected=true;
     }
-    // disable download data button
     function disable_download_button()
     {
       var x=document.getElementById("download_data");
       x.disabled=false;
     }
-
-    // enable download data button
     function enable_download_button()
     {
       var x=document.getElementById("download_data");
       x.disabled=false;
     }
-
-
-    // disable all vars1 in dropdown menu
     function unset_vars1(ID)
     {
       var x;
-
       if (ID == 1) {
         x=document.getElementById("var1");
       }
       else if (ID == 2) {
         x=document.getElementById("var2");
       }
-
       x.options[0].disabled=true;
       x.options[1].disabled=true;
       x.options[2].disabled=true;
@@ -391,9 +363,6 @@
       x.options[31].disabled=true;
       x.options[32].disabled=true;
     }
-
-
-    // disable pressure level box for 2D var
     function disable_pres1(ID)
     {
       var x;
@@ -403,12 +372,9 @@
       else if (ID == 2) {
         x=document.getElementById("pres2");
       }
-
       x.value = "N/A";
       x.disabled=true;
     }
-
-    // enable pressure level box for 3D var
     function enable_pres1(ID)
     {
       var x;
@@ -418,38 +384,26 @@
       else if (ID == 2) {
         x=document.getElementById("pres2");
       }
-
-      /* x.value = "500"; */
       x.disabled=false;
     }
-
-    // form variable1 or variable2 string based on "var" dropdown selection
     function select_var1(ID)
     {
       var var_string;
-
       if (ID == 1) {
         var_string = $("#var1").val();
       }
       else if (ID == 2) {
         var_string = $("#var2").val();
       }
-
-      // alert("var_string: " + var_string)
-
-      // disable the download button because of this change  
       disable_download_button();  
-  
       if (var_string == "Total Cloud Fraction") { 
         if (ID == 1) {
-          variable1 = "clt";  // a 2D var
+          variable1 = "clt";  
         }
         else if (ID == 2) {
-          variable2 = "clt";  // a 2D var
+          variable2 = "clt";  
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
-        // alert("variable1: " + variable1)
       }
       else if (var_string == "Surface Temperature") {
         if (ID == 1) {
@@ -458,7 +412,6 @@
         else if (ID == 2) {
           variable2 = "ts";  
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Sea Surface Temperature") { 
@@ -468,7 +421,6 @@
         else if (ID == 2) {
           variable2 = "tos";  
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Precipitation Flux") { 
@@ -478,7 +430,6 @@
         else if (ID == 2) {
           variable2 = "pr";  
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Eastward Near-Surface Wind") { 
@@ -488,7 +439,6 @@
         else if (ID == 2) {
           variable2 = "uas";  
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Northward Near-Surface Wind") {  
@@ -498,7 +448,6 @@
         else if (ID == 2) {
           variable2 = "vas";  
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Near-Surface Wind Speed") { 
@@ -508,7 +457,6 @@
         else if (ID == 2) {
           variable2 = "sfcWind";  
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Sea Surface Height") { 
@@ -518,7 +466,6 @@
         else if (ID == 2) {
           variable2 = "zos";  
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Leaf Area Index") { 
@@ -528,7 +475,6 @@
         else if (ID == 2) {
           variable2 = "lai";  
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Equivalent Water Height Over Land") {
@@ -538,7 +484,6 @@
         else if (ID == 2) {
           variable2 = "zl";  
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Equivalent Water Height Over Ocean") {
@@ -548,7 +493,6 @@
         else if (ID == 2) {
           variable2 = "zo";
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Ocean Heat Content Anomaly within 700 m Depth") {
@@ -558,7 +502,6 @@
         else if (ID == 2) {
           variable2 = "ohc700";
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Ocean Heat Content Anomaly within 2000 m Depth") {
@@ -568,7 +511,6 @@
         else if (ID == 2) {
           variable2 = "ohc2000";
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Surface Downwelling Longwave Radiation") {
@@ -578,7 +520,6 @@
         else if (ID == 2) {
           variable2 = "rlds";
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Surface Downwelling Shortwave Radiation") {
@@ -588,7 +529,6 @@
         else if (ID == 2) {
           variable2 = "rsds";
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Surface Upwelling Longwave Radiation") {
@@ -598,7 +538,6 @@
         else if (ID == 2) {
           variable2 = "rlus";
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Surface Upwelling Shortwave Radiation") {
@@ -608,7 +547,6 @@
         else if (ID == 2) {
           variable2 = "rsus";
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Surface Downwelling Clear-Sky Longwave Radiation") {
@@ -618,7 +556,6 @@
         else if (ID == 2) {
           variable2 = "rldscs";
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Surface Downwelling Clear-Sky Shortwave Radiation") {
@@ -628,7 +565,6 @@
         else if (ID == 2) {
           variable2 = "rsdscs";
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Surface Upwelling Clear-Sky Shortwave Radiation") {
@@ -638,7 +574,6 @@
         else if (ID == 2) {
           variable2 = "rsuscs";
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "TOA Incident Shortwave Radiation") {
@@ -648,7 +583,6 @@
         else if (ID == 2) {
           variable2 = "rsdt";
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "TOA Outgoing Clear-Sky Longwave Radiation") {
@@ -658,7 +592,6 @@
         else if (ID == 2) {
           variable2 = "rlutcs";
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "TOA Outgoing Longwave Radiation") {
@@ -668,7 +601,6 @@
         else if (ID == 2) {
           variable2 = "rlut";
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "TOA Outgoing Clear-Sky Shortwave Radiation") {
@@ -678,7 +610,6 @@
         else if (ID == 2) {
           variable2 = "rsutcs";
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "TOA Outgoing Shortwave Radiation") {
@@ -688,7 +619,6 @@
         else if (ID == 2) {
           variable2 = "rsut";
         }
-        // disable pressure level box for 2D var
         disable_pres1(ID);
       }
       else if (var_string == "Air Temperature") {
@@ -698,7 +628,6 @@
         else if (ID == 2) {
           variable2 = "ta";
         }
-        // enable pressure level box for 3D var
         enable_pres1(ID);
       }
       else if (var_string == "Specific Humidity") {
@@ -708,7 +637,6 @@
         else if (ID == 2) {
           variable2 = "hus";
         }
-        // enable pressure level box for 3D var
         enable_pres1(ID);
       }
       else if (var_string == "Cloud Ice Water Content") {
@@ -718,7 +646,6 @@
         else if (ID == 2) {
           variable2 = "cli";
         }
-        // enable pressure level box for 3D var
         enable_pres1(ID);
       }
       else if (var_string == "Cloud Liquid Water Content") {
@@ -728,7 +655,6 @@
         else if (ID == 2) {
           variable2 = "clw";
         }
-        // enable pressure level box for 3D var
         enable_pres1(ID);
       }
       else if (var_string == "Ocean Temperature") {
@@ -738,7 +664,6 @@
         else if (ID == 2) {
           variable2 = "ot";
         }
-        // enable pressure level box for 3D var
         enable_pres1(ID);
       }
       else if (var_string == "Ocean Salinity") {
@@ -748,7 +673,6 @@
         else if (ID == 2) {
           variable2 = "os";
         }
-        // enable pressure level box for 3D var
         enable_pres1(ID);
       }
       else if (var_string == "Vertical Wind Velocity") {
@@ -758,7 +682,6 @@
         else if (ID == 2) {
           variable2 = "wap";
         }
-        // enable pressure level box for 3D var
         enable_pres1(ID);
       }
       else if (var_string == "Relative Humidity") {
@@ -768,20 +691,13 @@
         else if (ID == 2) {
           variable2 = "hur";
         }
-        // enable pressure level box for 3D var
         enable_pres1(ID);
       }
-
-      // alert("variable1: " + variable1)
     }
-
-
-    // set up "var1" dropdown based status of "data1" dropdown
     function select_data1(ID)
     {
       var data_string;
       var x;
-
       if (ID == 1) {
         data_string = $("#data1").val();
         x = document.getElementById("var1");
@@ -790,106 +706,64 @@
         data_string = $("#data2").val();
         x = document.getElementById("var2");
       }
-
-      // alert(ID);
-      // alert(data_string);
-
-      // disable the download button because of this change
       disable_download_button();
-
-      // disable corresponding "var" options
       if (data_string == "NASA/AMSRE") {
-
-        unset_vars1(ID); // disable all options in "var" dropdown first
-
+        unset_vars1(ID); 
         x.options[3].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[3].disabled=false;
-
       }
       else if (data_string == "NASA/MODIS") {
-
         unset_vars1(ID);
-
         x.options[1].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[1].disabled=false;
         x.options[8].disabled=false;
-
       }
       else if (data_string == "NASA/TRMM") {
-
         unset_vars1(ID);
-
         x.options[0].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[0].disabled=false;
-
       }
       else if (data_string == "NASA/GPCP") {
-
         unset_vars1(ID);
-
         x.options[0].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[0].disabled=false;
-
       }
       else if (data_string == "NASA/QuikSCAT") {
-
         unset_vars1(ID);
-
         x.options[4].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[4].disabled=false;
         x.options[5].disabled=false;
         x.options[6].disabled=false;
-
       }
       else if (data_string == "NASA/AVISO") {
-
         unset_vars1(ID);
-
         x.options[7].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[7].disabled=false;
-
       }
       else if (data_string == "NASA/GRACE") {
-
         unset_vars1(ID);
-
         x.options[9].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[9].disabled=false;
         x.options[10].disabled=false;
-
       }
       else if (data_string == "NOAA/NODC") {
-
         unset_vars1(ID);
-
         x.options[11].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[11].disabled=false;
         x.options[12].disabled=false;
-
       }
       else if (data_string == "NASA/CERES") {
-
         unset_vars1(ID);
-
         x.options[13].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[13].disabled=false;
         x.options[14].disabled=false;
         x.options[15].disabled=false;
@@ -902,65 +776,38 @@
         x.options[22].disabled=false;
         x.options[23].disabled=false;
         x.options[24].disabled=false;
-        // The following 6 commented out
-        // per request by Benyang
-        // x.options[25].disabled=false;
-        // x.options[26].disabled=false;
-        // x.options[27].disabled=false;
-        // x.options[28].disabled=false;
-        // x.options[29].disabled=false;
-        // x.options[30].disabled=false;
-
       }
       else if (data_string == "NASA/AIRS") {
-
         unset_vars1(ID);
-
         x.options[25].selected=true;
-        enable_pres1(ID); // the selected one is 3D
-
+        enable_pres1(ID); 
         x.options[25].disabled=false;
         x.options[26].disabled=false;
-
       }
       else if (data_string == "NASA/MLS") {
-
         unset_vars1(ID);
-
         x.options[25].selected=true;
-        enable_pres1(ID); // the selected one is 3D
-
+        enable_pres1(ID); 
         x.options[25].disabled=false;
         x.options[26].disabled=false;
-
       }
       else if (data_string == "ARGO/ARGO") {
-
         unset_vars1(ID);
-
         x.options[29].selected=true;
-        enable_pres1(ID); // the selected one is 3D
-
+        enable_pres1(ID); 
         x.options[29].disabled=false;
         x.options[30].disabled=false;
-
-        // alert("in ARGO ...");
-        // alert(data_string);
       }
       else if (data_string == "CCCMA/CANAM4") {
-
         unset_vars1(ID);
-
         x.options[0].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[0].disabled=false;
         x.options[1].disabled=false;
         x.options[2].disabled=false;
         x.options[4].disabled=false;
         x.options[5].disabled=false;
         x.options[6].disabled=false;
-
         x.options[13].disabled=false;
         x.options[14].disabled=false;
         x.options[15].disabled=false;
@@ -977,22 +824,17 @@
         x.options[26].disabled=false;
         x.options[27].disabled=false;
         x.options[28].disabled=false;
-
       }
       else if (data_string == "CSIRO/MK3.6") {
-
         unset_vars1(ID);
-
         x.options[0].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[0].disabled=false;
         x.options[1].disabled=false;
         x.options[2].disabled=false;
         x.options[4].disabled=false;
         x.options[5].disabled=false;
         x.options[6].disabled=false;
-
         x.options[13].disabled=false;
         x.options[14].disabled=false;
         x.options[15].disabled=false;
@@ -1011,15 +853,11 @@
         x.options[28].disabled=false;
         x.options[31].disabled=false;
         x.options[32].disabled=false;
-
       }
       else if (data_string == "NCAR/CAM5") {
-
         unset_vars1(ID);
-
         x.options[0].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[0].disabled=false;
         x.options[1].disabled=false;
         x.options[2].disabled=false;
@@ -1029,7 +867,6 @@
         x.options[6].disabled=false;
         x.options[7].disabled=false;
         x.options[8].disabled=false;
-
         x.options[14].disabled=false;
         x.options[15].disabled=false;
         x.options[16].disabled=false;
@@ -1047,9 +884,7 @@
         x.options[28].disabled=false;
         x.options[31].disabled=false;
         x.options[32].disabled=false;
-
       }
-
       else if (data_string == "CCCMA/CANESM2" || data_string == "GFDL/ESM2G" ||
                data_string == "GISS/E2-H" || data_string == "GISS/E2-R" ||
                data_string == "NCC/NORESM" ||
@@ -1057,12 +892,9 @@
                data_string == "GFDL/CM3" || data_string == "IPSL/CM5A-LR" ||
                data_string == "MIROC/MIROC5" || data_string == "UKMO/HadGEM2-A"
               ) {
-
         unset_vars1(ID);
-
         x.options[0].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[0].disabled=false;
         x.options[1].disabled=false;
         x.options[2].disabled=false;
@@ -1072,7 +904,6 @@
         x.options[6].disabled=false;
         x.options[7].disabled=false;
         x.options[8].disabled=false;
-
         x.options[13].disabled=false;
         x.options[14].disabled=false;
         x.options[15].disabled=false;
@@ -1091,144 +922,80 @@
         x.options[28].disabled=false;
         x.options[31].disabled=false;
         x.options[32].disabled=false;
-
       }
       else if (data_string == "ECMWF/interim") {
         unset_vars1(ID);
-
         x.options[3].selected=true;
-        disable_pres1(ID); // the selected one is 2D
-
+        disable_pres1(ID); 
         x.options[3].disabled=false;
         x.options[31].disabled=false;
         x.options[32].disabled=false;
       }
-
-      // form variable string
       select_var1(ID);
     }
-
-
     $(document).ready(function(){
-
-      /* $("a").click(function(event){
-        alert("As you can see, the link no longer took you to jquery.com");
-        event.preventDefault();
-      }); */
-
-
       $("#download_data").click(function(event) {
         var durl = $("#data_url").val();
-        // alert(durl);
         window.location.assign(durl);
       });
-
-
       $("#scatterPlot2V").click(function(event) {
-        // alert('****** inside scatterPlot2V()!');
         Response = null;
-
-        // no data to download yet
         disable_download_button();
-
         $("#Response").html("Calculating ...");
         $("#data_url").html("Calculating ...");
         $("#Image").html("");
-
-        // sample url: http://cmacws.jpl.nasa.gov:9002/svc/scatterPlot2V?model1=ukmo_hadgem2-a&var1=ts&pres1=200&model2=ukmo_hadgem2-a&var2=clt&pres2=200&start_time=199001&end_time=199512&lon1=0&lon2=100&lat1=-29&lat2=29
-        // form url string
-        // var url = "http://cmacws.jpl.nasa.gov:9002/svc/scatterPlot2V?";
-        //var url = "http://" + "einstein.sv.cmu.edu" + ":9002/svc/scatterPlot2V?";
-        var url = "http://" + window.location.hostname + ":9002/svc/scatterPlot2V?";
-        // alert("url: " + url);
-
+        var url = "http:
         var d1 = $("#data1").val();
         var model1 = d1.replace("/", "_");
         model1 = model1.toLowerCase();
-
         var arglist = "";
         arglist = arglist.concat("model1=");
         arglist = arglist.concat(model1);
-
-        // alert("arglist: " + arglist);
-
         var v1 = $("#var1").val();
         arglist = arglist.concat("&var1=");
         arglist = arglist.concat(variable1);
-
-        // alert("arglist: " + arglist);
-
         var pres1 = $("#pres1").val();
         arglist = arglist.concat("&pres1=");
         arglist = arglist.concat(pres1);
-
         var d2 = $("#data2").val();
         var model2 = d2.replace("/", "_");
         model2 = model2.toLowerCase();
-
         arglist = arglist.concat("&model2=");
         arglist = arglist.concat(model2);
-
-        // alert("arglist: " + arglist);
-
         var v2 = $("#var2").val();
         arglist = arglist.concat("&var2=");
         arglist = arglist.concat(variable2);
-
-        // alert("arglist: " + arglist);
-
         var pres2 = $("#pres2").val();
         arglist = arglist.concat("&pres2=");
         arglist = arglist.concat(pres2);
-
         var t0 = $("#t0").val();
         var t1 = $("#t1").val();
-
         t0 = t0.replace("-", "");
         t1 = t1.replace("-", "");
-
         arglist = arglist.concat("&start_time=");
         arglist = arglist.concat(t0);
-
         arglist = arglist.concat("&end_time=");
         arglist = arglist.concat(t1);
-
-        // alert("arglist: " + arglist);
-
         var lon0 = $("#lon0").val();
         var lon1 = $("#lon1").val();
         var lat0 = $("#lat0").val();
         var lat1 = $("#lat1").val();
-
         arglist = arglist.concat("&lon1=");
         arglist = arglist.concat(lon0);
-
         arglist = arglist.concat("&lon2=");
         arglist = arglist.concat(lon1);
-
         arglist = arglist.concat("&lat1=");
         arglist = arglist.concat(lat0);
-
         arglist = arglist.concat("&lat2=");
         arglist = arglist.concat(lat1);
-
         var nSample = $("#nSample").val();
         arglist = arglist.concat("&nSample=");
         arglist = arglist.concat(nSample);
-
-        // alert("arglist: " + arglist);
-
         var purpose = $("#purpose").val();
         arglist = arglist.concat("&purpose=");
         arglist = arglist.concat(purpose);
-
-        // url = url + encodeURIComponent(arglist);
         url = url + encodeURI(arglist);
-        // url = url + arglist;
-        // alert("url: " + url);
-
-        //var urlTimeBounds = "http://" + "einstein.sv.cmu.edu" + ":9002/svc/two_time_bounds?";
-        var urlTimeBounds = "http://" + window.location.hostname + ":9002/svc/two_time_bounds?";
+        var urlTimeBounds = "http:
         var arglistTB = "";
         arglistTB = arglistTB.concat("serviceType=");
         arglistTB = arglistTB.concat("2");
@@ -1241,8 +1008,6 @@
         arglistTB = arglistTB.concat("&var2=");
         arglistTB = arglistTB.concat(variable2);
         urlTimeBounds = urlTimeBounds + encodeURI(arglistTB);
-        // alert("urlTimeBounds: " + urlTimeBounds);
-
         $.ajax({
             type: "GET",
             url: urlTimeBounds,
@@ -1250,9 +1015,7 @@
             data: null,
             success: function(data, textStatus, xhr) {
                 Response = data;
-                // alert("data: " + data);
                 if (data.success == false) {
-                    // alert(data.error);
                     Response = null;
                     var text = JSON.stringify(data, null, 4);
                     text = "Error in backend: <br>" + text; 
@@ -1261,81 +1024,56 @@
                     return;
                 }
                 var text = JSON.stringify(data, null, 4);
-                // alert("text: " + text);
-                // $("#Response").html("<pre>"+text+"</pre>");
-                // $("#Response").html(text);
-
                 var tb1 = data.time_bounds1;
                 var bds1 = String(tb1).split(",");
-                // alert("tb1: " + tb1);
-                // alert("bds1: " + bds1);
                 var lowerT1 = parseInt(bds1[0]);
-                // alert("inside ajax, lowerT1: " + lowerT1);
                 var upperT1 = parseInt(bds1[1]);
-                // alert("upperT1: " + upperT1);
-
                 var tb2 = data.time_bounds2;
                 var bds2 = String(tb2).split(",");
-                // alert("tb2: " + tb2);
-                // alert("bds2: " + bds2);
                 var lowerT2 = parseInt(bds2[0]);
-                // alert("inside ajax, lowerT2: " + lowerT2);
                 var upperT2 = parseInt(bds2[1]);
-                // alert("upperT2: " + upperT2);
-
                 var t0I = parseInt(t0);
                 var t1I = parseInt(t1);
-                // alert("t0: " + t0I);
-                // alert("t1: " + t1I);
-
                 var lowerT, upperT;
-                // compute the intersection of the two data bounds
-                if (lowerT1 == 0  || upperT1 == 0){ // no data-1
+                if (lowerT1 == 0  || upperT1 == 0){ 
                   alert("We do not have data for the data-1 source and variable configuration.");
                   return;
                 }
-                else if (lowerT2 == 0  || upperT2 == 0){ // no data-2
+                else if (lowerT2 == 0  || upperT2 == 0){ 
                   alert("We do not have data for the data-2 source and variable configuration.");
                   return;
                 }
-                else if (lowerT2 > upperT1 || lowerT1 > upperT2) { // no intersection
+                else if (lowerT2 > upperT1 || lowerT1 > upperT2) { 
                   alert("The two data sets/vars do not have a common time range.");
                   return;
                 }
-                else { // compute intersection
-                  if (lowerT1 > lowerT2) { // pick bigger lower time bound
+                else { 
+                  if (lowerT1 > lowerT2) { 
                     lowerT = lowerT1;
                   }
                   else {
                     lowerT = lowerT2;
                   }
-
-                  if (upperT1 > upperT2) { // pick smaller upper time bound
+                  if (upperT1 > upperT2) { 
                     upperT = upperT2;
                   }
                   else {
                     upperT = upperT1;
                   }
                 }
-                // alert("lowerT: " + lowerT);
-                // alert("upperT: " + upperT);
-
                 if (t0I < lowerT && t1I < lowerT ||
                     t0I > upperT && t1I > upperT) {
                   alert("We do not have data that span your time range. Try the range inside ["+lowerT+", "+upperT+"].");
                   return;
                 }
-
                 if (t0I < lowerT && t1I <= upperT) {
                   alert("Your start year-month is out of bound. It has to be in or later than " + lowerT +
                         ". We will use the range ["+lowerT+", "+t1I+"] for you.");
                 }
-
                 if (t1I > upperT && t0I >= lowerT) {
                   alert("Your end year-month is out of bound. It has to be in or earlier than " + upperT +
                         ". We will use the range ["+t0I+", "+upperT+"] for you.");
                 }
-
                 if (t0I < lowerT && t1I > upperT ) {
                   alert("Both of your start and end year-months are out of bounds. They have to be in or earlier than " + upperT +
                         ", and in or later than " + lowerT + ". We will use the range ["+lowerT+", "+upperT+"] for you.");
@@ -1344,15 +1082,10 @@
             error: function(xhr, textStatus, errorThrown) {
 		$("#Response").html("error!");
 		$("#data_url").html("error!");
-                // alert("xhr.status: "+xhr.status);
-                // alert("error status: "+textStatus);
             },
             complete: function(xhr, textStatus) {
-                //alert("complete status: "+textStatus);
             }
         });
-
-
         $.ajax({
             type: "GET",
             url: url,
@@ -1360,60 +1093,39 @@
             data: null,
             success: function(data, textStatus, xhr) {
                 Response = data;
-                // alert("data: " + data);
                 if (data.success == false) {
-                    // alert(data.error);
                     Response = null;
                     var text = JSON.stringify(data, null, 4);
-
                     if (text.indexOf("No Data") != -1) {
                       $("#Image").html("No Data");
                       $("#Response").html("No Data");
                       $("#data_url").html("No Data");
                       return;
                     }
-
                     text = "Error in backend: <br>" + text; 
-                    // $("#Response").html("<span style='color:red'>" + text + "</span>");
                     $("#Response").html(text);
                     $("#data_url").html(text);
-
                     return;
                 }
                 var text = JSON.stringify(data, null, 4);
-                // alert(text);
-                // $("#Response").html("<pre>"+text+"</pre>");
                 $("#Response").html(text);
-
                 var html = "<img src='"+data.url+"' width='820'/>";
-                // alert(html);
                 $("#Image").html(html);
-
-                // post dataUrl to textarea and enable download button
                 $("#data_url").html(data.dataUrl);
                 enable_download_button();
             },
             error: function(xhr, textStatus, errorThrown) {
                 $("#Response").html("error!");
                 $("#data_url").html("error!");
-                // alert("xhr.status: "+xhr.status);
-                // alert("error status: "+textStatus);
             },
             complete: function(xhr, textStatus) {
-                //alert("complete status: "+textStatus);
             }
         });
-
       });
     });
     </script>
-}
-    
-@main("Service 19", scripts){
-	
-@flash_message() 
+} @main("Service 19", scripts){ @flash_message()
 <p>
-
 <div id="source1" style="display: none;">@parameters.getSource1()</div>
 <div id="variableName1" style="display: none;">@parameters.getVaribaleName1()</div>
 <div id="pressureLevel1" style="display: none;">@parameters.getPressureLevel1()</div>
@@ -1431,270 +1143,243 @@
 <div id="image" style="display: none;">@parameters.getImage()</div>
 <div id="dataURL" style="display: none;">@parameters.getDataUrl()</div>
 <div id="serviceResponseText" style="display: none;">@parameters.getServiceResponse()</div>
-
 <table border="1" align="center">
-
-<tr>
-<td colspan="4">
-<center>
-<b>Service: Scatter and Histogram Plot of Two Variables</b><br><br>
-This service generates a scatter plot between two specified variables and the histograms of the two variables, and calculates the correlation of the two variables. The two variables can be either a two-dimensional variable or a slice of a three-dimensional variable at a specific pressure level. The number of samples used for this analysis should be specified. <br><br>
-</center>
-</td>
-</tr>
-
-<tr>
-<td colspan="2">
-<center>
-data 1
-</center>
-</td>
-
-<td colspan="2">
-<center>
-data 2
-</center>
-</td>
-</tr>
-
-<tr>
-<td>source:</td><td><select name="data1", id="data1" onchange="select_data1(1)">
-<optgroup label="Model: Historical">
-<option selected="CCCMA/CANESM2">CCCMA/CANESM2</option>
-<option>GFDL/ESM2G</option>
-<option>GISS/E2-H</option>
-<option>GISS/E2-R</option>
-<option>NCAR/CAM5</option>
-<option>NCC/NORESM</option>
-<option>UKMO/HadGEM2-ES</option>
-</optgroup>
-<optgroup label="Model: AMIP">
-<option>CCCMA/CANAM4</option>
-<option>CSIRO/MK3.6</option>
-<option>GFDL/CM3</option>
-<option>IPSL/CM5A-LR</option>
-<option>MIROC/MIROC5</option>
-<option>UKMO/HadGEM2-A</option>
-</optgroup>
-<!-- <option>NASA/obs4MIPs</option>  -->
-<optgroup label="Observation">
-<option>NASA/MODIS</option>
-<option>NASA/AMSRE</option>
-<option>NASA/TRMM</option>
-<option>NASA/GPCP</option>
-<option>NASA/QuikSCAT</option>
-<option>NASA/AVISO</option>
-<option>NASA/GRACE</option>
-<option>NOAA/NODC</option>
-<option>NASA/CERES</option>
-<option>NASA/AIRS</option>
-<option>NASA/MLS</option>
-<option>ARGO/ARGO</option>
-</optgroup>
-<optgroup label="Reanalysis">
-<option>ECMWF/interim</option>
-</optgroup>
-</select></td>
-
-<td>source:</td><td><select name="data2", id="data2" onchange="select_data1(2)">
-<optgroup label="Model: Historical">
-<option selected="CCCMA/CANESM2">CCCMA/CANESM2</option>
-<option>GFDL/ESM2G</option>
-<option>GISS/E2-H</option>
-<option>GISS/E2-R</option>
-<option>NCAR/CAM5</option>
-<option>NCC/NORESM</option>
-<option>UKMO/HadGEM2-ES</option>
-</optgroup>
-<optgroup label="Model: AMIP">
-<option>CCCMA/CANAM4</option>
-<option>CSIRO/MK3.6</option>
-<option>GFDL/CM3</option>
-<option>IPSL/CM5A-LR</option>
-<option>MIROC/MIROC5</option>
-<option>UKMO/HadGEM2-A</option>
-</optgroup>
-<!-- <option>NASA/obs4MIPs</option>  -->
-<optgroup label="Observation">
-<option>NASA/MODIS</option>
-<option>NASA/AMSRE</option>
-<option>NASA/TRMM</option>
-<option>NASA/GPCP</option>
-<option>NASA/QuikSCAT</option>
-<option>NASA/AVISO</option>
-<option>NASA/GRACE</option>
-<option>NOAA/NODC</option>
-<option>NASA/CERES</option>
-<option>NASA/AIRS</option>
-<option>NASA/MLS</option>
-<option>ARGO/ARGO</option>
-</optgroup>
-<optgroup label="Reanalysis">
-<option>ECMWF/interim</option>
-</optgroup>
-</select></td>
-
-</tr>
-
-<tr>
-
-<td>variable name:</td><td><select name="var1", id="var1" onchange="select_var1(1)">
-<option>Precipitation Flux</option>
-<option>Total Cloud Fraction</option>
-<option>Surface Temperature</option>
-<option>Sea Surface Temperature</option>
-<option>Eastward Near-Surface Wind</option>
-<option>Northward Near-Surface Wind</option>
-<option>Near-Surface Wind Speed</option>
-<option>Sea Surface Height</option>
-<option>Leaf Area Index</option>
-<option>Equivalent Water Height Over Land</option>
-<option>Equivalent Water Height Over Ocean</option>
-<option>Ocean Heat Content Anomaly within 700 m Depth</option>
-<option>Ocean Heat Content Anomaly within 2000 m Depth</option>
-<option>Surface Downwelling Longwave Radiation</option>
-<option>Surface Downwelling Shortwave Radiation</option>
-<option>Surface Upwelling Longwave Radiation</option>
-<option>Surface Upwelling Shortwave Radiation</option>
-<option>Surface Downwelling Clear-Sky Longwave Radiation</option>
-<option>Surface Downwelling Clear-Sky Shortwave Radiation</option>
-<option>Surface Upwelling Clear-Sky Shortwave Radiation</option>
-<option>TOA Incident Shortwave Radiation</option>
-<option>TOA Outgoing Longwave Radiation</option>
-<option>TOA Outgoing Shortwave Radiation</option>
-<option>TOA Outgoing Clear-Sky Longwave Radiation</option>
-<option>TOA Outgoing Clear-Sky Shortwave Radiation</option>
-<option>Air Temperature</option>
-<option>Specific Humidity</option>
-<option>Cloud Ice Water Content</option>
-<option>Cloud Liquid Water Content</option>
-<option>Ocean Temperature</option>
-<option>Ocean Salinity</option>
-<option>Vertical Wind Velocity</option>  
-<option>Relative Humidity</option>
-</select>
-</td>
-
-
-<td>variable name:</td><td><select name="var2", id="var2" onchange="select_var1(2)">
-<option>Precipitation Flux</option>
-<option>Total Cloud Fraction</option>
-<option>Surface Temperature</option>
-<option>Sea Surface Temperature</option>
-<option>Eastward Near-Surface Wind</option>
-<option>Northward Near-Surface Wind</option>
-<option>Near-Surface Wind Speed</option>
-<option>Sea Surface Height</option>
-<option>Leaf Area Index</option>
-<option>Equivalent Water Height Over Land</option>
-<option>Equivalent Water Height Over Ocean</option>
-<option>Ocean Heat Content Anomaly within 700 m Depth</option>
-<option>Ocean Heat Content Anomaly within 2000 m Depth</option>
-<option>Surface Downwelling Longwave Radiation</option>
-<option>Surface Downwelling Shortwave Radiation</option>
-<option>Surface Upwelling Longwave Radiation</option>
-<option>Surface Upwelling Shortwave Radiation</option>
-<option>Surface Downwelling Clear-Sky Longwave Radiation</option>
-<option>Surface Downwelling Clear-Sky Shortwave Radiation</option>
-<option>Surface Upwelling Clear-Sky Shortwave Radiation</option>
-<option>TOA Incident Shortwave Radiation</option>
-<option>TOA Outgoing Longwave Radiation</option>
-<option>TOA Outgoing Shortwave Radiation</option>
-<option>TOA Outgoing Clear-Sky Longwave Radiation</option>
-<option>TOA Outgoing Clear-Sky Shortwave Radiation</option>
-<option>Air Temperature</option>
-<option>Specific Humidity</option>
-<option>Cloud Ice Water Content</option>
-<option>Cloud Liquid Water Content</option>
-<option>Ocean Temperature</option>
-<option>Ocean Salinity</option>
-<option>Vertical Wind Velocity</option>  
-<option>Relative Humidity</option>
-</select>
-</td>
-
-</tr>
-
-<tr>
-
-<td>
-atmosphere pressure level (hPa) <br> or ocean pressure level (dbar)
-</td>
-<td>
-<input id="pres1" value="500" alt="pressure"/>
-</td>
-
-<td>
-atmosphere pressure level (hPa) <br> or ocean pressure level (dbar)
-</td>
-<td>
-<input id="pres2" value="500" alt="pressure"/>
-</td>
-
-</tr>
-
-<tr>
-</tr>
-
-<tr>
-<td>start year-month:</td><td><input id="t0" value="2004-01" alt="start"/></td>
-<td>end year-month:</td><td><input id="t1" value="2004-12" alt="end"/></td>
-</tr>
-
-
-<tr>
-<td>start lat (deg):</td><td><input id="lat0" value="-90"/></td>
-<td>end lat (deg):</td><td><input id="lat1" value="90"/></td>
-</tr>
-
-<tr>
-<td>start lon (deg):</td><td><input id="lon0" value="0"/></td>
-<td>end lon (deg):</td><td><input id="lon1" value="360"/></td>
-</tr>
-
-<tr>  
-<td>number of samples:</td><td><input id="nSample" value="500"/></td></tr>
-</tr>
-
-<tr>
-<td colspan="1">
-Execution purpose
-</td>
-<td colspan="3">
-<form>
-<textarea name="purpose" id="purpose" rows="4" cols="50"> </textarea>
-</form>
-</td>
-</tr>
-
-<tr>
-<td colspan="2" align="center"><input id="scatterPlot2V" type="submit" value="            Run Again            " style="height:28px"/></td>
-<form>
-<td colspan="2" align="center"><input id="download_data" type="button" value="Download Data" style="height:28px"/>
-</td>
-</form>
-
-</tr>
-
-<tr>
-<td colspan="4">
-<div id="Image">Image Here</div>
-</td>
-</tr>
-
-<tr>
-<td colspan="4" align="center">
-<textarea readonly id="data_url" cols="130" rows="2">Data URL Here</textarea>
-</td>
-</tr>
-
-<tr>
-<td colspan="4" align="center">
-<textarea id="Response" cols="130" rows="6">Service Response Text Here</textarea>
-</td>
-</tr>
-
+	<tr>
+		<td colspan="4">
+			<center>
+				<b>Service: Scatter and Histogram Plot of Two Variables</b><br>
+				<br> This service generates a scatter plot between two
+				specified variables and the histograms of the two variables, and
+				calculates the correlation of the two variables. The two variables
+				can be either a two-dimensional variable or a slice of a
+				three-dimensional variable at a specific pressure level. The number
+				of samples used for this analysis should be specified. <br>
+				<br>
+			</center>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="2">
+			<center>data 1</center>
+		</td>
+		<td colspan="2">
+			<center>data 2</center>
+		</td>
+	</tr>
+	<tr>
+		<td>source:</td>
+		<td><select name="data1" , id="data1" onchange="select_data1(1)">
+				<optgroup label="Model: Historical">
+					<option selected="CCCMA/CANESM2">CCCMA/CANESM2</option>
+					<option>GFDL/ESM2G</option>
+					<option>GISS/E2-H</option>
+					<option>GISS/E2-R</option>
+					<option>NCAR/CAM5</option>
+					<option>NCC/NORESM</option>
+					<option>UKMO/HadGEM2-ES</option>
+				</optgroup>
+				<optgroup label="Model: AMIP">
+					<option>CCCMA/CANAM4</option>
+					<option>CSIRO/MK3.6</option>
+					<option>GFDL/CM3</option>
+					<option>IPSL/CM5A-LR</option>
+					<option>MIROC/MIROC5</option>
+					<option>UKMO/HadGEM2-A</option>
+				</optgroup>
+				<optgroup label="Observation">
+					<option>NASA/MODIS</option>
+					<option>NASA/AMSRE</option>
+					<option>NASA/TRMM</option>
+					<option>NASA/GPCP</option>
+					<option>NASA/QuikSCAT</option>
+					<option>NASA/AVISO</option>
+					<option>NASA/GRACE</option>
+					<option>NOAA/NODC</option>
+					<option>NASA/CERES</option>
+					<option>NASA/AIRS</option>
+					<option>NASA/MLS</option>
+					<option>ARGO/ARGO</option>
+				</optgroup>
+				<optgroup label="Reanalysis">
+					<option>ECMWF/interim</option>
+				</optgroup>
+		</select></td>
+		<td>source:</td>
+		<td><select name="data2" , id="data2" onchange="select_data1(2)">
+				<optgroup label="Model: Historical">
+					<option selected="CCCMA/CANESM2">CCCMA/CANESM2</option>
+					<option>GFDL/ESM2G</option>
+					<option>GISS/E2-H</option>
+					<option>GISS/E2-R</option>
+					<option>NCAR/CAM5</option>
+					<option>NCC/NORESM</option>
+					<option>UKMO/HadGEM2-ES</option>
+				</optgroup>
+				<optgroup label="Model: AMIP">
+					<option>CCCMA/CANAM4</option>
+					<option>CSIRO/MK3.6</option>
+					<option>GFDL/CM3</option>
+					<option>IPSL/CM5A-LR</option>
+					<option>MIROC/MIROC5</option>
+					<option>UKMO/HadGEM2-A</option>
+				</optgroup>
+				<optgroup label="Observation">
+					<option>NASA/MODIS</option>
+					<option>NASA/AMSRE</option>
+					<option>NASA/TRMM</option>
+					<option>NASA/GPCP</option>
+					<option>NASA/QuikSCAT</option>
+					<option>NASA/AVISO</option>
+					<option>NASA/GRACE</option>
+					<option>NOAA/NODC</option>
+					<option>NASA/CERES</option>
+					<option>NASA/AIRS</option>
+					<option>NASA/MLS</option>
+					<option>ARGO/ARGO</option>
+				</optgroup>
+				<optgroup label="Reanalysis">
+					<option>ECMWF/interim</option>
+				</optgroup>
+		</select></td>
+	</tr>
+	<tr>
+		<td>variable name:</td>
+		<td><select name="var1" , id="var1" onchange="select_var1(1)">
+				<option>Precipitation Flux</option>
+				<option>Total Cloud Fraction</option>
+				<option>Surface Temperature</option>
+				<option>Sea Surface Temperature</option>
+				<option>Eastward Near-Surface Wind</option>
+				<option>Northward Near-Surface Wind</option>
+				<option>Near-Surface Wind Speed</option>
+				<option>Sea Surface Height</option>
+				<option>Leaf Area Index</option>
+				<option>Equivalent Water Height Over Land</option>
+				<option>Equivalent Water Height Over Ocean</option>
+				<option>Ocean Heat Content Anomaly within 700 m Depth</option>
+				<option>Ocean Heat Content Anomaly within 2000 m Depth</option>
+				<option>Surface Downwelling Longwave Radiation</option>
+				<option>Surface Downwelling Shortwave Radiation</option>
+				<option>Surface Upwelling Longwave Radiation</option>
+				<option>Surface Upwelling Shortwave Radiation</option>
+				<option>Surface Downwelling Clear-Sky Longwave Radiation</option>
+				<option>Surface Downwelling Clear-Sky Shortwave Radiation</option>
+				<option>Surface Upwelling Clear-Sky Shortwave Radiation</option>
+				<option>TOA Incident Shortwave Radiation</option>
+				<option>TOA Outgoing Longwave Radiation</option>
+				<option>TOA Outgoing Shortwave Radiation</option>
+				<option>TOA Outgoing Clear-Sky Longwave Radiation</option>
+				<option>TOA Outgoing Clear-Sky Shortwave Radiation</option>
+				<option>Air Temperature</option>
+				<option>Specific Humidity</option>
+				<option>Cloud Ice Water Content</option>
+				<option>Cloud Liquid Water Content</option>
+				<option>Ocean Temperature</option>
+				<option>Ocean Salinity</option>
+				<option>Vertical Wind Velocity</option>
+				<option>Relative Humidity</option>
+		</select></td>
+		<td>variable name:</td>
+		<td><select name="var2" , id="var2" onchange="select_var1(2)">
+				<option>Precipitation Flux</option>
+				<option>Total Cloud Fraction</option>
+				<option>Surface Temperature</option>
+				<option>Sea Surface Temperature</option>
+				<option>Eastward Near-Surface Wind</option>
+				<option>Northward Near-Surface Wind</option>
+				<option>Near-Surface Wind Speed</option>
+				<option>Sea Surface Height</option>
+				<option>Leaf Area Index</option>
+				<option>Equivalent Water Height Over Land</option>
+				<option>Equivalent Water Height Over Ocean</option>
+				<option>Ocean Heat Content Anomaly within 700 m Depth</option>
+				<option>Ocean Heat Content Anomaly within 2000 m Depth</option>
+				<option>Surface Downwelling Longwave Radiation</option>
+				<option>Surface Downwelling Shortwave Radiation</option>
+				<option>Surface Upwelling Longwave Radiation</option>
+				<option>Surface Upwelling Shortwave Radiation</option>
+				<option>Surface Downwelling Clear-Sky Longwave Radiation</option>
+				<option>Surface Downwelling Clear-Sky Shortwave Radiation</option>
+				<option>Surface Upwelling Clear-Sky Shortwave Radiation</option>
+				<option>TOA Incident Shortwave Radiation</option>
+				<option>TOA Outgoing Longwave Radiation</option>
+				<option>TOA Outgoing Shortwave Radiation</option>
+				<option>TOA Outgoing Clear-Sky Longwave Radiation</option>
+				<option>TOA Outgoing Clear-Sky Shortwave Radiation</option>
+				<option>Air Temperature</option>
+				<option>Specific Humidity</option>
+				<option>Cloud Ice Water Content</option>
+				<option>Cloud Liquid Water Content</option>
+				<option>Ocean Temperature</option>
+				<option>Ocean Salinity</option>
+				<option>Vertical Wind Velocity</option>
+				<option>Relative Humidity</option>
+		</select></td>
+	</tr>
+	<tr>
+		<td>atmosphere pressure level (hPa) <br> or ocean pressure
+			level (dbar)
+		</td>
+		<td><input id="pres1" value="500" alt="pressure" /></td>
+		<td>atmosphere pressure level (hPa) <br> or ocean pressure
+			level (dbar)
+		</td>
+		<td><input id="pres2" value="500" alt="pressure" /></td>
+	</tr>
+	<tr>
+	</tr>
+	<tr>
+		<td>start year-month:</td>
+		<td><input id="t0" value="2004-01" alt="start" /></td>
+		<td>end year-month:</td>
+		<td><input id="t1" value="2004-12" alt="end" /></td>
+	</tr>
+	<tr>
+		<td>start lat (deg):</td>
+		<td><input id="lat0" value="-90" /></td>
+		<td>end lat (deg):</td>
+		<td><input id="lat1" value="90" /></td>
+	</tr>
+	<tr>
+		<td>start lon (deg):</td>
+		<td><input id="lon0" value="0" /></td>
+		<td>end lon (deg):</td>
+		<td><input id="lon1" value="360" /></td>
+	</tr>
+	<tr>
+		<td>number of samples:</td>
+		<td><input id="nSample" value="500" /></td>
+	</tr>
+	</tr>
+	<tr>
+		<td colspan="1">Execution purpose</td>
+		<td colspan="3">
+			<form>
+				<textarea name="purpose" id="purpose" rows="4" cols="50"> </textarea>
+			</form>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="2" align="center"><input id="scatterPlot2V"
+			type="submit" value="            Run Again            "
+			style="height: 28px" /></td>
+		<form>
+			<td colspan="2" align="center"><input id="download_data"
+				type="button" value="Download Data" style="height: 28px" /></td>
+		</form>
+	</tr>
+	<tr>
+		<td colspan="4">
+			<div id="Image">Image Here</div>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="4" align="center"><textarea readonly id="data_url"
+				cols="130" rows="2">Data URL Here</textarea></td>
+	</tr>
+	<tr>
+		<td colspan="4" align="center"><textarea id="Response" cols="130"
+				rows="6">Service Response Text Here</textarea></td>
+	</tr>
 </table>
 }
-	
-	
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/f22b3e32/app/views/climate/threeDVariableAerageVerticalProfile.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/threeDVariableAerageVerticalProfile.scala.html b/app/views/climate/threeDVariableAerageVerticalProfile.scala.html
index 84e5f0e..47780e1 100644
--- a/app/views/climate/threeDVariableAerageVerticalProfile.scala.html
+++ b/app/views/climate/threeDVariableAerageVerticalProfile.scala.html
@@ -1,32 +1,24 @@
-@(parameters: metadata.ThreeDVarAvgVertical4Profile)
-
-@import helper._
-
+@(parameters: metadata.ThreeDVarAvgVertical4Profile) @import helper._
 <link rel="stylesheet"
 	href='@routes.Assets.at("stylesheets/livefitler.css")'>
-	
 @scripts = {
-	<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
-	<script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
-	<script type="text/javascript" src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
-	<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js"></script>
-	<script type="text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
-	<script type="text/javascript" src="@routes.Assets.at("javascripts/xmisc.js")"></script>
-	<script type="text/javascript">
-	
+<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
+<script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
+<script type="text/javascript"
+	src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
+<script type="text/javascript" src="https:
+	<script type="
+	text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
+<script type="text/javascript" src="@routes.Assets.at("javascripts/xmisc.js")"></script>
+<script type="text/javascript">
 	var Response = null;
     var variable = "";
-
-    // called on load or reload
     window.onload = function() {
       select_all_months();
       getDataSource();
       select_data();
       getVariableName();
       select_var();
-      // no data to download yet
-      //disable_download_button();
-
       $('#t0').val(@parameters.getStartYearMonth());
       $('#t1').val(@parameters.getEndYearMonth());
       var selectMonths = $('#selectMonths').text();
@@ -60,7 +52,6 @@
       $('#Image').html('<img src="'+imageUrl+'" width=680 />');
       $('#data_url').html($('#dataURL').text());
     }
-
     function getDataSource()
     {
       var dataSource = $('#dataSource').text();
@@ -117,7 +108,6 @@
         x.options[16].selected = true;
       }
     }
-
     function getVariableName()
     {
       var var_string = $('#variableName').text();
@@ -147,7 +137,6 @@
         x.options[7].selected = true;
       }
     }
-
     function select_monthsByPara(){
       var monthsByPara = $('#monthsPara').text();
       if(monthsByPara.search("jan")>-1){
@@ -187,24 +176,16 @@
         document.getElementById('Dec').checked = true;
       }
     }
-
-    // disable download data button
     function disable_download_button()
     {
       var x=document.getElementById("download_data");
       x.disabled=false;
     }
-
-
-    // enable download data button
     function enable_download_button()
     {
       var x=document.getElementById("download_data");
       x.disabled=false;
     }
-
-
-    // select all months in the checkboxes
     function select_all_months()
     {
         document.getElementById('Jan').checked = true;
@@ -220,8 +201,6 @@
         document.getElementById('Nov').checked = true;
         document.getElementById('Dec').checked = true;
     }
-
-    // see if no month is selected
     function no_month_check()
     {
         if (document.getElementById('Jan').checked == false &&
@@ -236,14 +215,11 @@
            document.getElementById('Oct').checked == false &&
            document.getElementById('Nov').checked == false &&
            document.getElementById('Dec').checked == false) {
-           // alert("No month check!");
            return true;
           }
         else
            return false;
     }
-
-    // unselect all months in the checkboxes
     function reset_months()
     {
         document.getElementById('Jan').checked = false;
@@ -259,8 +235,6 @@
         document.getElementById('Nov').checked = false;
         document.getElementById('Dec').checked = false;
     }
-
-    // enable all vars in dropdown menu
     function reset_vars()
     {
       var x=document.getElementById("var");
@@ -273,14 +247,10 @@
       x.options[6].disabled=false;
       x.options[7].disabled=false;
     }
-
-    // form variable string based on "var" dropdown selection
     function select_var()
     {
       var var_string = $("#var").val();
-      // disable the download button because of this change
       disable_download_button();
-
       if (var_string == "Air Temperature")
         variable = "ta";
       else if (var_string == "Specific Humidity")
@@ -297,28 +267,15 @@
         variable = "wap";  
       else if (var_string == "Relative Humidity")  
         variable = "hur";  
-
-      // alert("variable: " + variable)
     }
-
-    // set up "var" dropdown based status of "data" dropdown
     function select_data()
     {
       var data_string = $("#data").val();
       var x=document.getElementById("var");
-
-      // disable the download button because of this change
       disable_download_button();
-
-      // enable all options in "var" dropdown first
       reset_vars();
-
-      // alert(data_string);
-
-      // disable corresponding "var" options
       if (data_string == "NASA/AIRS") {
         x.options[0].selected=true;
-        //x.options[1].selected=true;
         x.options[2].disabled=true;
         x.options[3].disabled=true;
         x.options[4].disabled=true;
@@ -328,7 +285,6 @@
       }
       else if (data_string == "NASA/MLS") {
         x.options[0].selected=true;
-        //x.options[1].selected=true;
         x.options[2].disabled=true;
         x.options[3].disabled=true;
         x.options[4].disabled=true;
@@ -342,7 +298,6 @@
         x.options[2].disabled=true;
         x.options[3].disabled=true;
         x.options[4].selected=true;
-        //x.options[5].selected=true;
         x.options[6].disabled=true;
         x.options[7].disabled=true;
       }
@@ -353,243 +308,157 @@
         x.options[3].disabled=true;
         x.options[4].disabled=true;
         x.options[5].disabled=true;
-        //x.options[6].disabled=true;
-        //x.options[7].disabled=true;
         x.options[6].selected=true;
       }
       else {
         x.options[0].selected=true;
-        //x.options[1].selected=true;
-        //x.options[2].selected=true;
-        //x.options[3].selected=true;
         x.options[4].disabled=true;
         x.options[5].disabled=true;
       }
-
-      // form variable string
       select_var();
     }
-
-    // select checkboxes based on "months" dropdown
     function select_months()
     {
       var s1=document.getElementById("months");
-      // alert(s1.selectedIndex);
-      // alert(s1.options[s1.selectedIndex].value);
-
-      // disable the download button because of this change
       disable_download_button();
-
-      // "select none"
       if (s1.selectedIndex == 1) {
         reset_months();
       }
-      // "select all"
       if (s1.selectedIndex == 0) {
         select_all_months();
       }
-      // "summer"
       if (s1.selectedIndex == 2) {
         reset_months();
         document.getElementById('Jun').checked = true;
         document.getElementById('Jul').checked = true;
         document.getElementById('Aug').checked = true;
       }
-      // "autumn"
       if (s1.selectedIndex == 3) {
         reset_months();
         document.getElementById('Sep').checked = true;
         document.getElementById('Oct').checked = true;
         document.getElementById('Nov').checked = true;
       }
-      // "winter"
       if (s1.selectedIndex == 4) {
         reset_months();
         document.getElementById('Dec').checked = true;
         document.getElementById('Jan').checked = true;
         document.getElementById('Feb').checked = true;
       }
-      // "spring"
       if (s1.selectedIndex == 5) {
         reset_months();
         document.getElementById('Mar').checked = true;
         document.getElementById('Apr').checked = true;
         document.getElementById('May').checked = true;
       }
-        
     }
-
     $(document).ready(function(){
-
-      /*$("a").click(function(event){
-        alert("As you can see, the link no longer took you to jquery.com");
-        event.preventDefault();
-      });*/
-
-
       $("#download_data").click(function(event) {
         var durl = $("#data_url").val();
-        // alert(durl);
         window.location.assign(durl);
       });
-
-
       $("#threedvertical").click(function(event) {
 	Response = null;
-        // no data to download yet
         disable_download_button();
-
-        // flag error if no month box is checked
         if (no_month_check()) {
-           // $("#Response").html("<span style='color:red'>Error: please check at least one month.</span>");
            $("#Response").html("Error: please check at least one month.");
            $("#Image").html("");
            return;
         }
-
         $("#Response").html("Calculating ...");
         $("#data_url").html("Calculating ...");
         $("#Image").html("");
-
-        // sample url: http://cmacws.jpl.nasa.gov:9002/svc/threeDimVerticalProfile?model=ncc_noresm&var=cli&start_time=199001&end_time=199512&lon1=0&lon2=180&lat1=-29&lat2=29&months=1,2,3,4,5,6,7,8,9,10,11,12
-
-        // form url string
-        var url = "http://" + window.location.hostname + ":9002/svc/threeDimVerticalProfile?";
-        //var url = "http://einstein.sv.cmu.edu" + ":9002/svc/threeDimVerticalProfile?";
-        // alert(url);
-
+        var url = "http:
         var d1 = $("#data").val();
         var model1 = d1.replace("/", "_");
-
         var arglist = "";
         arglist = arglist.concat("model=");
         arglist = arglist.concat(model1);
-
         var v1 = $("#var").val();
         arglist = arglist.concat("&var=");
         arglist = arglist.concat(variable);
-
         var t0 = $("#t0").val();
         var t1 = $("#t1").val();
-
         t0 = t0.replace("-", "");
         t1 = t1.replace("-", "");
-
         arglist = arglist.concat("&start_time=");
         arglist = arglist.concat(t0);
-
         arglist = arglist.concat("&end_time=");
         arglist = arglist.concat(t1);
-
         var lon0 = $("#lon0").val();
         var lon1 = $("#lon1").val();
         var lat0 = $("#lat0").val();
         var lat1 = $("#lat1").val();
-
         arglist = arglist.concat("&lon1=");
         arglist = arglist.concat(lon0);
-
         arglist = arglist.concat("&lon2=");
         arglist = arglist.concat(lon1);
-
         arglist = arglist.concat("&lat1=");
         arglist = arglist.concat(lat0);
-
         arglist = arglist.concat("&lat2=");
         arglist = arglist.concat(lat1);
-
         var s1 = document.getElementById('months');
-
-        // get months checked by client
         var month_str = "";
-
         var mm = document.getElementById('Jan');
         if (mm.checked == true)
           month_str = month_str.concat(",1");
-
         var mm = document.getElementById('Feb');
         if (mm.checked == true)
           month_str = month_str.concat(",2");
-
         var mm = document.getElementById('Mar');
         if (mm.checked == true)
           month_str = month_str.concat(",3");
-
         var mm = document.getElementById('Apr');
         if (mm.checked == true)
           month_str = month_str.concat(",4");
-
         var mm = document.getElementById('May');
         if (mm.checked == true)
           month_str = month_str.concat(",5");
-
         var mm = document.getElementById('Jun');
         if (mm.checked == true)
           month_str = month_str.concat(",6");
-
         var mm = document.getElementById('Jul');
         if (mm.checked == true)
           month_str = month_str.concat(",7");
-
         var mm = document.getElementById('Aug');
         if (mm.checked == true)
           month_str = month_str.concat(",8");
-
         var mm = document.getElementById('Sep');
         if (mm.checked == true)
           month_str = month_str.concat(",9");
-
         var mm = document.getElementById('Oct');
         if (mm.checked == true)
           month_str = month_str.concat(",10");
-
         var mm = document.getElementById('Nov');
         if (mm.checked == true)
           month_str = month_str.concat(",11");
-
         var mm = document.getElementById('Dec');
         if (mm.checked == true)
           month_str = month_str.concat(",12");
-
-        // remove the leading ','
         month_str = month_str.substr(1);
-        // alert(month_str);
-
         arglist = arglist.concat("&months=");
         arglist = arglist.concat(month_str);
-        // alert("arglist: " + arglist);
-
         arglist = arglist.concat("&scale=");
         var y = document.getElementById("radioLin").checked;
         var yval;
         var x = document.getElementById("radioLin2").checked;
         var xval;
-        // alert(y);
         if (y == true)
           yval = 0;
         else
           yval = 2;
-
         if (x == true)
           xval = 0;
         else
           xval = 1;
-
         var scale1 =  yval + xval;
         var scale1_str =  scale1.toString();
-
         arglist = arglist.concat(scale1_str);
-
         var purpose = $("#purpose").val();
         arglist = arglist.concat("&purpose=");
         arglist = arglist.concat(purpose);
-
-        // url = url + encodeURIComponent(arglist);
         url = url + encodeURI(arglist);
-        // url = url + arglist;
-        //alert("url: " + url);
-
-        var urlTimeBounds = "http://" + window.location.hostname + ":9002/svc/time_bounds?";
+        var urlTimeBounds = "http:
         var arglistTB = "";
         arglistTB = arglistTB.concat("serviceType=");
         arglistTB = arglistTB.concat("1");
@@ -598,9 +467,6 @@
         arglistTB = arglistTB.concat("&var=");
         arglistTB = arglistTB.concat(variable);
         urlTimeBounds = urlTimeBounds + encodeURI(arglistTB);
-        //alert("urlTimeBounds: " + urlTimeBounds);
-
-
         $.ajax({
             type: "GET",
             url: urlTimeBounds,
@@ -608,9 +474,7 @@
             data: null,
             success: function(data, textStatus, xhr) {
                 Response = data;
-                //console.log("data: " + data);
                 if (data.success == false) {
-                    // alert(data.error);
                     Response = null;
                     var text = JSON.stringify(data, null, 4);
                     text = "Error in backend: <br>" + text; 
@@ -619,44 +483,29 @@
                     return;
                 }
                 var text = JSON.stringify(data, null, 4);
-                // alert("text: " + text);
-                // $("#Response").html("<pre>"+text+"</pre>");
-                // $("#Response").html(text);
-
                 var tb = data.time_bounds;
                 var bds = String(tb).split(",");
-                // alert("tb: " + tb);
-                // alert("bds: " + bds);
                 var lowerT = parseInt(bds[0]);
                 var upperT = parseInt(bds[1]);
-                // alert("lowerT: " + lowerT);
-                // alert("upperT: " + upperT);
                 var t0I = parseInt(t0);
                 var t1I = parseInt(t1);
-                // alert("t0: " + t0I);
-                // alert("t1: " + t1I);
-
                 if ( lowerT == 0 && upperT ==0 ) {
                   alert("We do not have data for this source and variable configuration.");
                   return;
                 }
-
                 if (t0I < lowerT && t1I < lowerT ||
                     t0I > upperT && t1I > upperT) {
                   alert("We do not have data that span your time range. Try the range inside ["+lowerT+", "+upperT+"].");
                   return;
                 }
-
                 if (t0I < lowerT && t1I <= upperT) {
                   alert("Your start year-month is out of bound. It has to be in or later than " + lowerT +
                         ". We will use the range ["+lowerT+", "+t1I+"] for you.");
                 }
-
                 if (t1I > upperT && t0I >= lowerT) {
                   alert("Your end year-month is out of bound. It has to be in or earlier than " + upperT +
                         ". We will use the range ["+t0I+", "+upperT+"] for you.");
                 }
-
                 if (t0I < lowerT && t1I > upperT ) {
                   alert("Both of your start and end year-months are out of bounds. They have to be in or earlier than " + upperT +
                         ", and in or later than " + lowerT + ". We will use the range ["+lowerT+", "+upperT+"] for you.");
@@ -665,14 +514,10 @@
             error: function(xhr, textStatus, errorThrown) {
 		$("#Response").html("error!");
 		$("#data_url").html("error!");
-                // alert("xhr.status: "+xhr.status);
-                // alert("error status: "+textStatus);
             },
             complete: function(xhr, textStatus) {
-                //alert("complete status: "+textStatus);
             }
         });
-
         $.ajax({
             type: "GET",
             url: url,
@@ -680,53 +525,33 @@
             data: null,
             success: function(data, textStatus, xhr) {
                 Response = data;
-                // alert("data: " + data);
                 if (data.success == false) {
-                    // alert(data.error);
                     Response = null;
                     var text = JSON.stringify(data, null, 4);
                     text = "Error in backend: <br>" + text; 
-                    // $("#Response").html("<span style='color:red'>" + text + "</span>");
                     $("#Response").html(text);
                     $("#data_url").html(text);
                     return;
                 }
                 var text = JSON.stringify(data, null, 4);
-                // alert(text);
-                // $("#Response").html("<pre>"+text+"</pre>");
                 $("#Response").html(text);
-
                 var html1 = "<img src='"+data.url+"' width='680'/>";
-                // alert(html1);
                 $("#Image").html(html1);
-
-                // post dataUrl to textarea and enable download button
                 $("#data_url").html(data.dataUrl);
                 enable_download_button();
             },
             error: function(xhr, textStatus, errorThrown) {
 		$("#Response").html("error!");
                 $("#data_url").html("error!");
-                // alert("xhr.status: "+xhr.status);
-                // alert("error status: "+textStatus);
             },
             complete: function(xhr, textStatus) {
-                //alert("complete status: "+textStatus);
             }
         });
-
       });
-
-
     });
-    
   </script>
-  }
-  
-  @main("Parameters of ConfId", scripts){
-	
-	@flash_message() 
-	<p>
+} @main("Parameters of ConfId", scripts){ @flash_message()
+<p>
 <div id="dataSource" style="display: none">@parameters.getDataSource()</div>
 <div id="variableName" style="display: none">@parameters.getVariableName()</div>
 <div id="startYearMonth" style="display: none">@parameters.getStartYearMonth()</div>
@@ -744,169 +569,155 @@
 <div id="dataURL" style="display: none">@parameters.getDataURL()</div>
 <div id="serviceResponseText" style="display: none">@parameters.getServiceResponseText()</div>
 <table border="1" align="center">
-
-<tr>
-<td colspan="4">
-<center>
-<b>Service: 3-D Variable Average Vertical Profile</b> <br><br>
-This service generates the average of a three-dimensional variable over a specified region and time and display the average as a function of pressure level as an X-Y plot. 
-<br><br>
-</center>
-</td>
-</tr>
-
-<tr>
-<td>data source:</td><td><select name="data", id="data" onchange="select_data()">
-<optgroup label="Observation">
-<option>NASA/AIRS</option>
-<option>NASA/MLS</option>
-<option >ARGO/ARGO</option>
-</optgroup>
-<optgroup label="Model: Historical">
-<option>CCCMA/CANESM2</option>
-<option>GFDL/ESM2G</option>
-<option>GISS/E2-H</option>
-<option>GISS/E2-R</option>
-<option>NCAR/CAM5</option>
-<option>NCC/NORESM</option>
-<option>UKMO/HadGEM2-ES</option>
-</optgroup>
-<optgroup label="Model: AMIP">
-<option>CCCMA/CANAM4</option>
-<option>CSIRO/MK3.6</option>
-<option>GFDL/CM3</option>
-<option>IPSL/CM5A-LR</option>
-<option>MIROC/MIROC5</option>
-<option>UKMO/HadGEM2-A</option>
-</optgroup>
-<optgroup label="Reanalysis">
-<option>ECMWF/interim</option>
-</optgroup>
-</select></td>
-
-<td>variable name:</td><td><select name="var", id="var" onchange="select_var()">
-<option>Air Temperature</option> 
-<option>Specific Humidity</option>
-<option>Cloud Ice Water Content</option>
-<option>Cloud Liquid Water Content</option>
-<option>Ocean Temperature</option>
-<option>Ocean Salinity</option>
-<option>Vertical Wind Velocity</option>  
-<option>Relative Humidity</option>
-</select></td>
-</tr>
-
-<tr>
-<td>start year-month:</td><td><input id="t0" value="2004-01" alt="start"/></td>
-<td>end year-month:</td><td><input id="t1" value="2004-12" alt="end"/></td>
-</tr>
-
-<tr>
-<td>select months:</td>
-<td><select name="months" id="months" onchange="select_months()">
-<option id="all">select all</option>
-<option id="none" selected="selected">select none</option>
-<option id="summer">Summer:Jun-Jul-Aug</option>
-<option id="autum">Autumn:Sep-Oct-Nov</option>
-<option id="winter">Winter:Dec-Jan-Feb</option>
-<option id="spring">Spring:Mar-Apr-May</option> </select>
-</td>
-<td>
-</td>
-<td>
-</td>
-</tr>
-
-<tr>
-<td>
-<label><input type="checkbox" name="option1" id="Jan" value="Jan" /> Jan<br></label>
-<label><input type="checkbox" name="option1" id="Feb" value="Feb" /> Feb<br></label>
-<label><input type="checkbox" name="option1" id="Mar" value="Mar" /> Mar<br></label>
-</td>
-<td>
-<label><input type="checkbox" name="option1" id="Apr" value="Apr" /> Apr<br></label>
-<label><input type="checkbox" name="option1" id="May" value="May" /> May<br></label>
-<label><input type="checkbox" name="option1" id="Jun" value="Jun" /> Jun<br></label>
-</td>
-<td>
-<label><input type="checkbox" name="option1" id="Jul" value="Jul" /> Jul<br></label>
-<label><input type="checkbox" name="option1" id="Aug" value="Aug" /> Aug<br></label>
-<label><input type="checkbox" name="option1" id="Sep" value="Sep" /> Sep<br></label>
-</td>
-<td>
-<label><input type="checkbox" name="option1" id="Oct" value="Oct" /> Oct<br></label>
-<label><input type="checkbox" name="option1" id="Nov" value="Nov" /> Nov<br></label>
-<label><input type="checkbox" name="option1" id="Dec" value="Dec" /> Dec<br></label>
-</td>
-</tr>
-
-<tr>
-<td>start lat (deg):</td><td><input id="lat0" value="-90"/></td>
-<td>end lat (deg):</td><td><input id="lat1" value="90"/></td>
-</tr>
-
-<tr>
-<td>start lon (deg):</td><td><input id="lon0" value="0"/></td>
-<td>end lon (deg):</td><td><input id="lon1" value="360"/></td>
-</tr>
-
-
-<tr><td colspan="1">
-pressure level scale:</td>
-<td colspan="1"><form> <input type="radio" name="scale1" value="linear" id="radioLin">linear
-<input type="radio" name="scale1" value="logarithmic" id="radioLog">logarithmic
-</form>
-</td>
-<td colspan="1">
-variable scale:
-</td>
-<td colspan="1">
-<form> <input type="radio" name="scale2" value="linear" id="radioLin2">linear
-<input type="radio" name="scale2" value="logarithmic" id="radioLog2">logarithmic
-</form>
-</td>
-</tr>
-
-<tr>
-<td colspan="1">
-Execution purpose
-</td>
-<td colspan="3">
-<form>
-<textarea name="purpose" id="purpose" rows="4" cols="50"> </textarea>
-</form>
-</td>
-</tr>
-
-
-
-
-
-
-<tr>
-<td colspan="2" align="center"><input id="threedvertical" type="submit" value="            Run  Again            " style="height:28px"/></td>
-<form>
-<td colspan="2" align="center"><input id="download_data" type="button" value="Download Data" style="height:28px"/>
-</td>
-</form>
-</tr>
-
-<tr>
-<td colspan="4">
-<div id="Image">Image Here</div>
-</td>
-</tr>
-<tr>
-<td colspan="4" align="center">
-<textarea readonly id="data_url" cols="89" rows="2">Data URL Here</textarea>
-</td>
-</tr>
-<tr> 
-<td colspan="4" align="center">
-<textarea readonly id="Response" cols="89" rows="6">Service Response Text Here</textarea>
-</td>
-</tr>
-</p>
-
+	<tr>
+		<td colspan="4">
+			<center>
+				<b>Service: 3-D Variable Average Vertical Profile</b> <br>
+				<br> This service generates the average of a three-dimensional
+				variable over a specified region and time and display the average as
+				a function of pressure level as an X-Y plot. <br>
+				<br>
+			</center>
+		</td>
+	</tr>
+	<tr>
+		<td>data source:</td>
+		<td><select name="data" , id="data" onchange="select_data()">
+				<optgroup label="Observation">
+					<option>NASA/AIRS</option>
+					<option>NASA/MLS</option>
+					<option>ARGO/ARGO</option>
+				</optgroup>
+				<optgroup label="Model: Historical">
+					<option>CCCMA/CANESM2</option>
+					<option>GFDL/ESM2G</option>
+					<option>GISS/E2-H</option>
+					<option>GISS/E2-R</option>
+					<option>NCAR/CAM5</option>
+					<option>NCC/NORESM</option>
+					<option>UKMO/HadGEM2-ES</option>
+				</optgroup>
+				<optgroup label="Model: AMIP">
+					<option>CCCMA/CANAM4</option>
+					<option>CSIRO/MK3.6</option>
+					<option>GFDL/CM3</option>
+					<option>IPSL/CM5A-LR</option>
+					<option>MIROC/MIROC5</option>
+					<option>UKMO/HadGEM2-A</option>
+				</optgroup>
+				<optgroup label="Reanalysis">
+					<option>ECMWF/interim</option>
+				</optgroup>
+		</select></td>
+		<td>variable name:</td>
+		<td><select name="var" , id="var" onchange="select_var()">
+				<option>Air Temperature</option>
+				<option>Specific Humidity</option>
+				<option>Cloud Ice Water Content</option>
+				<option>Cloud Liquid Water Content</option>
+				<option>Ocean Temperature</option>
+				<option>Ocean Salinity</option>
+				<option>Vertical Wind Velocity</option>
+				<option>Relative Humidity</option>
+		</select></td>
+	</tr>
+	<tr>
+		<td>start year-month:</td>
+		<td><input id="t0" value="2004-01" alt="start" /></td>
+		<td>end year-month:</td>
+		<td><input id="t1" value="2004-12" alt="end" /></td>
+	</tr>
+	<tr>
+		<td>select months:</td>
+		<td><select name="months" id="months" onchange="select_months()">
+				<option id="all">select all</option>
+				<option id="none" selected="selected">select none</option>
+				<option id="summer">Summer:Jun-Jul-Aug</option>
+				<option id="autum">Autumn:Sep-Oct-Nov</option>
+				<option id="winter">Winter:Dec-Jan-Feb</option>
+				<option id="spring">Spring:Mar-Apr-May</option>
+		</select></td>
+		<td></td>
+		<td></td>
+	</tr>
+	<tr>
+		<td><label><input type="checkbox" name="option1" id="Jan"
+				value="Jan" /> Jan<br></label> <label><input type="checkbox"
+				name="option1" id="Feb" value="Feb" /> Feb<br></label> <label><input
+				type="checkbox" name="option1" id="Mar" value="Mar" /> Mar<br></label>
+		</td>
+		<td><label><input type="checkbox" name="option1" id="Apr"
+				value="Apr" /> Apr<br></label> <label><input type="checkbox"
+				name="option1" id="May" value="May" /> May<br></label> <label><input
+				type="checkbox" name="option1" id="Jun" value="Jun" /> Jun<br></label>
+		</td>
+		<td><label><input type="checkbox" name="option1" id="Jul"
+				value="Jul" /> Jul<br></label> <label><input type="checkbox"
+				name="option1" id="Aug" value="Aug" /> Aug<br></label> <label><input
+				type="checkbox" name="option1" id="Sep" value="Sep" /> Sep<br></label>
+		</td>
+		<td><label><input type="checkbox" name="option1" id="Oct"
+				value="Oct" /> Oct<br></label> <label><input type="checkbox"
+				name="option1" id="Nov" value="Nov" /> Nov<br></label> <label><input
+				type="checkbox" name="option1" id="Dec" value="Dec" /> Dec<br></label>
+		</td>
+	</tr>
+	<tr>
+		<td>start lat (deg):</td>
+		<td><input id="lat0" value="-90" /></td>
+		<td>end lat (deg):</td>
+		<td><input id="lat1" value="90" /></td>
+	</tr>
+	<tr>
+		<td>start lon (deg):</td>
+		<td><input id="lon0" value="0" /></td>
+		<td>end lon (deg):</td>
+		<td><input id="lon1" value="360" /></td>
+	</tr>
+	<tr>
+		<td colspan="1">pressure level scale:</td>
+		<td colspan="1"><form>
+				<input type="radio" name="scale1" value="linear" id="radioLin">linear
+				<input type="radio" name="scale1" value="logarithmic" id="radioLog">logarithmic
+			</form></td>
+		<td colspan="1">variable scale:</td>
+		<td colspan="1">
+			<form>
+				<input type="radio" name="scale2" value="linear" id="radioLin2">linear
+				<input type="radio" name="scale2" value="logarithmic" id="radioLog2">logarithmic
+			</form>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="1">Execution purpose</td>
+		<td colspan="3">
+			<form>
+				<textarea name="purpose" id="purpose" rows="4" cols="50"> </textarea>
+			</form>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="2" align="center"><input id="threedvertical"
+			type="submit" value="            Run  Again            "
+			style="height: 28px" /></td>
+		<form>
+			<td colspan="2" align="center"><input id="download_data"
+				type="button" value="Download Data" style="height: 28px" /></td>
+		</form>
+	</tr>
+	<tr>
+		<td colspan="4">
+			<div id="Image">Image Here</div>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="4" align="center"><textarea readonly id="data_url"
+				cols="89" rows="2">Data URL Here</textarea></td>
+	</tr>
+	<tr>
+		<td colspan="4" align="center"><textarea readonly id="Response"
+				cols="89" rows="6">Service Response Text Here</textarea></td>
+	</tr>
+	</p>
 </table>
-}
\ No newline at end of file
+}


[22/50] [abbrv] incubator-cmda git commit: Change Service Name

Posted by xi...@apache.org.
Change Service Name

Project: http://git-wip-us.apache.org/repos/asf/incubator-cmda/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cmda/commit/7d2aaccb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cmda/tree/7d2aaccb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cmda/diff/7d2aaccb

Branch: refs/heads/master
Commit: 7d2aaccb5849145e94ad4ae8e2232312d36eb789
Parents: f22b3e3
Author: mingqi830 <mq...@andrew.cmu.edu>
Authored: Wed Sep 2 17:14:33 2015 -0700
Committer: mingqi830 <mq...@andrew.cmu.edu>
Committed: Wed Sep 2 17:14:33 2015 -0700

----------------------------------------------------------------------
 app/controllers/ClimateServiceController.java   |    2 +-
 ...rencePlotTwoTimeAveragedVariables.scala.html | 1357 ------------------
 ...rencePlotTwoTimeAveragedVariables.scala.html | 1357 ++++++++++++++++++
 3 files changed, 1358 insertions(+), 1358 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/7d2aaccb/app/controllers/ClimateServiceController.java
----------------------------------------------------------------------
diff --git a/app/controllers/ClimateServiceController.java b/app/controllers/ClimateServiceController.java
index 1a75a3f..ae5d8b5 100644
--- a/app/controllers/ClimateServiceController.java
+++ b/app/controllers/ClimateServiceController.java
@@ -717,7 +717,7 @@ public class ClimateServiceController extends Controller {
 					diffPlotTwoTimeAvg.setExecutionPurpose(response.path("purpose").textValue());
 					diffPlotTwoTimeAvg.setImage(response.path("plotUrl").textValue());
 					diffPlotTwoTimeAvg.setDataUrl(response.path("dataUrl").textValue());
-					return ok(views.html.climate.DifferencePlotTwoTimeAveragedVariables.render(diffPlotTwoTimeAvg));
+					return ok(views.html.climate.differencePlotTwoTimeAveragedVariables.render(diffPlotTwoTimeAvg));
 			}else if (serviceName.equals("3-D-Variable-Average-Vertical-Profile")){ //"18")){
 					for (int i = 0; i < responseConfigItems.size(); i++) {
 						String parameterName = responseConfigItems.get(i).path("parameter").path("purpose").textValue();

http://git-wip-us.apache.org/repos/asf/incubator-cmda/blob/7d2aaccb/app/views/climate/DifferencePlotTwoTimeAveragedVariables.scala.html
----------------------------------------------------------------------
diff --git a/app/views/climate/DifferencePlotTwoTimeAveragedVariables.scala.html b/app/views/climate/DifferencePlotTwoTimeAveragedVariables.scala.html
deleted file mode 100644
index 0a64039..0000000
--- a/app/views/climate/DifferencePlotTwoTimeAveragedVariables.scala.html
+++ /dev/null
@@ -1,1357 +0,0 @@
-@(parameters: metadata.DiffPlotTwoTimeAveragedVar) @import helper._
-<link rel="stylesheet"
-	href='@routes.Assets.at("stylesheets/livefitler.css")'>
-@scripts = {
-<script src='@routes.Assets.at("javascripts/edit_button.js")'></script>
-<script src='@routes.Assets.at("javascripts/livefilter.js")'></script>
-<script type="text/javascript"
-	src='@routes.Assets.at("javascripts/jquery-1.9.0.min.js")'></script>
-<script type="text/javascript" src="https:
-	<script type="
-	text/javascript" src='@routes.Assets.at("javascripts/json2.js")'></script>
-<script type="text/javascript"
-	src='@routes.Assets.at("javascripts/xmisc.js")'></script>
-<script type="text/javascript">
-	var Response = null;
-    var variable1 = "";
-    var variable2 = "";
-    window.onload = function() {
-	    changeDataSource();
-	    select_data1(1);
-	    changeDataSource1();
-	    select_data1(2);
-	    changeVariableName();
-	    select_var1(1);
-	    changeVariableName1();
-	    select_var1(2);
-	    var imageUrl = $('#image').text();
-	    $('#purpose').html($('#executionPurpose').text());
-	    $('#Image').html('<img src="'+imageUrl+'" width=680 />');
-	    $('#data_url').html($('#dataURL').text());
-	    $('#Response').html($('serviceResponseText').text());
-    }
-    function changeVariableName1(){
-	    var var_string = $('#variableName2').text();
-	    var x=document.getElementById("var2");
-	    if (var_string == "clt")
-	    x.options[1].selected=true;
-	    else if (var_string == "ts")
-	    x.options[2].selected=true;
-	    else if (var_string == "tos")
-	    x.options[3].selected=true;
-	    else if (var_string == "pr")
-	    x.options[0].selected=true;
-	    else if (var_string == "uas")
-	    x.options[4].selected=true;
-	    else if (var_string == "vas")
-	    x.options[5].selected=true;
-	    else if (var_string == "sfcWind")
-	    x.options[6].selected=true;
-	    else if (var_string == "zos")
-	    x.options[7].selected=true;
-	    else if (var_string == "lai")
-	    x.options[8].selected=true;
-	    else if (var_string == "zl")
-	    x.options[9].selected=true;
-	    else if (var_string == "zo")
-	    x.options[10].selected=true;
-	    else if (var_string == "ohc700")
-	    x.options[11].selected=true;
-	    else if (var_string == "ohc2000")
-	    x.options[12].selected=true;
-	    else if (var_string == "rlds")
-	    x.options[13].selected=true;
-	    else if (var_string == "rsds")
-	    x.options[14].selected=true;
-	    else if (var_string == "rlus")
-	    x.options[15].selected=true;
-	    else if (var_string == "rsus")
-	    x.options[16].selected=true;
-	    else if (var_string == "rldscs")
-	    x.options[17].selected=true;
-	    else if (var_string == "rsdscs")
-	    x.options[18].selected=true;
-	    else if (var_string == "rsuscs")
-	    x.options[19].selected=true;
-	    else if (var_string == "rsdt")
-	    x.options[20].selected=true;
-	    else if (var_string == "rlutcs")
-	    x.options[21].selected=true;
-	    else if (var_string == "rlut")
-	    x.options[22].selected=true;
-	    else if (var_string == "rsutcs")
-	    x.options[23].selected=true;
-	    else if (var_string == "rsut")
-	    x.options[24].selected=true;
-	}
-    function changeVariableName(){
-	    var var_string = $('#variableName1').text();
-	    var x=document.getElementById("var1");
-	    if (var_string == "clt")
-	    x.options[1].selected=true;
-	    else if (var_string == "ts")
-	    x.options[2].selected=true;
-	    else if (var_string == "tos")
-	    x.options[3].selected=true;
-	    else if (var_string == "pr")
-	    x.options[0].selected=true;
-	    else if (var_string == "uas")
-	    x.options[4].selected=true;
-	    else if (var_string == "vas")
-	    x.options[5].selected=true;
-	    else if (var_string == "sfcWind")
-	    x.options[6].selected=true;
-	    else if (var_string == "zos")
-	    x.options[7].selected=true;
-	    else if (var_string == "lai")
-	    x.options[8].selected=true;
-	    else if (var_string == "zl")
-	    x.options[9].selected=true;
-	    else if (var_string == "zo")
-	    x.options[10].selected=true;
-	    else if (var_string == "ohc700")
-	    x.options[11].selected=true;
-	    else if (var_string == "ohc2000")
-	    x.options[12].selected=true;
-	    else if (var_string == "rlds")
-	    x.options[13].selected=true;
-	    else if (var_string == "rsds")
-	    x.options[14].selected=true;
-	    else if (var_string == "rlus")
-	    x.options[15].selected=true;
-	    else if (var_string == "rsus")
-	    x.options[16].selected=true;
-	    else if (var_string == "rldscs")
-	    x.options[17].selected=true;
-	    else if (var_string == "rsdscs")
-	    x.options[18].selected=true;
-	    else if (var_string == "rsuscs")
-	    x.options[19].selected=true;
-	    else if (var_string == "rsdt")
-	    x.options[20].selected=true;
-	    else if (var_string == "rlutcs")
-	    x.options[21].selected=true;
-	    else if (var_string == "rlut")
-	    x.options[22].selected=true;
-	    else if (var_string == "rsutcs")
-	    x.options[23].selected=true;
-	    else if (var_string == "rsut")
-	    x.options[24].selected=true;
-    }
-    function changeDataSource1(){
-	    var dataSource = $('#source2').text();
-	    dataSource = dataSource.toUpperCase();
-	    var x = document.getElementById("data2");
-	    if(dataSource == "NASA_MODIS" ){
-	    x.options[13].selected=true;
-	    }
-	    else if(dataSource == "NASA_AMSRE" ){
-	    x.options[14].selected=true;
-	    }
-	    else if(dataSource == "NASA_TRMM" ){
-	    x.options[15].selected=true;
-	    }
-	    else if(dataSource == "NASA_GPCP" ){
-	    x.options[16].selected=true;
-	    }
-	    else if(dataSource == "NASA_QUIKSCAT" ){
-	    x.options[17].selected=true;
-	    }
-	    else if(dataSource == "NASA_AVISO" ){
-	    x.options[18].selected=true;
-	    }
-	    else if(dataSource == "NASA_GRACE" ){
-	    x.options[19].selected=true;
-	    }
-	    else if(dataSource == "NOAA_NODC" ){
-	    x.options[20].selected=true;
-	    }
-	    else if(dataSource == "NASA_CERES" ){
-	    x.options[21].selected=true;
-	    }
-	    else if(dataSource == "NASA_AIRS" ){
-	    x.options[22].selected=true;
-	    }
-	    else if(dataSource == "NASA_MLS" ){
-	    x.options[23].selected=true;
-	    }
-	    else if(dataSource == "NASA_ARGO" ){
-	    x.options[24].selected=true;
-	    }
-	    else if(dataSource == "CCCMA_CANESM2" ){
-	    x.options[0].selected=true;
-	    }
-	    else if(dataSource == "GFDL_ESM2G" ){
-	    x.options[1].selected=true;
-	    }
-	    else if(dataSource == "GISS_E2-H" ){
-	    x.options[2].selected=true;
-	    }
-	    else if(dataSource == "GISS_E2-R" ){
-	    x.options[3].selected=true;
-	    }
-	    else if(dataSource == "NCAR_CAM5" ){
-	    x.options[4].selected=true;
-	    }
-	    else if(dataSource == "NCC_NORESM" ){
-	    x.options[5].selected=true;
-	    }
-	    else if(dataSource == "UKMO_HADGEM2-ES" ){
-	    x.options[6].selected=true;
-	    }
-	    else if(dataSource == "CCCMA_CANAM4" ){
-	    x.options[7].selected=true;
-	    }
-	    else if(dataSource == "CSIRO_MK3.6" ){
-	    x.options[8].selected=true;
-	    }
-	    else if(dataSource == "GFDL_CM3" ){
-	    x.options[9].selected=true;
-	    }
-	    else if(dataSource == "IPSL_CM5A-LR" ){
-	    x.options[10].selected=true;
-	    }
-	    else if(dataSource == "MIROC_MIROC5" ){
-	    x.options[11].selected=true;
-	    }
-	    else if(dataSource == "UKMO_HADGEM2-A" ){
-	    x.options[12].selected=true;
-	    }
-	    else if(dataSource == "ECMWF_INTERIM" ){
-	    x.options[25].selected=true;
-	    }
-    }
-    function changeDataSource(){
-	    var dataSource = $('#source1').text();
-	    dataSource = dataSource.toUpperCase();
-	    var x = document.getElementById("data1");
-	    if(dataSource == "NASA_MODIS" ){
-	    x.options[13].selected=true;
-	    }
-	    else if(dataSource == "NASA_AMSRE" ){
-	    x.options[14].selected=true;
-	    }
-	    else if(dataSource == "NASA_TRMM" ){
-	    x.options[15].selected=true;
-	    }
-	    else if(dataSource == "NASA_GPCP" ){
-	    x.options[16].selected=true;
-	    }
-	    else if(dataSource == "NASA_QUIKSCAT" ){
-	    x.options[17].selected=true;
-	    }
-	    else if(dataSource == "NASA_AVISO" ){
-	    x.options[18].selected=true;
-	    }
-	    else if(dataSource == "NASA_GRACE" ){
-	    x.options[19].selected=true;
-	    }
-	    else if(dataSource == "NOAA_NODC" ){
-	    x.options[20].selected=true;
-	    }
-	    else if(dataSource == "NASA_CERES" ){
-	    x.options[21].selected=true;
-	    }
-	    else if(dataSource == "NASA_AIRS" ){
-	    x.options[22].selected=true;
-	    }
-	    else if(dataSource == "NASA_MLS" ){
-	    x.options[23].selected=true;
-	    }
-	    else if(dataSource == "NASA_ARGO" ){
-	    x.options[24].selected=true;
-	    }
-	    else if(dataSource == "CCCMA_CANESM2" ){
-	    x.options[0].selected=true;
-	    }
-	    else if(dataSource == "GFDL_ESM2G" ){
-	    x.options[1].selected=true;
-	    }
-	    else if(dataSource == "GISS_E2-H" ){
-	    x.options[2].selected=true;
-	    }
-	    else if(dataSource == "GISS_E2-R" ){
-	    x.options[3].selected=true;
-	    }
-	    else if(dataSource == "NCAR_CAM5" ){
-	    x.options[4].selected=true;
-	    }
-	    else if(dataSource == "NCC_NORESM" ){
-	    x.options[5].selected=true;
-	    }
-	    else if(dataSource == "UKMO_HADGEM2-ES" ){
-	    x.options[6].selected=true;
-	    }
-	    else if(dataSource == "CCCMA_CANAM4" ){
-	    x.options[7].selected=true;
-	    }
-	    else if(dataSource == "CSIRO_MK3.6" ){
-	    x.options[8].selected=true;
-	    }
-	    else if(dataSource == "GFDL_CM3" ){
-	    x.options[9].selected=true;
-	    }
-	    else if(dataSource == "IPSL_CM5A-LR" ){
-	    x.options[10].selected=true;
-	    }
-	    else if(dataSource == "MIROC_MIROC5" ){
-	    x.options[11].selected=true;
-	    }
-	    else if(dataSource == "UKMO_HADGEM2-A" ){
-	    x.options[12].selected=true;
-	    }
-	    else if(dataSource == "ECMWF_INTERIM" ){
-	    x.options[25].selected=true;
-	    }
-    }
-    function enable_download_button()
-    {
-      var x=document.getElementById("download_data");
-      x.disabled=false;
-    }
-    function unset_vars1(ID)
-    {
-      var x;
-      if (ID == 1) {
-        x=document.getElementById("var1");
-      }
-      else if (ID == 2) {
-        x=document.getElementById("var2");
-      }
-      x.options[0].disabled=true;
-      x.options[1].disabled=true;
-      x.options[2].disabled=true;
-      x.options[3].disabled=true;
-      x.options[4].disabled=true;
-      x.options[5].disabled=true;
-      x.options[6].disabled=true;
-      x.options[7].disabled=true;
-      x.options[8].disabled=true;
-      x.options[9].disabled=true;
-      x.options[10].disabled=true;
-      x.options[11].disabled=true;
-      x.options[12].disabled=true;
-      x.options[13].disabled=true;
-      x.options[14].disabled=true;
-      x.options[15].disabled=true;
-      x.options[16].disabled=true;
-      x.options[17].disabled=true;
-      x.options[18].disabled=true;
-      x.options[19].disabled=true;
-      x.options[20].disabled=true;
-      x.options[21].disabled=true;
-      x.options[22].disabled=true;
-      x.options[23].disabled=true;
-      x.options[24].disabled=true;
-      x.options[25].disabled=true;
-      x.options[26].disabled=true;
-      x.options[27].disabled=true;
-      x.options[28].disabled=true;
-      x.options[29].disabled=true;
-      x.options[30].disabled=true;
-      x.options[31].disabled=true;
-      x.options[32].disabled=true;
-    }
-    function disable_pres1(ID)
-    {
-      var x;
-      if (ID == 1) {
-        x=document.getElementById("pres1");
-      }
-      else if (ID == 2) {
-        x=document.getElementById("pres2");
-      }
-      x.value = "N/A";
-      x.disabled=true;
-    }
-    function enable_pres1(ID)
-    {
-      var x;
-      if (ID == 1) {
-        x=document.getElementById("pres1");
-      }
-      else if (ID == 2) {
-        x=document.getElementById("pres2");
-      }
-      x.value = "500";
-      x.disabled=false;
-    }
-    function select_var1(ID)
-    {
-      var var_string;
-      if (ID == 1) {
-        var_string = $("#var1").val();
-      }
-      else if (ID == 2) {
-        var_string = $("#var2").val();
-    }
-    disable_download_button();  
-    if (var_string == "Total Cloud Fraction") { 
-      if (ID == 1) {
-        variable1 = "clt";  
-      }
-      else if (ID == 2) {
-        variable2 = "clt";  
-      }
-      disable_pres1(ID);
-    }
-     else if (var_string == "Surface Temperature") {
-       if (ID == 1) {
-         variable1 = "ts";  
-       }
-       else if (ID == 2) {
-         variable2 = "ts";  
-       }
-       disable_pres1(ID);
-     }
-     else if (var_string == "Sea Surface Temperature") { 
-       if (ID == 1) {
-         variable1 = "tos";  
-       }
-       else if (ID == 2) {
-         variable2 = "tos";  
-       }
-       disable_pres1(ID);
-     }
-     else if (var_string == "Precipitation Flux") { 
-       if (ID == 1) {
-         variable1 = "pr";  
-       }
-       else if (ID == 2) {
-         variable2 = "pr";  
-       }
-       disable_pres1(ID);
-     }
-     else if (var_string == "Eastward Near-Surface Wind") { 
-       if (ID == 1) {
-         variable1 = "uas";  
-       }
-       else if (ID == 2) {
-         variable2 = "uas";  
-       }
-       disable_pres1(ID);
-     }
-     else if (var_string == "Northward Near-Surface Wind") {  
-       if (ID == 1) {
-         variable1 = "vas";  
-       }
-       else if (ID == 2) {
-         variable2 = "vas";  
-       }
-       disable_pres1(ID);
-     }
-     else if (var_string == "Near-Surface Wind Speed") { 
-       if (ID == 1) {
-         variable1 = "sfcWind";  
-       }
-       else if (ID == 2) {
-         variable2 = "sfcWind";  
-       }
-       disable_pres1(ID);
-     }
-     else if (var_string == "Sea Surface Height") { 
-       if (ID == 1) {
-         variable1 = "zos";  
-       }
-       else if (ID == 2) {
-         variable2 = "zos";  
-       }
-       disable_pres1(ID);
-     }
-     else if (var_string == "Leaf Area Index") { 
-       if (ID == 1) {
-         variable1 = "lai";  
-       }
-       else if (ID == 2) {
-         variable2 = "lai";  
-       }
-       disable_pres1(ID);
-     }
-     else if (var_string == "Equivalent Water Height Over Land") {
-       if (ID == 1) {
-         variable1 = "zl";  
-       }
-       else if (ID == 2) {
-         variable2 = "zl";  
-       }
-       disable_pres1(ID);
-     }
-     else if (var_string == "Equivalent Water Height Over Ocean") {
-       if (ID == 1) {
-         variable1 = "zo";
-       }
-       else if (ID == 2) {
-         variable2 = "zo";
-       }
-       disable_pres1(ID);
-     }
-     else if (var_string == "Ocean Heat Content Anomaly within 700 m Depth") {
-       if (ID == 1) {
-         variable1 = "ohc700";
-       }
-       else if (ID == 2) {
-         variable2 = "ohc700";
-       }
-       disable_pres1(ID);
-     }
-     else if (var_string == "Ocean Heat Content Anomaly within 2000 m Depth") {
-       if (ID == 1) {
-         variable1 = "ohc2000";
-       }
-       else if (ID == 2) {
-         variable2 = "ohc2000";
-       }
-       disable_pres1(ID);
-     }
-     else if (var_string == "Surface Downwelling Longwave Radiation") {
-       if (ID == 1) {
-         variable1 = "rlds";
-       }
-       else if (ID == 2) {
-         variable2 = "rlds";
-       }
-       disable_pres1(ID);
-     }
-     else if (var_string == "Surface Downwelling Shortwave Radiation") {
-       if (ID == 1) {
-         variable1 = "rsds";
-       }
-       else if (ID == 2) {
-         variable2 = "rsds";
-       }
-       disable_pres1(ID);
-     }
-     else if (var_string == "Surface Upwelling Longwave Radiation") {
-       if (ID == 1) {
-         variable1 = "rlus";
-       }
-       else if (ID == 2) {
-         variable2 = "rlus";
-       }
-       disable_pres1(ID);
-     }
-     else if (var_string == "Surface Upwelling Shortwave Radiation") {
-       if (ID == 1) {
-         variable1 = "rsus";
-       }
-       else if (ID == 2) {
-         variable2 = "rsus";
-       }
-       disable_pres1(ID);
-     }
-     else if (var_string == "Surface Downwelling Clear-Sky Longwave Radiation") {
-       if (ID == 1) {
-         variable1 = "rldscs";
-       }
-       else if (ID == 2) {
-         variable2 = "rldscs";
-       }
-       disable_pres1(ID);
-     }
-     else if (var_string == "Surface Downwelling Clear-Sky Shortwave Radiation") {
-       if (ID == 1) {
-         variable1 = "rsdscs";
-       }
-       else if (ID == 2) {
-         variable2 = "rsdscs";
-       }
-       disable_pres1(ID);
-     }
-     else if (var_string == "Surface Upwelling Clear-Sky Shortwave Radiation") {
-       if (ID == 1) {
-         variable1 = "rsuscs";
-       }
-       else if (ID == 2) {
-         variable2 = "rsuscs";
-       }
-       disable_pres1(ID);
-     }
-     else if (var_string == "TOA Incident Shortwave Radiation") {
-       if (ID == 1) {
-         variable1 = "rsdt";
-       }
-       else if (ID == 2) {
-         variable2 = "rsdt";
-       }
-       disable_pres1(ID);
-     }
-     else if (var_string == "TOA Outgoing Clear-Sky Longwave Radiation") {
-       if (ID == 1) {
-         variable1 = "rlutcs";
-       }
-       else if (ID == 2) {
-         variable2 = "rlutcs";
-       }
-       disable_pres1(ID);
-     }
-     else if (var_string == "TOA Outgoing Longwave Radiation") {
-       if (ID == 1) {
-         variable1 = "rlut";
-       }
-       else if (ID == 2) {
-         variable2 = "rlut";
-       }
-       disable_pres1(ID);
-     }
-     else if (var_string == "TOA Outgoing Clear-Sky Shortwave Radiation") {
-       if (ID == 1) {
-         variable1 = "rsutcs";
-       }
-       else if (ID == 2) {
-         variable2 = "rsutcs";
-       }
-       disable_pres1(ID);
-     }
-     else if (var_string == "TOA Outgoing Shortwave Radiation") {
-       if (ID == 1) {
-         variable1 = "rsut";
-       }
-       else if (ID == 2) {
-         variable2 = "rsut";
-       }
-       disable_pres1(ID);
-     }
-     else if (var_string == "Air Temperature") {
-       if (ID == 1) {
-         variable1 = "ta";
-       }
-       else if (ID == 2) {
-         variable2 = "ta";
-       }
-       enable_pres1(ID);
-     }
-     else if (var_string == "Specific Humidity") {
-       if (ID == 1) {
-         variable1 = "hus";
-       }
-       else if (ID == 2) {
-         variable2 = "hus";
-       }
-       enable_pres1(ID);
-     }
-     else if (var_string == "Cloud Ice Water Content") {
-       if (ID == 1) {
-         variable1 = "cli";
-       }
-       else if (ID == 2) {
-         variable2 = "cli";
-       }
-       enable_pres1(ID);
-     }
-     else if (var_string == "Cloud Liquid Water Content") {
-       if (ID == 1) {
-         variable1 = "clw";
-       }
-       else if (ID == 2) {
-         variable2 = "clw";
-       }
-       enable_pres1(ID);
-     }
-     else if (var_string == "Ocean Temperature") {
-       if (ID == 1) {
-         variable1 = "ot";
-       }
-       else if (ID == 2) {
-         variable2 = "ot";
-       }
-       enable_pres1(ID);
-     }
-     else if (var_string == "Ocean Salinity") {
-       if (ID == 1) {
-         variable1 = "os";
-       }
-       else if (ID == 2) {
-         variable2 = "os";
-       }
-       enable_pres1(ID);
-     }
-     else if (var_string == "Vertical Wind Velocity") {
-       if (ID == 1) {
-         variable1 = "wap";
-       }
-       else if (ID == 2) {
-         variable2 = "wap";
-       }
-       enable_pres1(ID);
-     }
-     else if (var_string == "Relative Humidity") {
-       if (ID == 1) {
-         variable1 = "hur";
-       }
-       else if (ID == 2) {
-         variable2 = "hur";
-       }
-       enable_pres1(ID);
-     }
-    }
-    function select_data1(ID)
-    {
-      var data_string;
-      var x;
-      if (ID == 1) {
-        data_string = $("#data1").val();
-        x = document.getElementById("var1");
-      }
-      else if (ID == 2) {
-        data_string = $("#data2").val();
-        x = document.getElementById("var2");
-      }
-      disable_download_button();
-      if (data_string == "NASA/AMSRE") {
-        unset_vars1(ID); 
-        x.options[3].selected=true;
-        disable_pres1(ID); 
-        x.options[3].disabled=false;
-      }
-      else if (data_string == "NASA/MODIS") {
-        unset_vars1(ID);
-        x.options[1].selected=true;
-        disable_pres1(ID); 
-        x.options[1].disabled=false;
-        x.options[8].disabled=false;
-      }
-      else if (data_string == "NASA/TRMM") {
-        unset_vars1(ID);
-        x.options[0].selected=true;
-        disable_pres1(ID); 
-        x.options[0].disabled=false;
-      }
-      else if (data_string == "NASA/GPCP") {
-        unset_vars1(ID);
-        x.options[0].selected=true;
-        disable_pres1(ID); 
-        x.options[0].disabled=false;
-      }
-      else if (data_string == "NASA/QuikSCAT") {
-        unset_vars1(ID);
-        x.options[4].selected=true;
-        disable_pres1(ID); 
-        x.options[4].disabled=false;
-        x.options[5].disabled=false;
-        x.options[6].disabled=false;
-      }
-      else if (data_string == "NASA/AVISO") {
-        unset_vars1(ID);
-        x.options[7].selected=true;
-        disable_pres1(ID); 
-        x.options[7].disabled=false;
-      }
-      else if (data_string == "NASA/GRACE") {
-        unset_vars1(ID);
-        x.options[9].selected=true;
-        disable_pres1(ID); 
-        x.options[9].disabled=false;
-        x.options[10].disabled=false;
-      }
-      else if (data_string == "NOAA/NODC") {
-        unset_vars1(ID);
-        x.options[11].selected=true;
-        disable_pres1(ID); 
-        x.options[11].disabled=false;
-        x.options[12].disabled=false;
-      }
-      else if (data_string == "NASA/CERES") {
-        unset_vars1(ID);
-        x.options[13].selected=true;
-        disable_pres1(ID); 
-        x.options[13].disabled=false;
-        x.options[14].disabled=false;
-        x.options[15].disabled=false;
-        x.options[16].disabled=false;
-        x.options[17].disabled=false;
-        x.options[18].disabled=false;
-        x.options[19].disabled=false;
-        x.options[20].disabled=false;
-        x.options[21].disabled=false;
-        x.options[22].disabled=false;
-        x.options[23].disabled=false;
-        x.options[24].disabled=false;
-      }
-      else if (data_string == "NASA/AIRS") {
-        unset_vars1(ID);
-        x.options[25].selected=true;
-        enable_pres1(ID); 
-        x.options[25].disabled=false;
-        x.options[26].disabled=false;
-      }
-      else if (data_string == "NASA/MLS") {
-        unset_vars1(ID);
-        x.options[25].selected=true;
-        enable_pres1(ID); 
-        x.options[25].disabled=false;
-        x.options[26].disabled=false;
-      }
-      else if (data_string == "ARGO/ARGO") {
-        unset_vars1(ID);
-        x.options[29].selected=true;
-        enable_pres1(ID); 
-        x.options[29].disabled=false;
-        x.options[30].disabled=false;
-      }
-      else if (data_string == "CCCMA/CANAM4") {
-        unset_vars1(ID);
-        x.options[0].selected=true;
-        disable_pres1(ID); 
-        x.options[0].disabled=false;
-        x.options[1].disabled=false;
-        x.options[2].disabled=false;
-        x.options[4].disabled=false;
-        x.options[5].disabled=false;
-        x.options[6].disabled=false;
-        x.options[13].disabled=false;
-        x.options[14].disabled=false;
-        x.options[15].disabled=false;
-        x.options[16].disabled=false;
-        x.options[17].disabled=false;
-        x.options[18].disabled=false;
-        x.options[19].disabled=false;
-        x.options[20].disabled=false;
-        x.options[21].disabled=false;
-        x.options[22].disabled=false;
-        x.options[23].disabled=false;
-        x.options[24].disabled=false;
-        x.options[25].disabled=false;
-        x.options[26].disabled=false;
-        x.options[27].disabled=false;
-        x.options[28].disabled=false;
-      }
-      else if (data_string == "CSIRO/MK3.6") {
-        unset_vars1(ID);
-        x.options[0].selected=true;
-        disable_pres1(ID); 
-        x.options[0].disabled=false;
-        x.options[1].disabled=false;
-        x.options[2].disabled=false;
-        x.options[4].disabled=false;
-        x.options[5].disabled=false;
-        x.options[6].disabled=false;
-        x.options[13].disabled=false;
-        x.options[14].disabled=false;
-        x.options[15].disabled=false;
-        x.options[16].disabled=false;
-        x.options[17].disabled=false;
-        x.options[18].disabled=false;
-        x.options[19].disabled=false;
-        x.options[20].disabled=false;
-        x.options[21].disabled=false;
-        x.options[22].disabled=false;
-        x.options[23].disabled=false;
-        x.options[24].disabled=false;
-        x.options[25].disabled=false;
-        x.options[26].disabled=false;
-        x.options[27].disabled=false;
-        x.options[28].disabled=false;
-        x.options[31].disabled=false;
-        x.options[32].disabled=false;
-      }
-      else if (data_string == "NCAR/CAM5") {
-        unset_vars1(ID);
-        x.options[0].selected=true;
-        disable_pres1(ID); 
-        x.options[0].disabled=false;
-        x.options[1].disabled=false;
-        x.options[2].disabled=false;
-        x.options[3].disabled=false;
-        x.options[4].disabled=false;
-        x.options[5].disabled=false;
-        x.options[6].disabled=false;
-        x.options[7].disabled=false;
-        x.options[8].disabled=false;
-        x.options[14].disabled=false;
-        x.options[15].disabled=false;
-        x.options[16].disabled=false;
-        x.options[17].disabled=false;
-        x.options[18].disabled=false;
-        x.options[19].disabled=false;
-        x.options[20].disabled=false;
-        x.options[21].disabled=false;
-        x.options[22].disabled=false;
-        x.options[23].disabled=false;
-        x.options[24].disabled=false;
-        x.options[25].disabled=false;
-        x.options[26].disabled=false;
-        x.options[27].disabled=false;
-        x.options[28].disabled=false;
-        x.options[31].disabled=false;
-        x.options[32].disabled=false;
-      }
-      else if (data_string == "CCCMA/CANESM2" || data_string == "GFDL/ESM2G" ||
-               data_string == "GISS/E2-H" || data_string == "GISS/E2-R" ||
-               data_string == "NCC/NORESM" ||
-               data_string == "UKMO/HadGEM2-ES" ||
-               data_string == "GFDL/CM3" || data_string == "IPSL/CM5A-LR" ||
-               data_string == "MIROC/MIROC5" || data_string == "UKMO/HadGEM2-A"
-              ) {
-        unset_vars1(ID);
-        x.options[0].selected=true;
-        disable_pres1(ID); 
-        x.options[0].disabled=false;
-        x.options[1].disabled=false;
-        x.options[2].disabled=false;
-        x.options[3].disabled=false;
-        x.options[4].disabled=false;
-        x.options[5].disabled=false;
-        x.options[6].disabled=false;
-        x.options[7].disabled=false;
-        x.options[8].disabled=false;
-        x.options[13].disabled=false;
-        x.options[14].disabled=false;
-        x.options[15].disabled=false;
-        x.options[16].disabled=false;
-        x.options[17].disabled=false;
-        x.options[18].disabled=false;
-        x.options[19].disabled=false;
-        x.options[20].disabled=false;
-        x.options[21].disabled=false;
-        x.options[22].disabled=false;
-        x.options[23].disabled=false;
-        x.options[24].disabled=false;
-        x.options[25].disabled=false;
-        x.options[26].disabled=false;
-        x.options[27].disabled=false;
-        x.options[28].disabled=false;
-        x.options[31].disabled=false;
-        x.options[32].disabled=false;
-      }
-      else if (data_string == "ECMWF/interim") {
-        unset_vars1(ID);
-        x.options[3].selected=true;
-        disable_pres1(ID); 
-        x.options[3].disabled=false;
-        x.options[31].disabled=false;
-        x.options[32].disabled=false;
-      }
-      select_var1(ID);
-    }
-    $(document).ready(function(){
-    $("#download_data").click(function(event) {
-      var durl = $("#data_url").val();
-      window.location.assign(durl);
-    });
-      $("#scatterPlot2V").click(function(event) {
-        Response = null;
-        disable_download_button();
-        $("#Response").html("Calculating ...");
-        $("#data_url").html("Calculating ...");
-        $("#Image").html("");
-        var url = "http:
-        var d1 = $("#data1").val();
-        var model1 = d1.replace("/", "_");
-        model1 = model1.toLowerCase();
-        var arglist = "";
-        arglist = arglist.concat("model1=");
-        arglist = arglist.concat(model1);
-        var v1 = $("#var1").val();
-        arglist = arglist.concat("&var1=");
-        arglist = arglist.concat(variable1);
-        var pres1 = $("#pres1").val();
-        arglist = arglist.concat("&pres1=");
-        arglist = arglist.concat(pres1);
-        var d2 = $("#data2").val();
-        var model2 = d2.replace("/", "_");
-        model2 = model2.toLowerCase();
-        arglist = arglist.concat("&model2=");
-        arglist = arglist.concat(model2);
-        var v2 = $("#var2").val();
-        arglist = arglist.concat("&var2=");
-        arglist = arglist.concat(variable2);
-        var pres2 = $("#pres2").val();
-        arglist = arglist.concat("&pres2=");
-        arglist = arglist.concat(pres2);
-        var t0 = $("#t0").val();
-        var t1 = $("#t1").val();
-        t0 = t0.replace("-", "");
-        t1 = t1.replace("-", "");
-        arglist = arglist.concat("&start_time=");
-        arglist = arglist.concat(t0);
-        arglist = arglist.concat("&end_time=");
-        arglist = arglist.concat(t1);
-        var lon0 = $("#lon0").val();
-        var lon1 = $("#lon1").val();
-        var lat0 = $("#lat0").val();
-        var lat1 = $("#lat1").val();
-        arglist = arglist.concat("&lon1=");
-        arglist = arglist.concat(lon0);
-        arglist = arglist.concat("&lon2=");
-        arglist = arglist.concat(lon1);
-        arglist = arglist.concat("&lat1=");
-        arglist = arglist.concat(lat0);
-        arglist = arglist.concat("&lat2=");
-        arglist = arglist.concat(lat1);
-        var purpose = $("#purpose").val();
-        arglist = arglist.concat("&purpose=");
-        arglist = arglist.concat(purpose);
-        url = url + encodeURI(arglist);
-        var urlTimeBounds = "http:
-        var arglistTB = "";
-        arglistTB = arglistTB.concat("serviceType=");
-        arglistTB = arglistTB.concat("2");
-        arglistTB = arglistTB.concat("&source1=");
-        arglistTB = arglistTB.concat(d1);
-        arglistTB = arglistTB.concat("&var1=");
-        arglistTB = arglistTB.concat(variable1);
-        arglistTB = arglistTB.concat("&source2=");
-        arglistTB = arglistTB.concat(d2);
-        arglistTB = arglistTB.concat("&var2=");
-        arglistTB = arglistTB.concat(variable2);
-        urlTimeBounds = urlTimeBounds + encodeURI(arglistTB);
-        $.ajax({
-            type: "GET",
-            url: urlTimeBounds,
-            dataType: "json",
-            data: null,
-            success: function(data, textStatus, xhr) {
-                Response = data;
-                if (data.success == false) {
-                    Response = null;
-                    var text = JSON.stringify(data, null, 4);
-                    text = "Error in backend: <br>" + text; 
-                    $("#Response").html(text);
-                    $("#data_url").html(text);
-                    return;
-                }
-                var text = JSON.stringify(data, null, 4);
-                var tb1 = data.time_bounds1;
-                var bds1 = String(tb1).split(",");
-                var lowerT1 = parseInt(bds1[0]);
-                var upperT1 = parseInt(bds1[1]);
-                var tb2 = data.time_bounds2;
-                var bds2 = String(tb2).split(",");
-                var lowerT2 = parseInt(bds2[0]);
-                var upperT2 = parseInt(bds2[1]);
-                var t0I = parseInt(t0);
-                var t1I = parseInt(t1);
-                var lowerT, upperT;
-                if (lowerT1 == 0  || upperT1 == 0){ 
-                  alert("We do not have data for the data-1 source and variable configuration.");
-                  return;
-                }
-                else if (lowerT2 == 0  || upperT2 == 0){ 
-                  alert("We do not have data for the data-2 source and variable configuration.");
-                  return;
-                }
-                else if (lowerT2 > upperT1 || lowerT1 > upperT2) { 
-                  alert("The two data sets/vars do not have a common time range.");
-                  return;
-                }
-                else { 
-                  if (lowerT1 > lowerT2) { 
-                    lowerT = lowerT1;
-                  }
-                  else {
-                    lowerT = lowerT2;
-                  }
-                  if (upperT1 > upperT2) { 
-                    upperT = upperT2;
-                  }
-                  else {
-                    upperT = upperT1;
-                  }
-                }
-                if (t0I < lowerT && t1I < lowerT ||
-                    t0I > upperT && t1I > upperT) {
-                  alert("We do not have data that span your time range. Try the range inside ["+lowerT+", "+upperT+"].");
-                  return;
-                }
-                if (t0I < lowerT && t1I <= upperT) {
-                  alert("Your start year-month is out of bound. It has to be in or later than " + lowerT +
-                        ". We will use the range ["+lowerT+", "+t1I+"] for you.");
-                }
-                if (t1I > upperT && t0I >= lowerT) {
-                  alert("Your end year-month is out of bound. It has to be in or earlier than " + upperT +
-                        ". We will use the range ["+t0I+", "+upperT+"] for you.");
-                }
-                if (t0I < lowerT && t1I > upperT ) {
-                  alert("Both of your start and end year-months are out of bounds. They have to be in or earlier than " + upperT +
-                        ", and in or later than " + lowerT + ". We will use the range ["+lowerT+", "+upperT+"] for you.");
-                }
-            },
-            error: function(xhr, textStatus, errorThrown) {
-		$("#Response").html("error!");
-		$("#data_url").html("error!");
-            },
-            complete: function(xhr, textStatus) {
-            }
-        });
-        $.ajax({
-            type: "GET",
-            url: url,
-            dataType: "json",
-            data: null,
-            success: function(data, textStatus, xhr) {
-                Response = data;
-                if (data.success == false) {
-                    Response = null;
-                    var text = JSON.stringify(data, null, 4);
-                    text = "Error in backend: <br>" + text; 
-                    $("#Response").html(text);
-                    $("#data_url").html(text);
-                    return;
-                }
-                var text = JSON.stringify(data, null, 4);
-                $("#Response").html(text);
-                var html = "<img src='"+data.url+"' width='820'/>";
-                $("#Image").html(html);
-                $("#data_url").html(data.dataUrl);
-                enable_download_button();
-            },
-            error: function(xhr, textStatus, errorThrown) {
-                $("#Response").html("error!");
-                $("#data_url").html("error!");
-            },
-            complete: function(xhr, textStatus) {
-            }
-        });
-      });
-    });
-  </script>
-} @main("Parameters of ConfId", scripts){ @flash_message()
-<p>
-<div id="source1" style="display: none;">@parameters.getSource1()</div>
-<div id="variableName1" style="display: none;">@parameters.getVaribaleName1()</div>
-<div id="pressureLevel1" style="display: none;">@parameters.getPressureLevel1()</div>
-<div id="startYearMonth" style="display: none;">@parameters.getStartYear()</div>
-<div id="startLat" style="display: none;">@parameters.getStartLat()</div>
-<div id="startLon" style="display: none;">@parameters.getStartLon()</div>
-<div id="source2" style="display: none;">@parameters.getSource2()</div>
-<div id="variableName2" style="display: none;">@parameters.getVaribaleName2()</div>
-<div id="pressureLevel2" style="display: none;">@parameters.getPressureLevel2()</div>
-<div id="endYearMonth" style="display: none;">@parameters.getEndYear()</div>
-<div id="endLat" style="display: none;">@parameters.getEndLat()</div>
-<div id="endLon" style="display: none;">@parameters.getEndLon()</div>
-<div id="executionPurpose" style="display: none;">@parameters.getExecutionPurpose()</div>
-<div id="image" style="display: none;">@parameters.getImage()</div>
-<div id="dataURL" style="display: none;">@parameters.getDataUrl()</div>
-<div id="serviceResponseText" style="display: none;">@parameters.getServiceResponse()</div>
-<table border="1">
-	<tr>
-		<td colspan="4">
-			<center>
-				<b>Service: Difference Plot of Two Time Averaged Variables</b><br>
-				<br> This service calculates the differences between two
-				specified variables and displays the lat-lon maps of the two
-				variables and their differences. <br>
-				<br>
-			</center>
-		</td>
-	</tr>
-	<tr>
-		<td colspan="2">
-			<center>data 1</center>
-		</td>
-		<td colspan="2">
-			<center>data 2</center>
-		</td>
-	</tr>
-	<tr>
-		<td>source:</td>
-		<td><select name="data1" , id="data1" onchange="select_data1(1)">
-				<optgroup label="Model: Historical">
-					<option>CCCMA/CANESM2</option>
-					<option>GFDL/ESM2G</option>
-					<option>GISS/E2-H</option>
-					<option>GISS/E2-R</option>
-					<option>NCAR/CAM5</option>
-					<option>NCC/NORESM</option>
-					<option>UKMO/HadGEM2-ES</option>
-				</optgroup>
-				<optgroup label="Model: AMIP">
-					<option>CCCMA/CANAM4</option>
-					<option>CSIRO/MK3.6</option>
-					<option>GFDL/CM3</option>
-					<option>IPSL/CM5A-LR</option>
-					<option>MIROC/MIROC5</option>
-					<option>UKMO/HadGEM2-A</option>
-				</optgroup>
-				<optgroup label="Observation">
-					<option>NASA/MODIS</option>
-					<option>NASA/AMSRE</option>
-					<option>NASA/TRMM</option>
-					<option>NASA/GPCP</option>
-					<option>NASA/QuikSCAT</option>
-					<option>NASA/AVISO</option>
-					<option>NASA/GRACE</option>
-					<option>NOAA/NODC</option>
-					<option>NASA/CERES</option>
-					<option>NASA/AIRS</option>
-					<option>NASA/MLS</option>
-					<option>ARGO/ARGO</option>
-				</optgroup>
-				<optgroup label="Reanalysis">
-					<option>ECMWF/interim</option>
-				</optgroup>
-		</select></td>
-		<td>source:</td>
-		<td><select name="data2" , id="data2" onchange="select_data1(2)">
-				<optgroup label="Model: Historical">
-					<option>CCCMA/CANESM2</option>
-					<option>GFDL/ESM2G</option>
-					<option>GISS/E2-H</option>
-					<option>GISS/E2-R</option>
-					<option>NCAR/CAM5</option>
-					<option>NCC/NORESM</option>
-					<option>UKMO/HadGEM2-ES</option>
-				</optgroup>
-				<optgroup label="Model: AMIP">
-					<option>CCCMA/CANAM4</option>
-					<option>CSIRO/MK3.6</option>
-					<option>GFDL/CM3</option>
-					<option>IPSL/CM5A-LR</option>
-					<option>MIROC/MIROC5</option>
-					<option>UKMO/HadGEM2-A</option>
-				</optgroup>
-				<optgroup label="Observation">
-					<option>NASA/MODIS</option>
-					<option>NASA/AMSRE</option>
-					<option>NASA/TRMM</option>
-					<option>NASA/GPCP</option>
-					<option>NASA/QuikSCAT</option>
-					<option>NASA/AVISO</option>
-					<option>NASA/GRACE</option>
-					<option>NOAA/NODC</option>
-					<option>NASA/CERES</option>
-					<option>NASA/AIRS</option>
-					<option>NASA/MLS</option>
-					<option>ARGO/ARGO</option>
-				</optgroup>
-				<optgroup label="Reanalysis">
-					<option>ECMWF/interim</option>
-				</optgroup>
-		</select></td>
-	</tr>
-	<tr>
-		<td>variable name:</td>
-		<td><select name="var1" , id="var1" onchange="select_var1(1)">
-				<option>Precipitation Flux</option>
-				<option>Total Cloud Fraction</option>
-				<option>Surface Temperature</option>
-				<option>Sea Surface Temperature</option>
-				<option>Eastward Near-Surface Wind</option>
-				<option>Northward Near-Surface Wind</option>
-				<option>Near-Surface Wind Speed</option>
-				<option>Sea Surface Height</option>
-				<option>Leaf Area Index</option>
-				<option>Equivalent Water Height Over Land</option>
-				<option>Equivalent Water Height Over Ocean</option>
-				<option>Ocean Heat Content Anomaly within 700 m Depth</option>
-				<option>Ocean Heat Content Anomaly within 2000 m Depth</option>
-				<option>Surface Downwelling Longwave Radiation</option>
-				<option>Surface Downwelling Shortwave Radiation</option>
-				<option>Surface Upwelling Longwave Radiation</option>
-				<option>Surface Upwelling Shortwave Radiation</option>
-				<option>Surface Downwelling Clear-Sky Longwave Radiation</option>
-				<option>Surface Downwelling Clear-Sky Shortwave Radiation</option>
-				<option>Surface Upwelling Clear-Sky Shortwave Radiation</option>
-				<option>TOA Incident Shortwave Radiation</option>
-				<option>TOA Outgoing Longwave Radiation</option>
-				<option>TOA Outgoing Shortwave Radiation</option>
-				<option>TOA Outgoing Clear-Sky Longwave Radiation</option>
-				<option>TOA Outgoing Clear-Sky Shortwave Radiation</option>
-				<option>Air Temperature</option>
-				<option>Specific Humidity</option>
-				<option>Cloud Ice Water Content</option>
-				<option>Cloud Liquid Water Content</option>
-				<option>Ocean Temperature</option>
-				<option>Ocean Salinity</option>
-				<option>Vertical Wind Velocity</option>
-				<option>Relative Humidity</option>
-		</select></td>
-		<td>variable name:</td>
-		<td><select name="var2" , id="var2" onchange="select_var1(2)">
-				<option>Precipitation Flux</option>
-				<option>Total Cloud Fraction</option>
-				<option>Surface Temperature</option>
-				<option>Sea Surface Temperature</option>
-				<option>Eastward Near-Surface Wind</option>
-				<option>Northward Near-Surface Wind</option>
-				<option>Near-Surface Wind Speed</option>
-				<option>Sea Surface Height</option>
-				<option>Leaf Area Index</option>
-				<option>Equivalent Water Height Over Land</option>
-				<option>Equivalent Water Height Over Ocean</option>
-				<option>Ocean Heat Content Anomaly within 700 m Depth</option>
-				<option>Ocean Heat Content Anomaly within 2000 m Depth</option>
-				<option>Surface Downwelling Longwave Radiation</option>
-				<option>Surface Downwelling Shortwave Radiation</option>
-				<option>Surface Upwelling Longwave Radiation</option>
-				<option>Surface Upwelling Shortwave Radiation</option>
-				<option>Surface Downwelling Clear-Sky Longwave Radiation</option>
-				<option>Surface Downwelling Clear-Sky Shortwave Radiation</option>
-				<option>Surface Upwelling Clear-Sky Shortwave Radiation</option>
-				<option>TOA Incident Shortwave Radiation</option>
-				<option>TOA Outgoing Longwave Radiation</option>
-				<option>TOA Outgoing Shortwave Radiation</option>
-				<option>TOA Outgoing Clear-Sky Longwave Radiation</option>
-				<option>TOA Outgoing Clear-Sky Shortwave Radiation</option>
-				<option>Air Temperature</option>
-				<option>Specific Humidity</option>
-				<option>Cloud Ice Water Content</option>
-				<option>Cloud Liquid Water Content</option>
-				<option>Ocean Temperature</option>
-				<option>Ocean Salinity</option>
-				<option>Vertical Wind Velocity</option>
-				<option>Relative Humidity</option>
-		</select></td>
-	</tr>
-	<tr>
-		<td>atmosphere pressure level (hPa) <br> or ocean pressure
-			level (dbar)
-		</td>
-		<td><input id="pres1" value="500" alt="pressure" /></td>
-		<td>atmosphere pressure level (hPa) <br> or ocean pressure
-			level (dbar)
-		</td>
-		<td><input id="pres2" value="500" alt="pressure" /></td>
-	</tr>
-	<tr>
-	</tr>
-	<tr>
-		<td>start year-month:</td>
-		<td><input id="t0" value=@parameters.getStartYear() alt="start" /></td>
-		<td>end year-month:</td>
-		<td><input id="t1" value=@parameters.getEndYear() alt="end" /></td>
-	</tr>
-	<tr>
-		<td>start lat (deg):</td>
-		<td><input id="lat0" value=@parameters.getStartLat()></td>
-		<td>end lat (deg):</td>
-		<td><input id="lat1" value=@parameters.getEndLat()></td>
-	</tr>
-	<tr>
-		<td>start lon (deg):</td>
-		<td><input id="lon0" value=@parameters.getStartLon()></td>
-		<td>end lon (deg):</td>
-		<td><input id="lon1" value=@parameters.getEndLon()></td>
-	</tr>
-	<tr>
-		<td colspan="1">Execution purpose</td>
-		<td colspan="3">
-			<form>
-				<textarea name="purpose" id="purpose" rows="4" cols="50"> </textarea>
-			</form>
-		</td>
-	</tr>
-	<tr>
-		<td colspan="2" align="center"><input id="scatterPlot2V"
-			type="submit" value="            Run  Again            "
-			style="height: 28px" /></td>
-		<form>
-			<td colspan="2" align="center"><input id="download_data"
-				type="button" value="Download Data" style="height: 28px" /></td>
-		</form>
-	</tr>
-	<tr>
-		<td colspan="4">
-			<div id="Image">Image Here</div>
-		</td>
-	</tr>
-	<tr>
-		<td colspan="4" align="center"><textarea readonly id="data_url"
-				cols="89" rows="2">Data URL Here</textarea></td>
-	</tr>
-	<tr>
-		<td colspan="4" align="center"><textarea id="Response" cols="89"
-				rows="6">Service Response Text Here</textarea></td>
-	</tr>
-</table>
-}