diff --git a/ipmd/templates/ipmd/saddlegallmidgeform.html b/ipmd/templates/ipmd/saddlegallmidgeform.html
index 077d49f25658637338c611ba17fe4c61c0fbe01d..ad0cf4208602a7ec0832dab18b465b6504804f67 100644
--- a/ipmd/templates/ipmd/saddlegallmidgeform.html
+++ b/ipmd/templates/ipmd/saddlegallmidgeform.html
@@ -524,6 +524,11 @@
             }
             if(weatherData != null)
             {
+                // HAPDMA only accepts average temp (code 1002), so we need to change the temp code if it's 1001
+                if(!weatherData.weatherParameters.includes(1002) && weatherData.weatherParameters.includes(1001))
+                {
+                    weatherData.weatherParameters[weatherData.weatherParameters.indexOf(1001)] = 1002;                
+                }
                 inputData["weatherData"] = weatherData;
             }
             else