LATMOS.php
1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?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);
}
}
?>