{"id":2351,"date":"2016-09-03T14:44:06","date_gmt":"2016-09-03T20:44:06","guid":{"rendered":"http:\/\/www.ghyzmo.com\/?p=2351"},"modified":"2016-09-03T18:59:12","modified_gmt":"2016-09-04T00:59:12","slug":"gnu-data-language-gdl","status":"publish","type":"post","link":"http:\/\/www.ghyzmo.com\/gnu-data-language-gdl\/","title":{"rendered":"Gnu Data Language GDL"},"content":{"rendered":"<p><em>\u00a9 Fernando Caracena<\/em>, 2015<\/p>\n<p>The <strong>G<\/strong>nu <strong>D<\/strong>ata <strong>L<\/strong>anguage (<strong>GDL<\/strong>) is an emulation of the commercial scripting language called <strong>IDL<\/strong><sup><strong>TM<\/strong><\/sup><strong><\/strong>. This was my favorite software tool when I was doing weather research. The <strong>IDL<\/strong><sup><strong>TM<\/strong><\/sup> language was developed at <a href=\"http:\/\/lasp.colorado.edu\/home\/\">LASP of the University of Colorado<\/a>. It is used extensively by Astronomers who have quite a user\u2019s group. There are many tips on using IDL and routines available, for example in <a href=\"http:\/\/www.idlcoyote.com\/\">Coyote\u2019s Guide to IDL Programming<\/a>. If you have some experience using BASIC\/FORTRAN type programming, then IDL could be fun to play around with, and perhaps, use. Unfortunately, IDL is <em>tr\u00e8s cher<\/em> to buy. Perhaps if you are Warren Buffet that is no obstacle, but you might have other interests and important matters to attend to. For the rest of us, the cost, in kilo-bucks is a big obstacle for a mind appliance. This is where GDL comes to the rescue. It is open source and available for easy download on most Linux distributions through the package distribution\u2019s package manager. However, GDL is not a complete emulation of IDL. Some nifty IDL built in commands are missing in GDL. So, if you read IDL literature and try to reproduce results given in examples and tutorials, you might find that some straightforward commands just do not work.<\/p>\n<p>The purpose of this post is not to document a bunch of commands or to give the user a tutorial on the subject. Rather, its purpose is to motivate the reader by giving that person some idea of what is possible to do with GDL. But, before doing that let us fill in some definitions.<\/p>\n<p><strong>IDL<\/strong><sup><strong>TM<\/strong><\/sup> stands for <a href=\"https:\/\/en.wikipedia.org\/wiki\/IDL_(programming_language)\"><strong>I<\/strong>nteractive <strong>D<\/strong>ata <strong>L<\/strong>anguage<\/a>. Like Python, it is a scripted-interpreted, computer programming language. I like using such a language because I can get instant gratification from firing commands into the command line. Sometimes, when I am working on an idea and I am hot on its trail, pausing to compile the source code and link it to object files is such a drag! Also in the past, the problem in using a variation of BASIC, such as Quick Basic, was that it was slow.<\/p>\n<p>IDL<sup>TM<\/sup> is optimized for vector operations, so that if you configure your computations in a vectorized form, you get both speed of a compiled language and the instant gratification of an interpreted language. GDL shares operating characteristics with IDL<sup><strong>TM<\/strong><\/sup>.<\/p>\n<p>Subroutines and function written by the user in the script are compiled into a byte code, which give them a fast execution. Also, outside subprograms and routines can be brought into the operating environment so that they can be called alongside the system routines. In this way, one can bring in Numerical Recipes and gain the power of man years of coding.<\/p>\n<p>Another major advantage of IDL<sup>TM<\/sup> and GDL in my book are the way that they handle the housekeeping functions of programming, which allow the developer\/programmer to plow ahead with coding his ideas undistracted by housekeeping details, which the operating system handles for him.<\/p>\n<p>The discussion below continues in terms of GDL, although it applies to IDL as well.<\/p>\n<h2>Mechanics of Running GDL<\/h2>\n<p><span><span style=\"color: #000000;\">First, bring up a console window to enter you command lines. If you are in a Linux system, you will get a prompt in that window that looks like the following:<\/span><\/span><\/p>\n<blockquote><p><span><a href=\"mailto:USER@Your_Computer\"><span style=\"color: #000000;\">USER<\/span><span style=\"color: #000000;\">@<\/span><span style=\"color: #000000;\">Your_Computer<\/span><\/a><span style=\"color: #000000;\">:\/$ .<\/span><\/span><\/p><\/blockquote>\n<p><span><span style=\"color: #000000;\">Assumming that you have already installed GDL, then at the prompt, type gdl. In that case, you will get a message and a new prompt, something like the following: <\/span><\/span><\/p>\n<blockquote><p><span><span style=\"color: #000000;\">GDL - GNU Data Language, Version 0.9.6<\/span><\/span><\/p>\n<p>- For basic information type HELP,\/INFO<br \/>\n- Default library routine search path used (GDL_PATH\/IDL_PATH env. var. not set):<br \/>\n+\/usr\/share\/gnudatalanguage\/lib<br \/>\n- No startup file read (GDL_STARTUP\/IDL_STARTUP env. var. not set).<br \/>\n- Please report bugs, feature or help requests and patches at:<br \/>\nhttp:\/\/sourceforge.net\/projects\/gnudatalanguage\/<\/p>\n<p>GDL&gt;<\/p><\/blockquote>\n<p><span><span style=\"color: #000000;\">. <\/span><\/span><\/p>\n<p><span><span style=\"color: #000000;\">You are now ready to do computations.<\/span><span style=\"color: #000000;\"><span style=\"font-family: monospace;\"><br \/>\n<\/span><\/span><\/span><\/p>\n<h2>Examples of GDL code<\/h2>\n<p><span><span style=\"color: #000000;\">A simple example of the speed and convenience of GDL is to generate a thousand (and one) element array along the x-axis; use <\/span><span style=\"color: #000000;\">this array<\/span><span style=\"color: #000000;\"> as a variable in a function, which gives <\/span><span style=\"color: #000000;\">an array of equal size, y <\/span><span style=\"color: #000000;\">; and plot y <\/span><span style=\"color: #000000;\">against<\/span><span style=\"color: #000000;\"> x <\/span><span style=\"color: #000000;\">by entering the following lines after the GDL prompt, each line followed by your keyboard \u2018enter\u2019<\/span><span style=\"color: #000000;\">: <\/span><\/span><\/p>\n<blockquote><p><span><span style=\"color: #000000;\">x = 0.01*(findgen(1001)-500.)<\/span><\/span><\/p>\n<p><span><span style=\"color: #000000;\">y = sin(10.*!pi*x)*exp(-x*x\/2.)<br \/>\n<\/span><span style=\"color: #000000;\">plot, x, y<br \/>\n.--<\/span><\/span><\/p><\/blockquote>\n<p><span><span style=\"color: #000000;\"><em>Listing 1<\/em><br \/>\n<\/span><\/span><\/p>\n<p><span><span style=\"color: #000000;\">The simple three line program (Listing 1) displays a mathematically constructed wave packet, which is of interest in applications of quantum physics. The results, however automatically produced, are rat<\/span><span style=\"color: #000000;\">h<\/span><span style=\"color: #000000;\">er austere looking\u2014<\/span><span style=\"color: #000000;\">a white wavy line against a black background<\/span><span style=\"color: #000000;\">. <\/span><span style=\"color: #000000;\">Also, you had no control over the size of the plot.<\/span><span style=\"color: #000000;\"> A few simple tricks can vastly improve the product. <\/span><\/span><\/p>\n<h3><em><strong>Simplification<\/strong><\/em><\/h3>\n<p>Some very simple but useful routines simplify the details of plotting and customization.<\/p>\n<p>The GDL \"window\" routine defines a blank output window having a black background, which is identified by a number and has a pixel specified width-hight size. The command is long for what it does and requires typing out the proper details in absolutely correct punctuation. This is great for left-brained people, but intuitive types want a simpler code, such as the one I show below:<\/p>\n<p><span><span style=\"color: #000000;\">pro win,n,sx,sy <\/span><br \/>\nwindow,n,xsize=sx,ysize=sy<br \/>\nend<\/span><\/p>\n<p><span>The results of applying win, still gives a window numbered n and pixel sized sx by sy. It is a much shorter command, and all that is required is to enter three numbers after \"win\" in the proper order. Unfortunately, the win[dow] still has a black background. I like to simplify functions that are frequently used, in this case both for creating windows, and plotting on them. A couple of handy rountines that I like to use are <em>zip<\/em> and <em>flameit<\/em>, which are defined as follows: <\/span><\/p>\n<blockquote><p><span style=\"font-family: monospace;\"><span style=\"color: #000000;\"><span>pro flameit, clr<br \/>\npolyfill,[0,1,1,0,0],[0,0,1,1,0],color=clr,\/normal<br \/>\nplots,[0,1,1,0,0],[0,0,1,1,0],color=0,\/normal,thick=5<br \/>\nend<\/span><\/span><\/span><\/p><\/blockquote>\n<p><em>Listing 2<\/em><\/p>\n<blockquote><p>pro zip<br \/>\nflameit,rgbc(255,255,255)<br \/>\nend<\/p><\/blockquote>\n<p><em>Listing 3<\/em><br \/>\n<span style=\"color: #000000;\"><br \/>\n<\/span><span style=\"color: #000000;\">These two routines (<em>Listings 2<\/em> and <em>3<\/em>) give the <\/span><span style=\"color: #000000;\">program <\/span><span style=\"color: #000000;\">a very simple appearance in code, as follows (<em>Listing 4<\/em>) <\/span><span style=\"color: #000000;\">:<\/span><\/p>\n<div style=\"width: 354px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" style=\"border: 0px none;\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAGQCAYAAABWJQQ0AAAW\/klEQVR4nO3d67KjOLIG0K6Ief9XrhO75zDtogGDQEkqtdav7trGYAOSPl3wf\/7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BGAAEAAMIIIAAAQBgBBAAACCOAAAAAYQQQAAAgjAACAACEEUAAAIAwAggAABBGAAEAAMIIIAAAQBgBBAAACCOAAAAAYQQQAAAgjAACAACEEUAAAIAwAggAABBGAAEAAMIIIAAAQBgBBAAACCOAAAAAYQQQAAAgjAACAACEEUAAAIAwAggAABBGAAEAAMIIIAAAQBgBBAAACCOAAAAAYf4IIL9+\/XrrOAAAgAkYAQEAAML8H8jUzDzLeWRzAAAAAElFTkSuQmCC\" alt=\"\" name=\"Image1\" width=\"344\" height=\"172\" align=\"left\" border=\"0\" \/><p class=\"wp-caption-text\">Fig. The graphic output of the listed program--A Wave Packet.<\/p><\/div>\n<blockquote><p>\u00a0<span><span style=\"color: #000000;\"><span>win, 0, 800, 400<\/span><\/span><\/span><\/p>\n<p><span style=\"font-family: monospace;\"><span style=\"color: #000000;\"><span> zip<\/span><\/span><\/span><\/p>\n<p><span style=\"font-family: monospace;\"><span style=\"color: #000000;\"><span><br \/>\nplot, [min(x), max(x)], [min(y),max(y)],color=0,thick=2,charsize=2,charthick=2,\/noerase,\/nod<\/span><\/span><span style=\"color: #000000;\"><span>a<\/span><\/span><span style=\"color: #000000;\"><span>ta, xstyle=1,ystyle=1, title='Wave Packet'<\/span><\/span><\/span><\/p>\n<p><span style=\"font-family: monospace;\"><span style=\"color: #000000;\"><span><br \/>\noplot, x, y, color=0, thick=2<\/span><\/span><\/span><\/p><\/blockquote>\n<h3><span style=\"color: #000000;\">. <\/span><\/h3>\n<h3><em><span style=\"color: #000000;\">Listing 4<\/span><\/em><\/h3>\n<h3><span style=\"color: #000000;\"><br \/>\n<\/span><em><strong><span style=\"color: #000000;\">Explanation of\u00a0<em>Listing 4<\/em><\/span><\/strong><\/em><\/h3>\n<p><span><span style=\"color: #000000;\">The first line creates a window, numbered zero, which is 800 pixels across by 400 pixels high. <\/span><\/span><\/p>\n<p><span><span style=\"color: #000000;\">The second line clears the black screen to white.<\/span><\/span><\/p>\n<p><span><span style=\"color: #000000;\">The third line, long and continued, creates the x and y axes and labels the plot, <\/span><span style=\"color: #000000;\">'Wave Packet'. <\/span><span style=\"color: #000000;\">A similar command could have labeled both the x and y axes.<\/span><\/span><\/p>\n<p><span><span style=\"color: #000000;\">The fourth line plots the graph on the same scale as the declared axes. Note that the program uses \u2018oplot\u2019 rather than \u2018plot\u2019. The command \u2018plot\u2019 would have just ignored all the previous defining commands redefining all these values to some defaults; cleared the screen to black; and plotted the graph to the real color selected, which is computed by the RBGc function.<\/span><\/span><\/p>\n<h3><em><strong>A Final Simplification<\/strong><\/em><\/h3>\n<p><span><span style=\"color: #000000;\">Let\u2019s say that you saved your main program (Listing 4) as \u2018WavePacket.pro\u2019. Note that GDL is expecting saved and called routouines to end in the suffix \u2018.pro\u2019. You can then bring up the wave packet plot at any time from the command line by using the following statement at the command line:<\/span><\/span><\/p>\n<p><span><span style=\"color: #000000;\"><span style=\"font-family: monospace;\">GDL&gt; @<\/span><\/span><span style=\"color: #000000;\">WavePacket<\/span><\/span><\/p>\n<p><span><span style=\"color: #000000;\">. That\u2019s it! All your work is wrapped up in one command.<\/span><\/span><\/p>\n<h3><span><span style=\"color: #000000;\"><em><strong>What is Possible<\/strong><\/em><\/span><\/span><\/h3>\n<p><span><span style=\"color: #000000;\">What is shown above is a very simple task. I have used IDL to solve partial differential equations by techniques such as relaxation methods, the results of which I have displayed as color against geographic map backgrounds. A simpler task, of contouring data from sources irregularly distributed in space is presented as an example (Fig. 2).<br \/>\n<\/span><\/span><\/p>\n<div id=\"attachment_2355\" style=\"width: 364px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/www.ghyzmo.com\/gnu-data-language-gdl\/29aug2016_12z_500mb-analysis-l300_zbal_t_dd_lrg\/\" rel=\"attachment wp-att-2355\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2355\" class=\" wp-image-2355\" title=\"29aug2016_12Z_500mb-Analysis-L=300_Zbal_T_DD_Lrg\" src=\"http:\/\/www.ghyzmo.com\/wp-content\/uploads\/2016\/09\/29aug2016_12Z_500mb-Analysis-L300_Zbal_T_DD_Lrg.png\" alt=\"\" width=\"354\" height=\"214\" srcset=\"http:\/\/www.ghyzmo.com\/wp-content\/uploads\/2016\/09\/29aug2016_12Z_500mb-Analysis-L300_Zbal_T_DD_Lrg.png 1401w, http:\/\/www.ghyzmo.com\/wp-content\/uploads\/2016\/09\/29aug2016_12Z_500mb-Analysis-L300_Zbal_T_DD_Lrg-150x90.png 150w, http:\/\/www.ghyzmo.com\/wp-content\/uploads\/2016\/09\/29aug2016_12Z_500mb-Analysis-L300_Zbal_T_DD_Lrg-300x181.png 300w, http:\/\/www.ghyzmo.com\/wp-content\/uploads\/2016\/09\/29aug2016_12Z_500mb-Analysis-L300_Zbal_T_DD_Lrg-1024x619.png 1024w\" sizes=\"auto, (max-width: 354px) 100vw, 354px\" \/><\/a><p id=\"caption-attachment-2355\" class=\"wp-caption-text\">Fig. 2 An analysis of the height contours (black), Temperature (\u00b0C) contours red lines (dashed below 0\u00b0C), and dew point temperature depression (DD) on the 500 mb pressure surface. DD less than 6\u00b0C is shaded light green, and less than 3\u00b0C dark green.<\/p><\/div>\n<p>I generate figures, such as Fig.2, daily to follow the weather. The example presented here is for the morning of a day when a significant weather event affected the Front Range area of Colorado. Colorado Springs for example, had heavy rain, hail and flooding on that day (<a href=\"http:\/\/www.9news.com\/weather\/hail-flooding-in-colorado-springs\/310685169\">see here<\/a>). Further, the storms continued northward to envelope the Boulder area later in the evening and brought us the second significant rain in all of August.\u00a0 The storms came up almost like a bolt out of the blue. Also note in the figure the surge of moist air associated with a tropical wave moving westward into the Gulf of Mexico, which spawned <a href=\"http:\/\/nypost.com\/2016\/09\/02\/hurricane-hermine-makes-landfall-in-floridas-gulf-coast\/\">Hurricane Hermine<\/a>.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u00a9 Fernando Caracena, 2015 The Gnu Data Language (GDL) is an emulation of the commercial scripting language called IDLTM. This was my favorite software tool when I was doing weather research. The IDLTM language was developed at LASP of the &hellip; <a href=\"http:\/\/www.ghyzmo.com\/gnu-data-language-gdl\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2351","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/www.ghyzmo.com\/wp-json\/wp\/v2\/posts\/2351","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.ghyzmo.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.ghyzmo.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.ghyzmo.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.ghyzmo.com\/wp-json\/wp\/v2\/comments?post=2351"}],"version-history":[{"count":5,"href":"http:\/\/www.ghyzmo.com\/wp-json\/wp\/v2\/posts\/2351\/revisions"}],"predecessor-version":[{"id":2354,"href":"http:\/\/www.ghyzmo.com\/wp-json\/wp\/v2\/posts\/2351\/revisions\/2354"}],"wp:attachment":[{"href":"http:\/\/www.ghyzmo.com\/wp-json\/wp\/v2\/media?parent=2351"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.ghyzmo.com\/wp-json\/wp\/v2\/categories?post=2351"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.ghyzmo.com\/wp-json\/wp\/v2\/tags?post=2351"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}