<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
The original question didn't mention which version of GrADS is in use. The more recent ones have a metafile buffer that gets dynamically allocated as you start drawing stuff. The -m option on startup allows you to set a maximum buffer size. As you use 'draw'
 or 'display' commands, each graphical element gets added to the metabuffer. Check the memory usage of the grads executable while the drawing is going on to see if that memory footprint is growing steadily to a point where you're reaching system limits. Use
 'reinit' or 'undefine' to keep memory use in check. When rendering an image, GrADS goes through the metabuffer and draws each line, dot, polygon, or letter. If you're drawing a grfill plot of a very high resolution grid, that's a lot of little tiny squares
 to draw and it can take a while. Then if you add basemap to mask out land or ocean, that's a whole lot of polygons to draw on top of that, and the more you layer on with contour line overlays or labels and other cosmetics... you get the idea. A rendering time
 of 1.5 seconds doesn't seem like a lot, but I can see where it would scale up. Use maskout() or negative numbers in your 'set ccols' command to avoid drawing filler you don't need in your graphic. Maybe there's some things you can pre-draw and use as a background
 or foreground image (merged with the -b or -f option with gxprint) so they don't have to be rendered multiple times. Or check if you are needlessly drawing stuff that will get masked out by another layer on top.
<br>
<br>
If you're testing without using batch mode, does it take 1.5 seconds to draw the graphic in the display window? Watch and see if you can tell what takes the longest to draw for each of your plot styles, maybe that will shed some light on what's slowing down
 your image production. <br>
