comparison artifacts/doc/conf/meta-data.xml @ 8461:2b4191f78ea6

Load discharge curves via recommendations in historical discharge calculation. ToDo: Remove the other logic to load them.
author Tom Gottfried <tom@intevation.de>
date Thu, 30 Oct 2014 14:20:28 +0100
parents 1326fc65638c
children 1ba3032cdfe2
comparison
equal deleted inserted replaced
8460:081a57c80540 8461:2b4191f78ea6
74 <dc:when test="$out = 'flow_velocity'"> 74 <dc:when test="$out = 'flow_velocity'">
75 <dc:call-macro name="annotations"/> 75 <dc:call-macro name="annotations"/>
76 </dc:when> 76 </dc:when>
77 <dc:comment> Discharge curves </dc:comment> 77 <dc:comment> Discharge curves </dc:comment>
78 <dc:when test="$out = 'historical_discharge_wq'"> 78 <dc:when test="$out = 'historical_discharge_wq'">
79 <dc:call-macro name="hist_discharge_rec"/>
79 <dc:call-macro name="mainvalues"/> 80 <dc:call-macro name="mainvalues"/>
80 </dc:when> 81 </dc:when>
81 <dc:when test="$out = 'discharge_curve'"> 82 <dc:when test="$out = 'discharge_curve'">
82 <dc:call-macro name="mainvalues"/> 83 <dc:call-macro name="mainvalues"/>
83 <dc:call-macro name="basedata_3_officials_wq"/> 84 <dc:call-macro name="basedata_3_officials_wq"/>
1016 <dc:macro name="mainvalues"> 1017 <dc:macro name="mainvalues">
1017 <wmainvalue factory="mainvalue" ids="{$river_id}:w" target_out="{$out}"/> 1018 <wmainvalue factory="mainvalue" ids="{$river_id}:w" target_out="{$out}"/>
1018 <dc:call-macro name="qmainvalues"/> 1019 <dc:call-macro name="qmainvalues"/>
1019 </dc:macro> 1020 </dc:macro>
1020 1021
1022 <!-- discharge curves -->
1023 <dc:macro name="hist_discharge_factory">
1024 <dc:for-each>
1025 <dc:variable name="validity"
1026 expr="concat(
1027 dc:date-format('dd.MM.yyyy', $start_time),
1028 ' - ',
1029 dc:date-format('dd.MM.yyyy', $stop_time))"/>
1030 <histdis name="{concat($bfg_id, ' ', $validity)}"
1031 description="{concat($bfg_id, ' ', $validity)}"
1032 factory="gaugedischarge" target_out="{$out}"
1033 ids="{$gauge_name};{$dt_id};{concat($bfg_id, ' ',
1034 $gauge_name, ' ', $validity)}"/>
1035 </dc:for-each>
1036 </dc:macro>
1037
1038 <dc:macro name="hist_discharge_rec">
1039 <dc:variable name="start" type="number"
1040 expr="dc:date-format('yyyyMMdd',
1041 number(substring-before($year_range, ';')))"/>
1042 <dc:variable name="stop" type="number"
1043 expr="dc:date-format('yyyyMMdd',
1044 number(substring-after($year_range, ';')))"/>
1045 <dc:variable name="refgauge" type="number"
1046 expr="dc:get('reference_gauge')"/>
1047 <dc:context>
1048 <dc:call-macro name="discharge_curves"/>
1049 <dc:filter expr="$kind = 1 and
1050 number(dc:date-format('yyyyMMdd', $start_time))
1051 &lt; $stop and
1052 number(dc:date-format('yyyyMMdd', $stop_time))
1053 &gt; $start">
1054 <dc:call-macro name="hist_discharge_factory"/>
1055 </dc:filter>
1056 </dc:context>
1057 </dc:macro>
1058
1021 <dc:macro name="discharge_table_gauge"> 1059 <dc:macro name="discharge_table_gauge">
1022 <dc:variable name="refgauge" type="number" 1060 <dc:variable name="refgauge" type="number"
1023 expr="dc:get('reference_gauge')"/> 1061 expr="dc:get('reference_gauge')"/>
1024 <dc:context> 1062 <dc:context>
1025 <dc:call-macro name="discharge_curves"/> 1063 <dc:call-macro name="discharge_curves"/>
1043 <dc:call-macro name="discharge_curves"/> 1081 <dc:call-macro name="discharge_curves"/>
1044 <dc:filter expr="$kind = 1"> 1082 <dc:filter expr="$kind = 1">
1045 <historical_discharge_curves> 1083 <historical_discharge_curves>
1046 <dc:group expr="$gauge_name"> 1084 <dc:group expr="$gauge_name">
1047 <gauge name="{dc:group-key()}"> 1085 <gauge name="{dc:group-key()}">
1048 <dc:for-each> 1086 <dc:call-macro name="hist_discharge_factory"/>
1049 <dc:variable name="validity"
1050 expr="concat(
1051 dc:date-format('dd.MM.yyyy', $start_time),
1052 ' - ',
1053 dc:date-format('dd.MM.yyyy', $stop_time))"/>
1054 <histdis name="{concat($bfg_id, ' ', $validity)}"
1055 description="{concat($bfg_id, ' ', $validity)}"
1056 factory="gaugedischarge" target_out="{$out}"
1057 ids="{$gauge_name};{$dt_id};{concat($bfg_id, ' ',
1058 $gauge_name, ' ', $validity)}"/>
1059 </dc:for-each>
1060 </gauge> 1087 </gauge>
1061 </dc:group> 1088 </dc:group>
1062 </historical_discharge_curves> 1089 </historical_discharge_curves>
1063 </dc:filter> 1090 </dc:filter>
1064 </dc:context> 1091 </dc:context>

http://dive4elements.wald.intevation.org