Commit 8bdb8842 authored by jouke's avatar jouke
Browse files

IMproved warning message

parent 7666f818
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -46,7 +46,16 @@ Radiation::Radiation(SimulaDynamic* const pSV) :
	netSolarRadiation_ 		= pSD->existingPath("/environment/atmosphere/shortwaveRadiation");
	if(!netSolarRadiation_) {
		netSolarRadiation_ 		= pSD->existingPath("/environment/atmosphere/netSolarRadiation");
		if(netSolarRadiation_){
			msg::warning("Radiation: using deprecated /environment/atmosphere/netSolarRadiation consider renaming to /environment/atmosphere/shortwaveRadiation");
		}else{
			actualDurationofSunshine_ = pSD->existingPath("/environment/atmosphere/actualDurationofSunshine");// , "hours"
			if(actualDurationofSunshine_) {
				msg::warning("Radiation: /environment/atmosphere/shortwaveRadiation not found, using actualDurationofSunshine");
			}else{
				msg::error("Radiation: /environment/atmosphere/shortwaveRadiation nor actualDurationofSunshine found. One is needed");
			}
		}
	}
	if(netSolarRadiation_){
		Unit u=netSolarRadiation_->getUnit();