<html><head></head><body>Hi Leila,<br>NOAA decided not to include day of week in any of their gribs starting 1/1/2021. <br><br>The good news is William LaForce figured out some exceptionally elegant code to determine day of week using year, month and day date.<br><br>Look in the archives or I'll attach the main logic below.<br><br>Hope that helps.<br>Mark<br><br>- - -<br>From post on 12/22/20:<br><br>After breaking down the month into a numerical value, use that along with the day and current year into a function as such:<br><br><br>if (month < 3)<br>month = month + 12<br>year = year -1<br>endif<br><br>dow = math_mod(day + math_int((13*(month+1))/5) + year + math_int(year/4) - math_int(year/100) + math_int(year/400),7)<br><br><br>from here, the value 0 is Saturday, 1 is Sunday...6 is Friday<hr>William (L.B.) LaForce IV<br>Meteorologist<br><br><br><br><div class="gmail_quote">On January 20, 2021 6:11:41 AM PST, leila amini <labi475@gmail.com> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div dir="ltr"><div><h2 class="gmail-hP" tabindex="-1" style="margin:0px;padding:0px 10px 0px 0px;border:0px;font-variant-ligatures:no-contextual;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-weight:400;font-stretch:inherit;font-size:1.375rem;line-height:inherit;font-family:"Google Sans",Roboto,RobotoDraft,Helvetica,Arial,sans-serif;display:inline;outline:none;color:rgb(32,33,36)">hi </h2></div><div><h2 class="gmail-hP" tabindex="-1" style="margin:0px;padding:0px 10px 0px 0px;border:0px;font-variant-ligatures:no-contextual;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-weight:400;font-stretch:inherit;font-size:1.375rem;line-height:inherit;font-family:"Google Sans",Roboto,RobotoDraft,Helvetica,Arial,sans-serif;display:inline;outline:none;color:rgb(32,33,36)">i need your help</h2></div><div><h2 class="gmail-hP" tabindex="-1" style="margin:0px;padding:0px 10px 0px 0px;border:0px;font-variant-ligatures:no-contextual;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-weight:400;font-stretch:inherit;font-size:1.375rem;line-height:inherit;font-family:"Google Sans",Roboto,RobotoDraft,Helvetica,Arial,sans-serif;display:inline;outline:none;color:rgb(32,33,36)">i used of script for 3 years without problem and i had title of day of week for example sunday and ... over my map .in start of 2020 year i dont have days of week and i have ???</h2></div><h2 id="gmail-:ma" class="gmail-hP" tabindex="-1" style="margin:0px;padding:0px 10px 0px 0px;border:0px;font-variant-ligatures:no-contextual;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-weight:400;font-stretch:inherit;font-size:1.375rem;line-height:inherit;font-family:"Google Sans",Roboto,RobotoDraft,Helvetica,Arial,sans-serif;display:inline;outline:none;color:rgb(32,33,36)">Day of week showing ???</h2><div><font color="#202124" face="Google Sans, Roboto, RobotoDraft, Helvetica, Arial, sans-serif"><span style="font-size:22px;font-variant-ligatures:no-contextual">please help me thanks</span></font></div><div><font color="#202124" face="Google Sans, Roboto, RobotoDraft, Helvetica, Arial, sans-serif"><span style="font-size:22px;font-variant-ligatures:no-contextual">leila<br></span></font><span id="gmail-:m9" class="gmail-J-J5-Ji" style="display:inline-flex;min-height:28px;vertical-align:bottom;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:22px"><div class="gmail-pG" id="gmail-:m6" style="font-size:0px;padding:0px;width:20px;height:20px;display:inline-block;margin:0px 8px 0px 0px"><br class="gmail-Apple-interchange-newline"></div><div class="gmail-pG" id="gmail-:m6" style="font-size:0px;padding:0px;width:20px;height:20px;display:inline-block;margin:0px 0px 0px 8px">p</div></span></div></div>
</blockquote></div><br>-- <br>Thanks <br>Mark Sponsler</body></html>