Base-Canada wxecradar changing 30-Apr-2024 due to EC GIF image changes

For 30-Apr-2024, the EC has announced discontinuation of some radar images
in GIF format based on PRECIP-ET products will be removed from the MSC Datamart. This includes both:

Individual radar images: https://dd.weather.gc.ca/radar/PRECIPET/GIF/CAS*/YYYYMMDDHHmm_CAS*_PRECIPET__*.gif
Regional and national composites: https://dd.weather.gc.ca/radar/PRECIPET/GIF/[ATL,ONT,PNR,PYR,QUE,NATIONAL]/*.gif
Contingency products: https://dd.weather.gc.ca/radar/PRECIPET/GIF/CAS*/YYYYMMDDHHmm_CAS*_COMP_PRECIPET_*.gif
24h accumulations: https://dd.weather.gc.ca/radar/24_HR_ACCUM/GIF/CAS*/YYYYMMDDHHmm_CAS*_24_HR_ACCUM_MM.gif

This requires changes to multiple scripts to support the new DPQPE images instead, and cease displaying the
regional/national composite images as they are no longer being generated in the DPQPE set of GIFs.

Scripts changed:
wxindex.php (see below for mod to your index.php needed)
wxradar.php
wxecradar-inc.php
wxecradar-iframe.php
wxecradar-list-inc.php

The regional and national sites composite images have been removed from the list. In the Saratoga Base-Canada template,
your $SITE[‘ecradar’] entry will be used as the default site for wxindex.php and wxradar.php displays.

in your index.php find:

    <div align="center">
      <?php 
      // fetch national radar image if needed
      // 'PYR' = Pacific region
      // 'PNR' = Praries region
      // 'ONT' = Ontario
      // 'QUE' = Quebec
      // 'ATL' = Atlantic region
      // or use the local radar site code like WKR or CASET .. see wxecradar-list-inc.php for codes

        $radarLoc = 'ONT';
        
      //  $radarLoc = $SITE['ecradar']; // use Settings.php entry  
        $radar='RAIN'; // ='RAIN' or ='SNOW';
      ?>
<iframe name="wxradarshanis" width="617" height="<?php echo (in_array($radarLoc,array('PYR','PNR','ONT','QUE','ATL')))?'380':'555';?>" src="./wxecradar-iframe.php?radar=<?php echo $radar?>&amp;radarLoc=<?php echo $radarLoc?>&amp;lang=<?php echo $SITE['lang']; ?>" scrolling="no" style="border:none"></iframe>
    </div><!-- end align center -->

and replace with New:

    <div align="center">
      <?php 
        $radarLoc = $SITE['ecradar']; // use Settings.php entry  
        $radar='RAIN'; // ='RAIN' or ='SNOW';
      ?>
<iframe name="wxradarshanis" width="617" height="555" src="./wxecradar-iframe.php?radar=<?php echo $radar?>&amp;radarLoc=<?php echo $radarLoc?>&amp;lang=<?php echo $SITE['lang']; ?>" scrolling="no" style="border:none"></iframe>
    </div><!-- end align center -->

Use Saratoga-Weather.org - Website Templates - AJAX/PHP - Updates with a query of 25-Apr-2025, Base-Canada, *-Plugin to get the updates. Be sure to install before 30-Apr-2024 to maintain radar images on your site.

1 Like