<br>
Of course, it may just be a basic truth that your beautiful GrADS plots are going to need 1.5 seconds to get ready for prime time.
<span id="😄" contenteditable="false">😄</span><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
--Jennifer<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> gradsusr <gradsusr-bounces@gradsusr.org> on behalf of Mark Sponsler <msponsler@comcast.net><br>
<b>Sent:</b> Monday, April 11, 2022 12:21 PM<br>
<b>To:</b> GrADS Users Forum <gradsusr@gradsusr.org><br>
<b>Subject:</b> Re: [gradsusr] GrADS performance vs alternatives?</font>
<div> </div>
</div>
<div>One other consideration is HOW your data is stored. Reading grib files versus reading binary files I believe is inherently quicker.
<br>
<br>
Try coverting your grib2 files to binary using wgrib2 before you start running scrpits to produce images.<br>
<br>
Just a thought.<br>
Mark<br>
<br>
<div class="x_gmail_quote">On April 11, 2022 1:33:15 AM PDT, Davide Sacchetti <davide.sacchetti@arpal.liguria.it> wrote:
<blockquote class="x_gmail_quote" style="margin:0pt 0pt 0pt 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
I see
<div>there are different ways to produce png outputs, depending also on grads version</div>
<div>eg: gxprint, printim, print: you could investigate which method is faster.</div>
<div>when I have to produce lots of png I divide the number of png processing among the available cpus, but I immagine you already did this</div>
<div><br>
</div>
<div>On my knowledge it is difficult to read and render data from grib or netcdf faster than grads does, the only chance I imagine is to take advantage of parallelization</div>
<div><br>
</div>
<div>Davide<br>
<br>
<div style="margin:0px; padding:0px; box-sizing:content-box; color:rgb(34,34,34)">
<i style="box-sizing:content-box"><font style="box-sizing:content-box" size="2"><span id="x_mcntmcntext-gen4583" style="box-sizing:content-box; font-family:Calibri,sans-serif">Dott. Davide Sacchetti</span></font></i></div>
<div style="margin:0px; padding:0px; box-sizing:content-box; color:rgb(34,34,34)">
<i style="box-sizing:content-box"><font style="box-sizing:content-box" size="2"><span id="x_mcntmcntext-gen4583" style="box-sizing:content-box; font-family:Calibri,sans-serif"></span></font></i></div>
<i style="box-sizing:content-box; color:rgb(34,34,34)"><font style="box-sizing:content-box" size="2"><span id="x_mcntmcntext-gen4583" style="box-sizing:content-box; font-family:Calibri,sans-serif">Dipartimento Stato dell’Ambiente e Tutela dai Rischi Naturali<br style="box-sizing:content-box">
U.O. Clima Meteo Idro<br style="box-sizing:content-box">
Viale Brigate Partigiane 2, 16129 Genova (I)<br style="box-sizing:content-box">
tel: +39 0106437535<br style="box-sizing:content-box">
mail: <a href="mailto:mauro.damonte@arpal.liguria.it" data-auth="NotApplicable" class="x_mailto" title="Send email to mauro.damonte@arpal.liguria.it" style="box-sizing:content-box">davide.sacchetti@arpal.liguria.it</a>  web: <a href="http://secure-web.cisco.com/1gZr8j65sWn3pQixShqA64yx2-ElCh3P2HieHemBe2Gk4wfXBgHys44Avjcj6ZTK1C3CIq764eOP1ntiV6A9ZXZfXzVtBROgZx5LAf017ewplrcVXyW3NeWn_CNFF24alGBreWMBMPcab0Nh5SHId-7FZl5X3rQx6_R8pCAUymoAUfX4SrlMbg-2dycf8dphl8V3m7SWWAQugf1JjfIar0Ol_xc--xJnJs7L624ihdh4IPkxQoaZvPBPKqzL2bSTAjPqSu4fCAKW_eol8TODIjRNNkaxLeNdazFqEy5wta4aHKK_ypzH3FYJcqkRtM5IBkYOXnUSPuvWLUaV_BUI9fbACyDbOZnVABcrLoFXC6X6G4p2aXxf05DkHEMJFnGJkBMxAMqOYtYx5Mn0TTmcQd1K-2Kj2AHGulwDZRZasvmCzhD5hE31ZUuDBTG3RjgPu/http%3A%2F%2Fwww.meteoliguria.it%2F" data-auth="NotApplicable" title="http://www.meteoliguria.it" style="box-sizing:content-box">https://www.arpal.liguria.it/homepage/meteo.html</a></span></font></i><br>
<br>
<br>
<div><strong>Da: </strong>Brian Gaze <brianw.gaze@googlemail.com> <br>
<strong>A: </strong><gradsusr@gradsusr.org> <br>
<strong>Inviato: </strong>08/04/2022 19:03 <br>
<strong>Oggetto: </strong>[gradsusr] GrADS performance vs alternatives? <br>
<br>
<blockquote class="x_mori" style="margin:0 0 0 .8ex; border-left:1px solid #CCC; padding-left:1ex">
<div>
<div>Thanks David.</div>
<div><br>
</div>
<div>The data is stored locally on high speed SSDs.<br>
<br>
Any tips with scripting? My professional background is software development so I'm reasonably comfortable working with grads script. However, I've not found many tweaks that make a great deal of difference in terms of performance.<br>
<br>
Thanks</div>
<div><br>
</div>
<div>Brian</div>
<div><br>
</div>
<br>
<div class="x_mcntgmail_quote">
<div class="x_mcntgmail_attr">On Fri, 8 Apr 2022 at 17:08, <<a href="mailto:gradsusr-request@gradsusr.org" data-auth="NotApplicable" title="Invia e-mail a gradsusr-request@gradsusr.org" class="x_mailto">gradsusr-request@gradsusr.org</a>> wrote:<br>
</div>
<blockquote class="x_mcntgmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
Send gradsusr mailing list submissions to<br>
        <a href="mailto:gradsusr@gradsusr.org" data-auth="NotApplicable" title="Invia e-mail a gradsusr@gradsusr.org" class="x_mailto">
