<html xmlns:v="urn:schemas-microsoft-com:vml" 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=us-ascii">
<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:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-ZA" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:12.0pt">I am using grib2ctl.pl and GrADS in order to convert ERA5 reanalysis data (e.g. 2m temperature at 12Z) from a .grib format to a .dat format.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">The grib file contains global data (x=1440 and y=721 for a 0.25x0.25 degree grid).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">When I use convert.gs to create the .dat file for the whole dataset everything works fine and the data is displayed correctly thereafter.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">However, I don’t have the computing power to ingest such a huge dataset and would rather work with a subset for a window area.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">Now, when I run a modified convert.gs to create the .dat file for the smaller domain (e.g. x=96 to 128 and y=234 to 264) I don’t get any error messages and everything seems to still work fine.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">But upon displaying the data I get funny zonal isotherms for temp and constant field displays for wind.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">Any ideas please?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">Modified script for converting for smaller window area (original domain in comments):<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"> function main()<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"> 'reinit'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"> rname1='ERA5_sfcvar12_'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"> rname2='newERA5_sfc12_'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"> ext1='.ctl'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"> ext2='.dat'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"> jaar=1979<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"> mnth=12<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"> fname1=rname1%jaar%mnth%ext1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"> fname2=rname2%jaar%mnth%ext2<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"> tlabel=DEC1979<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"> 'open /run/media/stephan/SS_Transcend/ERA5/'fname1''<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"> 'set x 96 128'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">** was originally 'set x 1 1440'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">** in order to set lon 0.00 359.75<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"> 'set y 234 264'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">** was originally 'set y 1 721'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">** in order to set lat -90.00 90.00<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"> 'set time 'tlabel''<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"> 'set gxout fwrite'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"> 'set fwrite /run/media/stephan/SS_Transcend/ERA5/'fname2''<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"> tyd=1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"> while (tyd <= 31)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"> 'set t 'tyd<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">*** surface 10 metre U wind component [m/s]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"> 'd no10Usfc'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">*** surface 10 metre V wind component [m/s]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"> 'd no10Vsfc'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">*** surface 2 metre dewpoint temperature [K]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"> 'd no2Dsfc'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">*** surface 2 metre temperature [K]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"> 'd no2Tsfc'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"> tyd=tyd+1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"> endwhile<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"> 'close 1'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"> 'reinit'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"> 'quit'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal">Stephan Steyn<span style="mso-fareast-language:EN-ZA"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<HR>University of the Free State: This message and its contents are subject to a disclaimer. <BR>
Please refer to http://www.ufs.ac.za/disclaimer for full details.<BR>
</body>
</html>