<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Pavel, <o:p></o:p></p>
<p class="MsoNormal">Isimar is on the right track. You need to use ‘set gxout fwrite’ and ‘display’ instead of the ‘define’ and ‘sdfwrite’ commands. That will create a flat binary file, and you’ll have to write a descriptor file based on the specs of your destination
 grid. If you use use ‘set stat on’ GrADS will print out some helpful information about your new gridded variable.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">If you really need netCDF output, then you can open your newly created descriptor file, make sure the dimension environment is set properly, define the variable, and then use ‘sdfwrite’ to write out the result.
<o:p></o:p></p>
<p class="MsoNormal">--Jennifer<o:p></o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt">-- <span style="color:black"><br>
Jennifer Miletta Adams<br>
Senior Scientific Software Developer<br>
Goddard Earth Sciences Data and Information Services Center (GES DISC)<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;color:black">NASA/GSFC, Code 610.2</span><span style="font-size:9.0pt">
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;color:#AFABAB">Building 32, Room S159<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">gradsusr <gradsusr-bounces@gradsusr.org> on behalf of Isimar de Azevedo Santos <isimar.uenf@gmail.com><br>
<b>Reply-To: </b>GrADS Users Forum <gradsusr@gradsusr.org><br>
<b>Date: </b>Monday, September 13, 2021 at 4:58 PM<br>
<b>To: </b>"pavel@cyclone.tau.ac.il" <pavel@cyclone.tau.ac.il>, GrADS Users Forum <gradsusr@gradsusr.org><br>
<b>Subject: </b>[EXTERNAL] Re: [gradsusr] How to store a map, based on station data, in GRADS, in a NetCDF-file?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Hi, Pavel<o:p></o:p></p>
<div>
<p class="MsoNormal">Why not use simply: "x= ... ", without "define"<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Isimar from Brazil.<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Em seg., 13 de set. de 2021 às 12:43, Pavel Kishcha <<a href="mailto:pavel@cyclone.tau.ac.il">pavel@cyclone.tau.ac.il</a>> escreveu:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><span style="font-size:12.0pt;line-height:115%;font-family:"Times New Roman",serif;color:black">Hello to all users of grads,<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><span style="font-size:12.0pt;line-height:115%;font-family:"Times New Roman",serif;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><span style="font-size:12.0pt;line-height:115%;font-family:"Times New Roman",serif;color:black">A Cressman objective analysis was conducted on the station data to obtain a map representing the
 station data.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><span style="font-size:12.0pt;line-height:115%;font-family:"Times New Roman",serif;color:black">'set gxout shaded'<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><span style="font-size:12.0pt;line-height:115%;font-family:"Times New Roman",serif;color:black">'d oacres (gexpr, sexpr)'<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><span style="font-size:12.0pt;line-height:115%;font-family:"Times New Roman",serif;color:black">As a result, the map was successfully created.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><span style="font-size:12.0pt;line-height:115%;font-family:"Times New Roman",serif;color:black">To store the obtained map in a NetCDF-file, we tried to use the following GRADS commands:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><span style="font-size:12.0pt;line-height:115%;font-family:"Times New Roman",serif;color:black">'set sdfwrite
<a href="https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmap.nc%2F&data=04%7C01%7Cjennifer.m.adams%40nasa.gov%7C5b187041c0984b1d51df08d976f93c6e%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637671635239815388%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=Nl%2BAt0H6142tF7jBgd9szNJiCaKViGVu6yx0Dqas4zk%3D&reserved=0" target="_blank">
map.nc</a>'<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><span style="font-size:12.0pt;line-height:115%;font-family:"Times New Roman",serif;color:black">‘define x = oacres (gexpr, sexpr)'<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><span style="font-size:12.0pt;line-height:115%;font-family:"Times New Roman",serif;color:black">'sdfwrite x'<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><span style="font-size:12.0pt;line-height:115%;font-family:"Times New Roman",serif;color:black"> <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><span style="font-size:12.0pt;line-height:115%;font-family:"Times New Roman",serif;color:black">Unfortunately, we got the following error info:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><span style="font-size:12.0pt;line-height:115%;font-family:"Times New Roman",serif;color:black">DEFINE error: Define not yet valid for station data<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><span style="font-size:12.0pt;line-height:115%;font-family:"Times New Roman",serif;color:black">              Default file is a station data file<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><span style="font-size:12.0pt;line-height:115%;font-family:"Times New Roman",serif;color:black"> <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><span style="font-size:12.0pt;line-height:115%;font-family:"Times New Roman",serif;color:black">How to solve this problem and to store the obtained map (based on station data) in GRADS, in a
 NetCDF-file? Any ideas?<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><span style="font-size:12.0pt;line-height:115%;font-family:"Times New Roman",serif;color:black"> <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><span style="font-size:12.0pt;line-height:115%;font-family:"Times New Roman",serif;color:black">Thank you,<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:10.0pt;line-height:115%"><span style="font-size:12.0pt;line-height:115%;font-family:"Times New Roman",serif;color:black">Pavel Kishcha<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div style="margin-left:30.0pt">
<p class="MsoNormal">_______________________________________________<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal">gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr&data=04%7C01%7Cjennifer.m.adams%40nasa.gov%7C5b187041c0984b1d51df08d976f93c6e%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637671635239815388%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=6x%2Fe%2FB5QCB5KbTPyqORmazuFaqc43%2BN0U%2BLtuOzq9Bg%3D&reserved=0" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><o:p></o:p></p>
</blockquote>
</div>
</div>
<p class="MsoNormal">_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr&data=04%7C01%7Cjennifer.m.adams%40nasa.gov%7C5b187041c0984b1d51df08d976f93c6e%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637671635239825342%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=KRekKdxWTTW81kt8%2Bhw17ioW5p%2BFR3fQjfkGbScDB%2F4%3D&reserved=0" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</body>
</html>