LATMOS.php 1.9 KB
<?php
/**
 * @class LATMOS 
 * @brief  
 * @details
 */
class LATMOS extends SimulationDataCenterClass
{
	protected $url = "http://impex.latmos.ipsl.fr";
	protected $treeXML = "tree.xml";
	protected $WSDL = "Methods_LATMOS.wsdl";
	
	protected $needsArgs = true;
	
	public $soapMethod = "getDataPointValue";
	public $soapMethodSpectra = "getDataPointSpectra";
	
	public $energyTableName = "EnergyRange", $tableTitle="Energy";
	
	//<xs:element minOccurs="0" maxOccurs="1" ref="EnergyChannel"/>
	//Extraparam:  OutputFormat => netCDF, VOTable	
	
	public $outputFormat = "VOTable";
	
	protected function setSimulationRunNodeDescription($runNode,$sr)
	{
	   $coords = $this->getCoordinateSystem($sr->SimulationDomain->CoordinateSystem);
	   $domain = $this->getRegionBoundaries($sr->SimulationDomain,$sr->RegionParameter);
	   $properties = $this->getProperties($sr);
	   
		$runNode->setAttribute('desc', $coords.$domain.$properties);
	}
	
	protected function getProperties($sr)
	{
		$descUpstream = "<b><br/>Upstream Conditions: </b><br/>";
		$descInternal = "<b><br/>Internal Conditions: </b><br/>";
		
		$inputPopulations = $sr->InputPopulation;
		$inputFields = $sr->InputField;
		
		foreach ($inputPopulations as $population)		
		{
			if ($population->SimulatedRegion == "Heliosphere") {
				$descUpstream .= "<u>".$population->Name."</u><br/>";
			}
		}
		
		foreach ($inputFields as $field)		
		{
			if ($field->SimulatedRegion == "Heliosphere") {
				$descUpstream .= "<u>".$field->Name."</u> : ";
				$descUpstream .= $field->Units." <i>[".$field->FieldValue."]</i> ".$field->Units."<br/>";				 
			}
		}
		
		return $descUpstream;
	}
	
	protected function createSpecialArgs($dom)
	{	
		$node = $dom->createElement('argument');
		$node->setAttribute('key', 'IMFClockAngle');
		$node->setAttribute('name', 'IMF Clock Angle');
		$node->setAttribute('type', 'float');
		$node->setAttribute('default', '0');
		
		return array($node);
	}		 	
	
}
?>