<html><head></head><body><div class="yahoo-style-wrap" style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div dir="ltr" data-setdir="false">Dears,<br>First of all, happy Nowruz. I hope best wishes for all people and safe from COVID-19.</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">I want to handle a header for plot GFS 0.25 data. I've used following lines:</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false"><div><div dir="ltr" data-setdir="false"><div dir="ltr" data-setdir="false"><span><font face="courier new, courier, monaco, monospace, sans-serif" size="2" style="background-color: inherit;"> ; To read precipitation variable from file</font></span></div><div dir="ltr" data-setdir="false"><span><font face="courier new, courier, monaco, monospace, sans-serif" size="2" style="background-color: inherit;"> gfs_f = addfile("<span>gfs.t00z.pgrb2.0p25.f024</span>", "r")</font></span></div><div dir="ltr" data-setdir="false"><span><font face="courier new, courier, monaco, monospace, sans-serif" size="2" style="background-color: inherit;"> <span>gfs_prc = gfs_f->APCP_P8_L1_GLL0_acc24h</span></font></span></div><div dir="ltr" data-setdir="false"><span><span><font face="courier new, courier, monaco, monospace, sans-serif" size="2" style="background-color: inherit;"> print(<span>gfs_prcn@initial_time</span>)</font></span></span></div><div dir="ltr" data-setdir="false"><span><span><font face="courier new, courier, monaco, monospace, sans-serif" size="2" style="background-color: inherit;"> print(<span><span style="color: rgb(0, 0, 0);">gfs_prcn@forecast_time</span></span>)</font></span></span></div><div dir="ltr" data-setdir="false"><span><font face="courier new, courier, monaco, monospace, sans-serif" size="2" style="background-color: inherit;"><div> ; initial_time : 03/21/2020 (00:00)</div><div dir="ltr" data-setdir="false"> ; forecast_time : 24<div><div> ; forecast_time_units : hours</div><div><br></div></div> ; For Initial time in header I've used following lines:</div><div> moni = str_get_cols(gfs_prcn@initial_time, 0, 1) ; 03<br></div></font></span></div><div dir="ltr" data-setdir="false"><font face="courier new, courier, monaco, monospace, sans-serif" size="2"> dayi = str_get_cols(<span>gfs_prcn@initial_time</span>, 3, 4) ; 21</font></div><div dir="ltr" data-setdir="false"><font face="courier new, courier, monaco, monospace, sans-serif" size="2"> yeari=str_get_cols(<span>gfs_prcn@initial_time</span>, 6, 9) ; 2020</font></div><div dir="ltr" data-setdir="false"><font face="courier new, courier, monaco, monospace, sans-serif" size="2"> houri=str_get_cols(<span>gfs_prcn@initial_time</span>, 12, 13); 00</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif" size="2"> dow = day_of_week(stringtointeger(yeari),stringtointeger(moni),stringtointeger(dayi))</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div dir="ltr" data-setdir="false"><font face="courier new, courier, monaco, monospace, sans-serif" size="2"> ; Convert day_of_week output from integer to corresponding day.</font></div><div dir="ltr" data-setdir="false"><font face="courier new, courier, monaco, monospace, sans-serif" size="2"> if (dow .eq. 0) then</font><div><div><font face="courier new, courier, monaco, monospace, sans-serif" size="2"><span style="white-space: pre-wrap;"> </span>dowc = "Sun"</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif" size="2"> else if (dow .eq. 1) then</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif" size="2"><span style="white-space: pre-wrap;"> </span>dowc = "Mon"</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif" size="2"> else if (dow .eq. 2) then</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif" size="2"><span style="white-space: pre-wrap;"> </span>dowc = "Tue"</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif" size="2"> else if (dow .eq. 3) then</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif" size="2"><span style="white-space: pre-wrap;"> </span>dowc = "Wed"</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif" size="2"> else if (dow .eq. 4) then</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif" size="2"><span style="white-space: pre-wrap;"> </span>dowc = "Thu"</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif" size="2"> else if (dow .eq. 5) then</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif" size="2"><span style="white-space: pre-wrap;"> </span>dowc = "Fri"</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif" size="2"> else</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif" size="2"><span style="white-space: pre-wrap;"> </span>dowc = "Sat"</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif" size="2"> end if</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif" size="2"> end if</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif" size="2"> end if</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif" size="2"> end if</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif" size="2"> end if</font></div><div><font face="courier new, courier, monaco, monospace, sans-serif" size="2"> end if</font></div><div> <font face="courier new, courier, monaco, monospace, sans-serif" size="2">res@gsnRightString<span style="white-space: pre-wrap;"> </span>= "Init: "+<span style="background-color: rgb(211, 106, 83);">dowc</span>+" "+<span style="background-color: rgb(253, 248, 105);">yeari</span>+"-"+<span style="background-color: rgb(173, 215, 115);">moni</span>+"-"+<span style="background-color: rgb(125, 190, 241);">dayi</span>+" "+<span style="background-color: rgb(210, 100, 170);">houri</span>+"z"</font><br></div></div><div dir="ltr" data-setdir="false"><font face="courier new, courier, monaco, monospace, sans-serif" size="2"> ; output will be something like: Init: <span style="background-color: rgb(211, 106, 83);">Sat</span> <span style="background-color: rgb(253, 248, 105);">2020</span>-<span style="background-color: rgb(173, 215, 115);">03</span>-<span style="background-color: rgb(125, 190, 241);">21</span> <span style="background-color: rgb(210, 100, 170);">00</span>z</font></div><div dir="ltr" data-setdir="false"><font face="courier new, courier, monaco, monospace, sans-serif" size="2"><br></font></div><div dir="ltr" data-setdir="false">May I ask some help?<br></div></div></div></div></div><div dir="ltr" data-setdir="false">1- Is there any straightforward to get desired output for initial time header, same as above? I mean is there any function to use instead of "<span><span style="color: rgb(0, 0, 0); font-family: "courier new", courier, monaco, monospace, sans-serif; font-size: small;">str_get_cols</span></span>" and also instead of many "<span><span style="color: rgb(0, 0, 0); font-family: "courier new", courier, monaco, monospace, sans-serif; font-size: small;">if</span></span>" for above lines?</div><div dir="ltr" data-setdir="false">2- forecast_time gives me just an integer number, 24. How could I created a valid time header for plots, like: "Valid: Sun 2020-03-22 00z"?</div><div dir="ltr" data-setdir="false">I've seen following link:</div><div dir="ltr" data-setdir="false"><span><a href="https://www.ncl.ucar.edu/Support/talk_archives/2012/3759.html" rel="nofollow" target="_blank">https://www.ncl.ucar.edu/Support/talk_archives/2012/3759.html</a></span><br></div><div dir="ltr" data-setdir="false">It seems like my problem, however is it final way?</div><div dir="ltr" data-setdir="false">I hope hearing from you, as always.</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false"><i><font size="2">Sincerely</font></i></div><div dir="ltr" data-setdir="false"><i><font size="2">Ehsan</font></i></div><div dir="ltr" data-setdir="false"><br></div></div></body></html>