gradsusr@gradsusr.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://secure-web.cisco.com/163dD1XGeO-hjnmSvUANLOGWcV4Myz0XcxmmeR5AW1l9fMIYZvifQ1cSy3DXLU9gJg7IRXjSZlFt9uWucCXDBEopejhCeEZySbPKE3VK7QLpGr6pP98nvm_QJA4QTBhMlg_8ndf-6_dqqY8nHCdZn94z-KHMSuu9xfcCHGqtmT73Q-S-huFoJ7Dw2rlXf1vIAMCGXHB5zHshe3D4ZmM-LTViFUQQbg4E8CN8aeZZVC_Y1962Gnh6bONjXd0Semezdg8hKlXZV21mqWKEUT5i6q9kbCEtgQ84DzV9j5qhpwgi_T3SDGlB5j34uI3sjuF9lLa8OBG4yQZDwM4hCAfRu9KXP019jxqG2g87KZ9XuxXoQEVXS5jc_EZuA6gIMZj8pnHgl_NOrXLDno5zBLaA78ib-i8RHTPZLvtDZYBdV2mbqnFgENQ9_DkCYCRNfmP66/https%3A%2F%2Furlsand.esvalabs.com%2F%3Fu%3Dhttp%253A%252F%252Fgradsusr.org%252Fmailman%252Flistinfo%252Fgradsusr%26e%3D7312d17f%26h%3D5ee7e1e3%26f%3Dy%26p%3Dn" data-auth="NotApplicable" title="gradsusr.org">
http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:gradsusr-request@gradsusr.org" data-auth="NotApplicable" title="Invia e-mail a gradsusr-request@gradsusr.org" class="x_mailto">
gradsusr-request@gradsusr.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:gradsusr-owner@gradsusr.org" data-auth="NotApplicable" title="Invia e-mail a gradsusr-owner@gradsusr.org" class="x_mailto">
gradsusr-owner@gradsusr.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of gradsusr digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. Re: GrADS performance vs alternatives? (Davide Sacchetti)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Thu, 7 Apr 2022 18:06:10 +0200<br>
From: Davide Sacchetti <<a href="mailto:davide.sacchetti@arpal.liguria.it" data-auth="NotApplicable" title="Invia e-mail a davide.sacchetti@arpal.liguria.it" class="x_mailto">davide.sacchetti@arpal.liguria.it</a>><br>
To: GrADS Users Forum <<a href="mailto:gradsusr@gradsusr.org" data-auth="NotApplicable" title="Invia e-mail a gradsusr@gradsusr.org" class="x_mailto">gradsusr@gradsusr.org</a>><br>
Subject: Re: [gradsusr] GrADS performance vs alternatives?<br>
Message-ID: <<a href="mailto:51862359-4676@mbox.arpal.liguria.it" data-auth="NotApplicable" title="Invia e-mail a 51862359-4676@mbox.arpal.liguria.it" class="x_mailto">51862359-4676@mbox.arpal.liguria.it</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
the speed may depend on cpu but also on where your data is stored (are your datasets available locally?) and how your script is written ...<br>
Upon my knowloedge GrADS IS fast, it may be the fastest sw you can find everywhere ...<br>
Davide<br>
<br>
<br>
Dott. Davide Sacchetti<br>
Dipartimento Stato dell?Ambiente e Tutela dai Rischi Naturali<br>
U.O. Clima Meteo Idro<br>
Viale Brigate Partigiane 2, 16129 Genova (I)<br>
tel: +39 0106437535<br>
mail:?<a href="mailto:davide.sacchetti@arpal.liguria.it" data-auth="NotApplicable" title="Invia e-mail a davide.sacchetti@arpal.liguria.it" class="x_mailto">davide.sacchetti@arpal.liguria.it</a>? web:?<a href="https://secure-web.cisco.com/1LIZPEjfzGBuSGwKcHKEOukwPXRwTCBIU_CPX8ZtsY9O0P34nXLlUGBlSD7PjeNRIWdDE_51LCqDVo9FNQERjSjwEk8dXp1e_fN00HUbJpWWgTOyFw5HWXD8hX_j_FI0Ue43-KKvchAHGg0qo_1kmJ3YZ1zobRPH2Op9HZISH1mAIHbZxtfyFv-bNXiWQGzXIX5YAzYeF-pT09ko1ZVRIUiXYOQwXQkxxRpdjK8D6DPfYEbT84hIGKwyiEFOlh2CTvcnlosOScgdcB9Jj43YFABpmRqgIwy6BqGZz_XzN-DgLvQQMu7Ch5FsRCI2GqIVZWywxj-33xVHUIcw_ftdOp09IHmFMqUq8bYA9RQvEtdVLPolAwwrANerDWFjkRUwhW_hOdkR9JOyRgYbyHLs_kVJNa-BKiHvQeLqtnmxEHfrca06ypJGZ3b0U1O9RLBYV/https%3A%2F%2Furlsand.esvalabs.com%2F%3Fu%3Dhttps%253A%252F%252Fwww.arpal.liguria.it%252Fhomepage%252Fmeteo.html%26e%3D7312d17f%26h%3D07ef49f6%26f%3Dy%26p%3Dn" data-auth="NotApplicable" title="www.arpal.liguria.it">https://www.arpal.liguria.it/homepage/meteo.html</a><br>
<br>
<br>
<br>
 Da:   Brian Gaze <<a href="mailto:brianw.gaze@googlemail.com" data-auth="NotApplicable" title="Invia e-mail a brianw.gaze@googlemail.com" class="x_mailto">brianw.gaze@googlemail.com</a>>
