<div dir="ltr"><div>The problem is that Dennis's program did not copy the file global attributes, which contain part of the georeferencing. Just add this line near the top of the program, after the line "print (vNames)":</div><div><br></div><div> copy_VarAtts (f, fout)</div><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 25, 2024 at 11:07 AM Ehsan Taghizadeh via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div><div style="font-family:"bookman old style","new york",times,serif;font-size:16px"><div><div dir="ltr">Dear Setareh,</div><div dir="ltr"><div><div>I suggest you read the variables from the fout file again. For example, if there is a variable named "V10" in fout, you just need to read that variable from fout, as follows:</div><div>V10_zero=fout->V10</div><div><br></div><div>This V10_zero has the same coordinates as V10 in the original file, but its values are zero.</div><div>I hope this is correct.</div></div></div><div dir="ltr"><br></div></div><div><br></div>
</div><div id="m_5376276308783386129yahoo_quoted_6819469700">
<div style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;color:rgb(38,40,42)">
<div>
On Thursday, January 25, 2024 at 06:17:12 PM GMT+3:30, Setareh Rahimi via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:
</div>
<div><br></div>
<div><div id="m_5376276308783386129yiv5053542009"><div><div>Dear Dennis,</div><div>I noticed an issue. When I use the attached script it converts all values to zero, but the data is no georefrenced any more. So how can I fix this please?</div><div>Thanks in advance.</div><div>Best regards, <br clear="all"><br clear="all"><div><div dir="ltr">S.Rahimi<br clear="none"><br clear="none"></div></div></div><div><br></div><div id="m_5376276308783386129yiv5053542009yqt39142"><div><div><div dir="ltr">On Sun, Jan 21, 2024 at 18:44 Dennis Shea <<a rel="nofollow noopener noreferrer" shape="rect" href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>> wrote:<br clear="none"></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Attached is a script that does what you requested.</div><div><br clear="none"></div></div><br clear="none"><div></div><div><div dir="ltr">On Sat, Jan 20, 2024 at 6:40 AM Setareh Rahimi via ncl-talk <<a rel="nofollow noopener noreferrer" shape="rect" href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:<br clear="none"></div></div><div><blockquote style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"></blockquote></div><div><blockquote style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br clear="all"><div>Dear NCL users,</div><div><br clear="none"></div><div>I have a NetCDF file (attached) that contains some variables. I would like to change the values of all variables to zero for all grid points. So how can I do this using NCL, please?</div><div><br clear="none"></div><div>This file is an input file for the WRF-Chem model, and I do not want to change the format of the file, only want to change the values to zero.</div><div><br clear="none"></div><div>Please kindly advise me in this regard.</div><div><br clear="none"></div><div>Thanks in advance.</div><div>Kind regards,</div><span>-- </span><br clear="none"><div dir="ltr">S.Rahimi</div></div></blockquote></div></blockquote></div></div></div></div></div></div></div></div></div>
</blockquote></div></div>