Skip to content
Snippets Groups Projects
Commit 041f7863 authored by tuckersiegel's avatar tuckersiegel
Browse files

remove t_base parameter

parent 5c74c0f2
No related branches found
No related tags found
No related merge requests found
......@@ -79,19 +79,11 @@ exports.accumulated_gdd = function (req, res) {
});
}
if (req.body.hasOwnProperty("t_base")) {
t_base = parseFloat(req.body.t_base);
if (t_base < t_min) {
t_min = t_base;
}
} else {
out = utils.product_base_switch(product, errors, t_base, t_min);
t_base = out.t_base;
t_min = out.t_min;
errors = out.errors;
}
out = utils.product_base_switch(product, errors, t_base, t_min);
t_base = out.t_base;
t_min = out.t_min;
errors = out.errors;
if (longitude < -125 || longitude > -66.5) {
errors.push({
parameter_error: "longitude",
......@@ -157,17 +149,12 @@ exports.accumulated_normal_gdd = function (req, res) {
});
}
if (req.body.hasOwnProperty("t_base")) {
t_base = parseFloat(req.body.t_base);
if (t_base < t_min) {
t_min = t_base;
}
} else {
out = utils.product_base_switch(product, errors, t_base, t_min);
t_base = out.t_base;
t_min = out.t_min;
errors = out.errors;
}
out = utils.product_base_switch(product, errors, t_base, t_min);
t_base = out.t_base;
t_min = out.t_min;
errors = out.errors;
if (longitude < -125 || longitude > -66.5) {
......
......@@ -77,18 +77,12 @@ exports.year_gdd = function (req, res) {
});
}
if (req.body.hasOwnProperty("t_base")) {
t_base = parseFloat(req.body.t_base);
if (t_base < t_min) {
t_min = t_base;
}
} else {
out = utils.product_base_switch(product, errors, t_base, t_min);
t_base = out.t_base;
t_min = out.t_min;
errors = out.errors;
}
out = utils.product_base_switch(product, errors, t_base, t_min);
t_base = out.t_base;
t_min = out.t_min;
errors = out.errors;
if (longitude < -125 || longitude > -66.5) {
errors.push({
......
......@@ -67,17 +67,10 @@ exports.normal = function (req, res) {
});
}
if (req.body.hasOwnProperty("t_base")) {
t_base = parseFloat(req.body.t_base);
if (t_base < t_min) {
t_min = t_base;
}
} else {
out = utils.product_base_switch(product, errors, t_base, t_min);
t_base = out.t_base;
t_min = out.t_min;
errors = out.errors;
}
out = utils.product_base_switch(product, errors, t_base, t_min);
t_base = out.t_base;
t_min = out.t_min;
errors = out.errors;
if (longitude < -125 || longitude > -66.5) {
errors.push({
......
......@@ -7,6 +7,8 @@ from multiprocessing.pool import ThreadPool
from multiprocessing import Lock
from pymongo import MongoClient
## FOR CURRENT YEAR DATA
def to_freedom_units(data):
return (data * 9/5) + 32
......
......@@ -43,10 +43,6 @@ paths:
minimum: -125.0
maximum: -66.5
example: -76.94
t_base:
description: Base temperature to calculate gdd on, in fahrenheit. NOT REQUIRED
type: number
example: 50
responses:
200:
......@@ -129,10 +125,6 @@ paths:
minimum: -125.0
maximum: -66.5
example: -76.94
t_base:
description: Base temperature to calculate gdd on, in fahrenheit. NOT REQUIRED
type: number
example: 50
responses:
200:
......@@ -210,10 +202,6 @@ paths:
minimum: -125.0
maximum: -66.5
example: -76.94
t_base:
description: Base temperature to calculate gdd on, in fahrenheit. NOT REQUIRED
type: number
example: 50
responses:
200:
......@@ -302,10 +290,6 @@ paths:
minimum: -125.0
maximum: -66.5
example: -76.94
t_base:
description: Base temperature to calculate gdd on, in fahrenheit. NOT REQUIRED
type: number
example: 50
responses:
200:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment