﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title><![CDATA[GoldSim Wiki - Reporting Monthly and Annual Data from a Daily Timestep Model]]></title><link>http://www.GoldSim.com/Wiki/Model Library.Reporting-Monthly-and-Annual-Data-from-a-Daily-Timestep-Model.ashx</link><atom:link href="http://www.GoldSim.com/Wiki/Model Library.RSS.aspx?Page=Model Library.Reporting-Monthly-and-Annual-Data-from-a-Daily-Timestep-Model" rel="self" type="application/rss+xml" /><description><![CDATA[Reporting Monthly and Annual Data from a Daily Timestep Model - Page Updates]]></description><pubDate>Wed, 22 May 2013 00:06:35 GMT</pubDate><generator>ScrewTurn Wiki RSS Feed Generator</generator><item><title><![CDATA[Reporting Monthly and Annual Data from a Daily Timestep Model]]></title><link>http://www.GoldSim.com/Wiki/Model Library.Reporting-Monthly-and-Annual-Data-from-a-Daily-Timestep-Model.ashx</link><description><![CDATA[<h2 class="separator">Reporting Monthly and Annual Data from a Daily Timestep Model<a class="headeranchor" id="Reporting_Monthly_and_Annual_Data_from_a_Daily_Timestep_Model_4" href="#Reporting_Monthly_and_Annual_Data_from_a_Daily_Timestep_Model_4" title="Link to this Section"></a></h2><ul><li><b>Category</b>: <a href="Model Library.AllPages.aspx?Cat=Model%20Library.General%20Interest" class="systemlink" title=" General Interest"> General Interest</a></li><li><b>Contact</b>: <a class="emaillink" href="mailto:&#115;&#117;&#112;&#112;&#111;&#114;&#116;&#64;&#103;&#111;&#108;&#100;&#115;&#105;&#109;&#46;&#99;&#111;&#109;" title=" GoldSim Technology Group"> GoldSim Technology Group</a><br /></li></ul><br /><h3 class="separator">Description<a class="headeranchor" id="Description_0" href="#Description_0" title="Link to this Section"></a></h3>
In some cases, you may have a model with relatively fine temporal discretization (e.g., daily), but you are interested in time-averaged results at a courser level of temporal discretization (e.g., monthly and/or annual). This model takes a generic daily signal (in this case a rate), computes the cumulative monthly and annual values (the integral of the rate over the month and year), and outputs the monthly/annual data to a matrix. No links to external spreadsheets are used for this example.<br /><br />This model integrates (accumulates) a daily signal over a period of 5 years and returns monthly and annual sums in vector and matrix formats. A new array was created and named "month_count", which represents the 12 months of the simulation year. The reason the array "Months" was not used is because those are labeled with the names of the months and the starting month of the simulation might not be January. If the starting month is October, then month_count 1 = October and month_count 12 = September. If you want to run a model for more than 5 years, simply change the array "years" to have an equal number of years to the simulation years. Much of the work is being done in the populate_matrix element, where a matrix is being stuffed with values conditionally.<br /><br /><h3 class="separator">Download the model file<a class="headeranchor" id="Download_the_model_file_1" href="#Download_the_model_file_1" title="Link to this Section"></a></h3>
<ul><li><b>GoldSim version the model is saved in:</b> <a class="pagelink" href="GoldSim%20.ashx" title="GoldSim"> The latest version of GoldSim</a></li><li><b>file name</b>: Daily_to_Monthly-Annual.gsm</li><li><b>size</b>: 110 KB</li><li><b>Download</b>: <a class="internallink" href="GetFile.aspx?Page=Model%20Library.Reporting-Monthly-and-Annual-Data-from-a-Daily-Timestep-Model&amp;File=Daily_to_Monthly-Annual.gsm" title="Download model (full version)">Download model (full version)</a><br /></li></ul><br /><ul><li><b>file name</b>: Daily_to_Monthly-Annual.gsp</li><li><b>size</b>: 110 KB</li><li><b>Download</b>: <a class="internallink" href="GetFile.aspx?Page=Model%20Library.Reporting-Monthly-and-Annual-Data-from-a-Daily-Timestep-Model&amp;File=Daily_to_Monthly-Annual.gsp" title="Download model (Player file)">Download model (Player file)</a><br /></li></ul><br /><h3 class="separator">Screen Captures<a class="headeranchor" id="Screen_Captures_2" href="#Screen_Captures_2" title="Link to this Section"></a></h3>
Screen capture of the model:
<div class="imageleft"><img class="image" src="GetFile.aspx?Page=Model%20Library.Reporting-Monthly-and-Annual-Data-from-a-Daily-Timestep-Model&amp;File=daily_to_mon_ann_model.jpg" alt="Image" /></div><br />Result Chart:
<table class="imageauto" cellpadding="0" cellspacing="0"><tr><td><img class="image" src="GetFile.aspx?Page=Model%20Library.Reporting-Monthly-and-Annual-Data-from-a-Daily-Timestep-Model&amp;File=daily_signal.jpg" alt="Image" /></td></tr></table><br />Result Chart:
<table class="imageauto" cellpadding="0" cellspacing="0"><tr><td><img class="image" src="GetFile.aspx?Page=Model%20Library.Reporting-Monthly-and-Annual-Data-from-a-Daily-Timestep-Model&amp;File=annual_sums.jpg" alt="Image" /></td></tr></table><br />Result Table:
<table class="imageauto" cellpadding="0" cellspacing="0"><tr><td><img class="image" src="GetFile.aspx?Page=Model%20Library.Reporting-Monthly-and-Annual-Data-from-a-Daily-Timestep-Model&amp;File=daily_annual_result_table.jpg" alt="Image" /></td></tr></table><br /><h3 class="separator">See Also<a class="headeranchor" id="See_Also_3" href="#See_Also_3" title="Link to this Section"></a></h3><a class="pagelink" href="Model Library.Outputting-Monthly-Data-from-a-Model-With-Daily-Timesteps.ashx" title="Reporting Monthly Data from a Model With Daily Timesteps (Spreadsheet Link)">Outputting Monthly Data from a Model With Daily Timesteps (Spreadsheet Link)</a><br />
<a href="Model Library.AllPages.aspx?Cat=Model%20Library.General%20Interest" class="systemlink" title=" Other general GoldSim models"> Other general GoldSim models</a><br />
<a href="Model Library.AllPages.aspx?Cat=Model%20Library.Water%20Resources" class="systemlink" title=" Other Water Resources models"> Other Water Resources models</a>
]]></description><author> (jlillywh)</author><pubDate>Mon, 02 May 2011 23:14:11 GMT</pubDate><guid isPermaLink="false">D1FBF7C3E6AF36955B4816546CFB51EE</guid></item></channel></rss>