<br>
 A:   <<a href="mailto:gradsusr@gradsusr.org" data-auth="NotApplicable" title="Invia e-mail a gradsusr@gradsusr.org" class="x_mailto">gradsusr@gradsusr.org</a>>
<br>
 Inviato:   07/04/2022 17:07 <br>
 Oggetto:   [gradsusr] GrADS performance vs alternatives? <br>
<br>
<br>
<br>
                 Questa ? la prima volta che ricevi un'email da questo mittente.         Assicurati che sia qualcuno di cui ti fidi.               
<br>
Hi,<br>
<br>
<br>
<br>
I've recently started generating ECMWF 50 member ensemble plots using a GrADS script for a large latitude - longitude range. Technically it all works fine, but the issue I'm having is performance. It is dependent of course on CPU speed, but even with a very
 fast processor each individual graph can take approx 1.5 seconds to render and save.?<br>
<br>
<br>
To an extent running instances on multiple cores helps, but generating a range of graphs (e.g. 2m temps, 850hPa temps, MSLP etc...) can take a long time. Perhaps 40 mins or so for a country the size of the United Kingdom.?<br>
<br>
<br>
Does anyone have tips for how to optimize performance in the script? Alternatively, is there software available which runs much faster than GrADS script to do the same thing??<br>
<br>
<br>
Thanks<br>
<br>
<br>
BWG <br>
<br>
_______________________________________________ <br>
gradsusr mailing list <br>
<a href="mailto:gradsusr@gradsusr.org" data-auth="NotApplicable" title="Invia e-mail a gradsusr@gradsusr.org" class="x_mailto">gradsusr@gradsusr.org</a>
<br>
 <a href="https://secure-web.cisco.com/163dD1XGeO-hjnmSvUANLOGWcV4Myz0XcxmmeR5AW1l9fMIYZvifQ1cSy3DXLU9gJg7IRXjSZlFt9uWucCXDBEopejhCeEZySbPKE3VK7QLpGr6pP98nvm_QJA4QTBhMlg_8ndf-6_dqqY8nHCdZn94z-KHMSuu9xfcCHGqtmT73Q-S-huFoJ7Dw2rlXf1vIAMCGXHB5zHshe3D4ZmM-LTViFUQQbg4E8CN8aeZZVC_Y1962Gnh6bONjXd0Semezdg8hKlXZV21mqWKEUT5i6q9kbCEtgQ84DzV9j5qhpwgi_T3SDGlB5j34uI3sjuF9lLa8OBG4yQZDwM4hCAfRu9KXP019jxqG2g87KZ9XuxXoQEVXS5jc_EZuA6gIMZj8pnHgl_NOrXLDno5zBLaA78ib-i8RHTPZLvtDZYBdV2mbqnFgENQ9_DkCYCRNfmP66/https%3A%2F%2Furlsand.esvalabs.com%2F%3Fu%3Dhttp%253A%252F%252Fgradsusr.org%252Fmailman%252Flistinfo%252Fgradsusr%26e%3D7312d17f%26h%3D5ee7e1e3%26f%3Dy%26p%3Dn" data-auth="NotApplicable">https://urlsand.esvalabs.com/?u=http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr&e=7312d17f&h=5ee7e1e3&f=y&p=n</a> 
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://secure-web.cisco.com/12AezH2TlXxg4q3edBAH9cssl9qlPgHU928uAsy6oUBjLPuNOMN9gr45aNKl0DC0PObuVL93D0WrlBQND_SO9R6wS5czhAMD4g_3gdlCjduoTxlKUDKdB-v-zk7y26auowee86bl3EVKIeopIFWeTgnFd8ztf4Q1nb0xX-OXh9ZGf3mf04WJdPbDHXFBPVfme9xe9SKeJ0PhzB0eS5_45kY0Jes_FGhmkkZv7m_Ktug6jgPiRXrHhKxj6-9tHjWlCIPtAshlJxPuLmXR9eWJL0TU75jWOWEjCfuBAUwUUPbt-AY-hP-T92X0CpojKoD9vmuYUv42R_wa2dnkrfu6eFqdRGkQfrhbHraasbYbipub0lwyqQJXEQOZ2Sh0QvNYNPIfWak5_nZGQbQWx9PHR0q5xe-e3sehg6tw3AZdnyqjuXLZ8P267gDaTxNtLM0kF/https%3A%2F%2Furlsand.esvalabs.com%2F%3Fu%3Dhttp%253A%252F%252Fgradsusr.org%252Fpipermail%252Fgradsusr%252Fattachments%252F20220407%252Fa20b8590%252Fattachment-0001.html%26e%3D7312d17f%26h%3D296be31e%26f%3Dy%26p%3Dn" data-auth="NotApplicable" title="gradsusr.org">http://gradsusr.org/pipermail/gradsusr/attachments/20220407/a20b8590/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" data-auth="NotApplicable" title="Invia e-mail a gradsusr@gradsusr.org" class="x_mailto">gradsusr@gradsusr.org</a><br>
<a href="https://secure-web.cisco.com/163dD1XGeO-hjnmSvUANLOGWcV4Myz0XcxmmeR5AW1l9fMIYZvifQ1cSy3DXLU9gJg7IRXjSZlFt9uWucCXDBEopejhCeEZySbPKE3VK7QLpGr6pP98nvm_QJA4QTBhMlg_8ndf-6_dqqY8nHCdZn94z-KHMSuu9xfcCHGqtmT73Q-S-huFoJ7Dw2rlXf1vIAMCGXHB5zHshe3D4ZmM-LTViFUQQbg4E8CN8aeZZVC_Y1962Gnh6bONjXd0Semezdg8hKlXZV21mqWKEUT5i6q9kbCEtgQ84DzV9j5qhpwgi_T3SDGlB5j34uI3sjuF9lLa8OBG4yQZDwM4hCAfRu9KXP019jxqG2g87KZ9XuxXoQEVXS5jc_EZuA6gIMZj8pnHgl_NOrXLDno5zBLaA78ib-i8RHTPZLvtDZYBdV2mbqnFgENQ9_DkCYCRNfmP66/https%3A%2F%2Furlsand.esvalabs.com%2F%3Fu%3Dhttp%253A%252F%252Fgradsusr.org%252Fmailman%252Flistinfo%252Fgradsusr%26e%3D7312d17f%26h%3D5ee7e1e3%26f%3Dy%26p%3Dn" data-auth="NotApplicable" title="gradsusr.org">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br>
<br>
------------------------------<br>
<br>
End of gradsusr Digest, Vol 145, Issue 2<br>
****************************************<br>
</blockquote>
</div>
</div>
<br>
<br>
_______________________________________________ <br>
gradsusr mailing list <br>
gradsusr@gradsusr.org <br>
https://urlsand.esvalabs.com/?u=http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr&e=7312d17f&h=5ee7e1e3&f=y&p=n
<br>
</blockquote>
</div>
</div>
</blockquote>
</div>
<div style="white-space:pre-wrap">
<div class="x_k9mail-signature">-- <br>
Thanks <br>
Mark Sponsler</div>
</div>
</div>
</body>
</html>