<?xml version="1.0"?>
<!--
(C) Copyright 1996-2016 ECMWF.

This software is licensed under the terms of the Apache Licence Version 2.0
which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
In applying this licence, ECMWF does not waive the privileges and immunities 
granted to it by virtue of its status as an intergovernmental organisation nor
does it submit to any jurisdiction.
-->

<magics version="3.0" format="a4" orientation="portrait">
	<definition>
		<epsgram id="eps" 
			type='eps15'
			station_name='$station' 
			latitude="$latitude" longitude="$longitude" 
			date='$date' time="$time" station_height="$height"
			eps_temperature_correction='yes'
			eps_database='$database_eps/epsdb'> 
			<none/>
	</epsgram>
	
	  <epsgram id="clim"
               type='eps15'
               station='$station'
               latitude="$latitude" longitude="$longitude"
               date='' time="" station_height="48"
               eps_temperature_correction='yes'
               eps_database='$database_clim/epsdb'>
               <none/>
     </epsgram>

	<text id="title" justification="left" font_style='bold' left='0%' font_size='0.4' 
	      colour='Rgb(0.5, 0.5, 0.5)' font='sansserif' />

		<map id="box" border='on' 
		     border-colour='grey' border-thickness='2'/>

		<horizontal_axis id="haxis" axis_line="false" line_thickness="4" colour='Rgb(0.2, 0.2, 0.2)'>
			<automatic/>
			<nolabel/>
			<date/>
			<noline/>
			<nominortick colour='Rgb(0.2, 0.2, 0.2)'/>			
			<grid line_style="solid" colour='Rgb(0.2, 0.2, 0.2)'/>
			<tick colour='Rgb(0.2, 0.2, 0.2)'/>
		</horizontal_axis>

		<vertical_axis id="vaxis" axis_line="false" line_thickness="4" colour='Rgb(0.2, 0.2, 0.2)'>
			<automatic/>
			<noline/>
			<label colour='Rgb(0.2, 0.2, 0.2)' quality='sansserif'/>
 			<grid line_style="dash" colour='Rgb(0.2, 0.2, 0.2)'/>
			<tick colour='grey'/>      
		</vertical_axis>

	</definition>
		<drivers>
		    <$ps/>
		    <$pdf/>
		    <$png/>
		    <$gif/>
		    <$svg/>
		</drivers>

	<page  height="9%" border='off'>
		<nopageid/>       
	</page>

	<page  height="15%" border='on'>
		<nopageid/>
			<text use_id='title' height='10%' />
			<map use_id='box' height='80%'>
				<cartesian>
					<x_date  automatic='on' />
					<y_regular automatic='on' />
				</cartesian>  
				<plot>
				    <epsgram use_id="clim" parameter="clim-eps-cloud-cover" long_title='false'/>
					<epsshade eps_shade_colour='Rgb(0.925, 0.609, 0.953)' eps_shade_line_thickness='4' />
                </plot>

				<plot>
					<epsgram use_id="eps" parameter="cloud-cover" long_title='true'/>                    
					<epsgraph box_colour='Rgb(0.925, 0.609, 0.953)' box_border_colour='Rgb(0.2, 0.2, 0.2)'> <both/> </epsgraph>
				</plot>
				<horizontal_axis use_id="haxis"/>
				<vertical_axis use_id="vaxis"/>
			</map>
	</page>
	<page height="15%" border='off'>
		<nopageid/>
        <text height='10%' use_id='title'/>
		<map  height='80%' use_id='box' >
           <cartesian>
			<x_date  automatic='on' />
            <y_regular automatic='on' y_min='0' y_max='20' />
           </cartesian>  
          
		  <plot>
		      <epsgram use_id="clim" parameter="clim-eps-precip" />
		      <epsshade eps_shade_colour='Rgb(0.49, 0.89, 0.51)' eps_shade_line_thickness='4' />
          </plot>

			
                <plot>
					<epsgram use_id="eps" parameter="precip"/>
					<epsgraph max='20' box_colour='Rgb(0.49, 0.89, 0.51)' box_border_colour='Rgb(0.2, 0.2, 0.2)'> <both/> </epsgraph>

				</plot>
           <horizontal_axis use_id="haxis"/>
				<vertical_axis use_id="vaxis"/>
			
		</map> 
	</page>
	<page height="6%" border='off'>
		<nopageid/>
        <text  margin_left='9%' height='30%' width='60%' use_id='title'/>
		<map height='70%' border='on' 
		     border-colour='grey' border-thickness='2'>
			<cartesian>
				<x_date automatic='on'/>
				<y_regular  y_min="-43200" y_max="43200" />
			</cartesian> 
			
			<horizontal_axis use_id="haxis"/>
			<vertical_axis use_id="vaxis"><nolabel/><notick/><nogrid/></vertical_axis> 
			<plot>
				<epsgram use_id="clim" parameter="249.140" 
				parameter_title='M-Climate of the distribution of 10m Wind Direction'/> 
				<epswind rose_wind_colour='gold' rose_wind_border_colour='Rgb(0.5000, 0.5000, 0.5000)'/>
			</plot>
        </map>  
        <legend display='absolute' bottom='65%' left='60%' width='30%' height='40%' 
	        text_colour='Rgb(0.2, 0.2, 0.2)' border='off' blanking='off'/>
        </page>
	<page height="2%" border='off'>
		<nopageid/>
    </page>
	<page height="6%" border='off'>
		<nopageid/> 
        <text margin_left='9%'  height='30%' width='60%' use_id='title'/>
		<map height='70%' border='on' 
		     border-colour='grey' border-thickness='2'>
			<cartesian>
				<x_date automatic='on'/>
				<y_regular  y_min="-43200" y_max="43200" />
			</cartesian> 
			
			<horizontal_axis use_id="haxis"/>
			<vertical_axis use_id="vaxis"><nolabel/><notick/><nogrid/></vertical_axis> 
			<plot>
				<epsgram use_id="eps" parameter="10m-wind-dd"/>
				<epswind rose_wind_colour='gold' rose_wind_border_colour='Rgb(0.5000, 0.5000, 0.5000)'/>
			</plot>
        </map>  
        <legend display='absolute' bottom='65%' left='60%' width='30%' height='50%' 
	        text_colour='Rgb(0.2, 0.2, 0.2)' border='off' blanking='off'/>
        </page>
	<page height="15%" border='off'>
		<nopageid/>
        <text height='20%' use_id='title'/>
		<map use_id='box' height='80%' margin_top='5%'>
			
			<cartesian>
				<x_date  automatic='on' />
				<y_regular automatic='on' y_min='0' y_max='20' />
			</cartesian>  
			 <plot>
			     <epsgram use_id="clim" parameter="clim-10m-wind" />
				 <epsshade eps_shade_colour='gold' eps_shade_line_thickness='4' />
	        </plot>

			<plot>
				<epsgram use_id="eps" parameter="10m-wind"/>
				<epsgraph box_colour='gold' box_border_colour='Rgb(0.2, 0.2, 0.2)'> <both/> </epsgraph>
			</plot>
			<horizontal_axis use_id="haxis"/>
			<vertical_axis use_id="vaxis"/>
		</map>
	</page>
	<page height="30%" border='off'>
		<pageid line_system_plot='off' line_date_plot='off' line_errors_plot='off' 
		        font='sansserif' line_colour='Rgb(0.8, 0.8, 0.8)'/>
                <text height='8%' use_id='title' />	
		<map height='40%' border='on' border-colour='Rgb(0.2, 0.2, 0.2)' margin_top='5%' >
			<cartesian>
				<x_date automatic='on'/>
				<y_regular automatic='on'/>
			</cartesian>
			
				
			  <plot>
			      <epsgram use_id="clim" parameter="clim-temperature" parameter_title=''/>
			     <epsshade eps_shade_colour='sky' eps_shade_line_thickness='3' />
		     </plot>
		     <!--plot>
		         <epsgram use_id="clim" parameter="clim-eps-2mt-max" />
		         <epsshade eps_shade_colour='RGB(1.0, 0.222, 0.222)'
		                   eps_shade_line_thickness='4' />
	        </plot-->

			<plot>
				<epsgram use_id="eps" parameter="temperature"/>
				<epsgraph border_colour='Rgb(0.2, 0.2, 0.2)' 
				left_box_colour='sky' box_median_colour='black' right_box_colour='RGB(1.0, 0.222, 0.222)'
				font='sansserif' font_colour='Rgb(0.2, 0.2, 0.2)' box_colour='grey'
				box_border_colour='Rgb(0.2, 0.2, 0.2)'> <both/> </epsgraph>
			</plot>
            <horizontal_axis use_id="haxis">
				<date>
				<both label_colour='Rgb(0.2, 0.2, 0.2)' label_height='0.3' />
				<month label_height='0.4' label_colour='Rgb(0.2, 0.2, 0.2)'> <monthandyear /> </month>
				<noyear height='0.4'/>
				</date>
				<label quality='sansserif'/>
			</horizontal_axis>			
			<vertical_axis  use_id="vaxis"/> 
		</map>
        <text display='absolute' bottom='8%' left='45%' width='40%' height='20%' font_size='0.4' 
		        text_colour='Rgb(0.2, 0.2, 0.2)' justification='left' border='off' blanking='off'> 
            <br/><b>M-Climate</b>: this stands for "Model Climate". It is a 
            <br/>function of lead time, date (+/-15days), and model
            <br/>version. It is derived by rerunning a 5 member
            <br/>ensemble over the last 20 years. once per week (500 
            <br/>realisations). M-Climate is always from the same
            <br/>model version as the displayed EPS data.
        </text>
		<legend display='absolute' bottom='20%' left='14%' width='25%' height='25%' 
		        plot_direction='column' text_colour='Rgb(0.2, 0.2, 0.2)' border='off' blanking='off'/>
	</page>
</magics>
