Sorry to disturb you again. <br>I am not able to solve my problem till yet.<br>Since i want to study the structure of a jet stream.I am trying to find level of maximum wind.<br>At present i am able to print maximum wind speed with the help of <br>
d max(mag(u,v),lev=700,lev=1000). (Since my data is arranged in reverse order)<br><br>But i need alongwith wind speed it should print level to which maximum value corresponds.<br>Because d maxloc(mag(u,v),lev=700,lev=1000) gives location of grid to which maximum values belongs. But instead of that i need pressure level.<br>
<br>how to solve this problem.<br><br>My single file contain data of one month (in netcdf format) and data is at 6 hour interval.<br><br>If you have any solution please send me, i am trying hard for solving this particular problem. <br>
<br>Thanking you<br><br><br><br><div class="gmail_quote">On Wed, Nov 25, 2009 at 11:49 PM, Charles Seman <span dir="ltr">&lt;<a href="mailto:Charles.Seman@noaa.gov">Charles.Seman@noaa.gov</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Sushant,<br>
<br>
Sorry for not explaining further... The script is designed to plot time<br>
and zonally-averaged mass fluxes and estimated tropopause heights for<br>
two of GFDL&#39;s models, and uses GrADS ctl files to access datasets that<br>
you do not have... The datasets that are accessed are quite large (think<br>
too large to send via email).  Maybe the script could be useful to you<br>
as an example of how to do some calculations in GrADS?  What is the<br>
problem you are trying to solve?  Or what diagnostic are you trying to<br>
calculate?  If it is to find the level of maximum wind, the code (see<br>
earlier email) to find the level of minimum temperature could be<br>
modified to find the level of maximum wind (the code was offered as an<br>
example of how to use GrADS to do this class of problems and not to<br>
solve your specific problem...).<div class="im"><br>
<br>
Hope this helps,<br>
Chuck<br>
<br>
sushant puranik wrote:<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
Thank you for immediate reply i am testing those scripts. but while<br>
running the script it shows error in the information of GrADS files<br>
<br>
level_dir = &#39;/net2/cjs/ljd/lima/ch3i1/pp/atmos_level/av/monthly_16yr&#39;<br>
don_dir   = &#39;/net2/cjs/ljd/lima/ch3i1/pp/atmosdon/av/monthly_16yr&#39;<br>
ras_dir   =<br>
&#39;/net2/cjs/lwh/fms/lima/m45_am2p14_ch3i/pp/atmos_level/av/monthly_16yr&#39;<br>
<br>
sdir_months = &#39;Aug Sep&#39;<br>
month_days = &#39;31 30&#39;<br>
<br>
/home/Sushant/Desktop/level_ctl = &#39;mc.o_zl.ctl&#39; ; level_var = &#39;mc&#39;<br>
don_ctl1 = &#39;uceml_deep.o_zl.ctl&#39;  ; don_var1 = &#39;uceml_deep&#39;<br>
don_ctl2 = &#39;umeml_deep.o_zl.ctl&#39;  ; don_var2 = &#39;umeml_deep&#39;<br>
don_ctl3 = &#39;dmeml_deep.o_zl.ctl&#39;  ; don_var3 = &#39;dmeml_deep&#39;<br>
<br>
ras_ctl = &#39;mc.o_zl.ctl&#39; ; ras_var = &#39;mc&#39;<br>
<br>
temp_ctl = &#39;temp.o_zl.ctl&#39; ; temp_var = &#39;temp&#39;<br>
<br>
So can you please send me those files.<br>
<br>
Also i am using ECMWF data in the netcdf format. So there is no need<br>
to use ctl files. It is possible to run the script without using such<br>
ctl file info.<br>
<br>
Sushant<br>
<br>
<br>
On Wed, Nov 25, 2009 at 1:01 AM, Charles Seman &lt;<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a><br></div><div class="im">
&lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a>&gt;&gt; wrote:<br>
<br>
    Hi Phillip,<br>
<br></div>
    Please find attached a script &quot;<a href="http://fig3ab.gs" target="_blank">fig3ab.gs</a> &lt;<a href="http://fig3ab.gs" target="_blank">http://fig3ab.gs</a>&gt;&quot; and<div class="im"><br>
    called script functions<br>
    &quot;pause.gsf&quot; and &quot;scale_zdef_zlevs.gsf&quot;.  &quot;scale_zdef_zlevs.gsf&quot;<br>
    makes a<br>
    local (temporary) ctl file with scaled vertical levels for plotting<br>
    purposes: here specifically to convert the original zdef zlevs values<br>
    from meters to kilometers (there may be a better way to do this; maybe<br>
    using commands &quot;set ylab off&quot;, followed by &quot;set yaxis ...&quot;).  I<br>
    hope all<br></div>
    of the scripts needed for the <a href="http://fig3ab.gs" target="_blank">fig3ab.gs</a> &lt;<a href="http://fig3ab.gs" target="_blank">http://fig3ab.gs</a>&gt; script<div><div></div><div class="h5"><br>
    are attached;  if not,<br>
    please let me know.  You may have questions about these scripts;<br>
    please<br>
    contact me if you do...<br>
<br>
<br>
    Hope this helps,<br>
    Chuck<br>
<br>
    Phillip Lin wrote:<br>
<br>
        Hi Chuck,<br>
        Thanks for your dedicated input to this problem we have.<br>
        And could you be kind to send me a script you did before for<br>
        the sane or<br>
        similar question? Then, maybe it is much helpful for me to<br>
        solve this<br>
        problem!<br>
        Thanks much!<br>
        Phillip<br>
<br>
<br>
            Hi Phillip,<br>
<br>
            Sorry I didn&#39;t explain further: the code was meant as an<br>
            example of how<br>
            to find and plot extrema in a field of data.  To do the<br>
            max wind, the<br>
            code would have to be modified to search in a wind speed<br>
            field using<br>
            &quot;maxloc&quot;... and the exact code would also depend on the<br>
            domain...<br>
<br>
            Hope this helps,<br>
            Chuck<br>
<br>
            Phillip Lin wrote:<br>
<br>
                Hi Chuck,<br>
                I also met this problem. And there are something<br>
                unclear to me (only to<br>
                me!)in your last email, because:<br>
                (1) the level that has minimum temp isn&#39;t the same as<br>
                the level where<br>
                there is maximum zonal wind speed;<br>
                (2) what does the meaning of the step (3) you said;<br>
                sorry how can plot<br>
                the<br>
                values (xloc,j,yloc,j) on a (y,z)plot (this is the<br>
                cross section in the<br>
                height-latitude plane?<br>
                (3)could you be kind to tell me the basic ideas to get<br>
                the maximum jet<br>
                stream, or... this means the contours of zonal wind<br>
                speed in a specific<br>
                level as 250mb or ...?<br>
                (4)could you be kind to send me the script to do this<br>
                plotting, and data<br>
                file too for a test.<br>
                I am quite confused about this! Thank you so much in<br>
                advance!<br>
                Phillip<br>
<br>
<br>
<br>
<br>
                    Sushant,<br>
<br>
                    Here&#39;s some code that:<br>
                    1) finds the height level &quot;zmin&quot; of the minimum<br>
                    temperature<br>
                    (represented<br>
                    by variable ztav = zonal average of weighted time<br>
                    average temperature)<br>
                    at each horizontal location &quot;j&quot; in a (y,z)<br>
                    physical domain<br>
                    2) uses GrADS function &quot;gr2xy&quot;<br>
                    (<a href="http://grads.iges.org/grads/gadoc/script.html#commands" target="_blank">http://grads.iges.org/grads/gadoc/script.html#commands</a>)<br>
                    to transform<br>
                    the grid point location (j,zmin) to plot location<br>
                    (xloc.j,yloc.j)<br>
                    3) plots the values (xloc.j,yloc.j) on a (y,z) plot<br>
<br>
                       say &#39;   find and save location of minimum<br>
                    temperature...&#39;<br>
<br>
                       j=1<br>
                       while ( j &lt;= ny )<br>
                         &#39;set y &#39;j<br>
                         &#39;set gxout print&#39;<br>
                         &#39;d minloc(ztav,z=1,z=&#39;nz&#39;)&#39; ; rec3 =<br>
                    sublin(result,3) ; zmin =<br>
                    subwrd(rec3,1)<br>
                    *      say result<br>
                         say &#39;   ...j, zmin = &#39;j&#39;, &#39;zmin<br>
                         &#39;query gr2xy &#39;j&#39; &#39;zmin<br>
                         rec = sublin(result,1) ; xloc.j =<br>
                    subwrd(rec,3) ; yloc.j =<br>
                    subwrd(rec,6)<br>
                    *      say result<br>
                         say &#39;      xloc, yloc = &#39;xloc.j&#39;, &#39;yloc.j<br>
                         j=j+1<br>
                       endwhile<br>
                    ...<br>
                     if( plot_min_temp = &#39;yes&#39; )<br>
                       say &#39;   plot level of minimum temperature... &#39;<br>
                       j=1<br>
                       while ( j &lt;= ny )<br>
                         &#39;set y &#39;j<br>
                    *       say &#39;      xloc, yloc = &#39;xloc.j&#39;, &#39;yloc.j<br>
                         &#39;set line 1&#39;<br>
                         &#39;draw mark 3 &#39;xloc.j&#39; &#39;yloc.j&#39; 0.03&#39;<br>
                         j=j+1<br>
                       endwhile<br>
                     endif<br>
<br>
                    Please contact me if you have any questions about<br>
                    this code, or would<br>
                    like a script that does a plot.<br>
<br>
                    Hope this helps,<br>
                    Chuck<br>
<br>
<br>
                    sushant puranik wrote:<br>
<br>
<br>
                        Hello Sir<br>
                        I want to study the structure of a jet stream<br>
                        for that purpose i wish<br>
                        to make a plot showing maximum wind speed for<br>
                        each grid box alongwith<br>
                        the level in which the speed is maximum. Means<br>
                        it should print level<br>
                        with maximum wind speed value. I am trying to<br>
                        solve this problem since<br>
                        last 15 days but i am not able to solve it.<br>
                        Does anyone has any idea<br>
                        how i can make such plot using GrADS. I am<br>
                        using ECMWF interim<br>
                        reanalysis data for this purpose.<br>
<br>
                        Any suggestion is appreciated<br>
<br>
                        Thanking you.<br>
<br>
                        --<br>
                        Sushant Puranik<br>
                        Junior Research Fellow<br>
                        Dept. of Atmospheric &amp; Space Sciences,<br>
                        University of Pune,<br>
                        Pune-07,<br>
                        India.<br>
<br>
<br>
                    --<br>
<br>
                    Please note that <a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a><br></div></div>
                    &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a>&gt; should be<div class="im"><br>
                    considered my NOAA<br>
                    email address, not <a href="mailto:cjs@gfdl.noaa.gov" target="_blank">cjs@gfdl.noaa.gov</a><br></div>
                    &lt;mailto:<a href="mailto:cjs@gfdl.noaa.gov" target="_blank">cjs@gfdl.noaa.gov</a>&gt;.<div class="im"><br>
<br>
                    ********************************************************************<br>
                     Charles Seman<br>
                     <a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a><br></div>
                    &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a>&gt;<div class="im"><br>
                     U.S. Department of Commerce / NOAA / OAR<br>
                     Geophysical Fluid Dynamics Laboratory<br>
                    voice: (609) 452-6547<br>
                     201 Forrestal Road<br>
                     fax: (609) 987-5063<br>
                     Princeton, NJ  08540-6649<br>
                     <a href="http://www.gfdl.noaa.gov/%7Ecjs/" target="_blank">http://www.gfdl.noaa.gov/~cjs/</a><br></div>
                    &lt;<a href="http://www.gfdl.noaa.gov/%7Ecjs/" target="_blank">http://www.gfdl.noaa.gov/%7Ecjs/</a>&gt;<div class="im"><br>
                    ********************************************************************<br>
<br>
                    &quot;The contents of this message are mine personally<br>
                    and do not<br>
                    necessarily<br>
                    reflect any position of the Government or NOAA.&quot;<br>
<br>
<br>
<br>
            --<br>
<br>
            Please note that <a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a><br></div>
            &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a>&gt; should be considered my NOAA<div class="im"><br>
            email address, not <a href="mailto:cjs@gfdl.noaa.gov" target="_blank">cjs@gfdl.noaa.gov</a><br></div>
            &lt;mailto:<a href="mailto:cjs@gfdl.noaa.gov" target="_blank">cjs@gfdl.noaa.gov</a>&gt;.<br>
<br>
            ********************************************************************<br>
             Charles Seman<br>
             <a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a> &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a>&gt;<div class="im"><br>
             U.S. Department of Commerce / NOAA / OAR<br>
             Geophysical Fluid Dynamics Laboratory         voice:<br>
            (609) 452-6547<br>
             201 Forrestal Road                              fax:<br>
            (609) 987-5063<br>
             Princeton, NJ  08540-6649<br>
             <a href="http://www.gfdl.noaa.gov/%7Ecjs/" target="_blank">http://www.gfdl.noaa.gov/~cjs/</a><br></div>
            &lt;<a href="http://www.gfdl.noaa.gov/%7Ecjs/" target="_blank">http://www.gfdl.noaa.gov/%7Ecjs/</a>&gt;<div class="im"><br>
            ********************************************************************<br>
<br>
            &quot;The contents of this message are mine personally and do<br>
            not necessarily<br>
            reflect any position of the Government or NOAA.&quot;<br>
<br>
<br>
<br>
    --<br>
<br>
    Please note that <a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a><br></div>
    &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a>&gt; should be considered my NOAA<br>
    email address, not <a href="mailto:cjs@gfdl.noaa.gov" target="_blank">cjs@gfdl.noaa.gov</a> &lt;mailto:<a href="mailto:cjs@gfdl.noaa.gov" target="_blank">cjs@gfdl.noaa.gov</a>&gt;.<br>
<br>
    ********************************************************************<br>
    Charles Seman<br>
     <a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a> &lt;mailto:<a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a>&gt;<div class="im"><br>
    U.S. Department of Commerce / NOAA / OAR<br>
    Geophysical Fluid Dynamics Laboratory         voice: (609) 452-6547<br>
    201 Forrestal Road                              fax: (609) 987-5063<br>
    Princeton, NJ  08540-6649<br></div>
     <a href="http://www.gfdl.noaa.gov/%7Ecjs/" target="_blank">http://www.gfdl.noaa.gov/~cjs/</a> &lt;<a href="http://www.gfdl.noaa.gov/%7Ecjs/" target="_blank">http://www.gfdl.noaa.gov/%7Ecjs/</a>&gt;<div><div></div><div class="h5">
<br>
    ********************************************************************<br>
<br>
    &quot;The contents of this message are mine personally and do not<br>
    necessarily<br>
    reflect any position of the Government or NOAA.&quot;<br>
<br>
<br>
    ************************************************************************<br>
    *<br>
    *  To use:  &quot;grads -p&quot;<br>
    *<br>
    *  Script calculates and plots zonally averaged cross-sections of the<br>
    *  time averaged height interpolated &quot;mass flux&quot; from the GrADS files<br>
    *  specified below (with an option to overlay the level of minimum<br>
    *  temperature):<br>
    *<br>
    ************************************************************************<br>
    function mass_flux (args)<br>
<br>
    &#39;reinit&#39;<br>
<br>
    ************************************************************************<br>
    *  Allow external GrADS functions<br>
    ************************************************************************<br>
<br>
    rc = gsfallow(&quot;on&quot;)<br>
<br>
    ************************************************************************<br>
    *  Pause between plots?<br>
    ************************************************************************<br>
<br>
    do_pause = &#39;no&#39;<br>
<br>
    ************************************************************************<br>
    *  GrADS meta file output?<br>
    ************************************************************************<br>
<br>
    do_print = &#39;yes&#39;<br>
<br>
    ************************************************************************<br>
    *  Information for GrADS files<br>
    ************************************************************************<br>
<br>
    level_dir = &#39;/net2/cjs/ljd/lima/ch3i1/pp/atmos_level/av/monthly_16yr&#39;<br>
    don_dir   = &#39;/net2/cjs/ljd/lima/ch3i1/pp/atmosdon/av/monthly_16yr&#39;<br>
    ras_dir   =<br>
    &#39;/net2/cjs/lwh/fms/lima/m45_am2p14_ch3i/pp/atmos_level/av/monthly_16yr&#39;<br>
<br>
    sdir_months = &#39;Aug Sep&#39;<br>
    month_days = &#39;31 30&#39;<br>
<br>
    level_ctl = &#39;mc.o_zl.ctl&#39; ; level_var = &#39;mc&#39;<br>
    don_ctl1 = &#39;uceml_deep.o_zl.ctl&#39;  ; don_var1 = &#39;uceml_deep&#39;<br>
    don_ctl2 = &#39;umeml_deep.o_zl.ctl&#39;  ; don_var2 = &#39;umeml_deep&#39;<br>
    don_ctl3 = &#39;dmeml_deep.o_zl.ctl&#39;  ; don_var3 = &#39;dmeml_deep&#39;<br>
<br>
    ras_ctl = &#39;mc.o_zl.ctl&#39; ; ras_var = &#39;mc&#39;<br>
<br>
    temp_ctl = &#39;temp.o_zl.ctl&#39; ; temp_var = &#39;temp&#39;<br>
<br>
    ************************************************************************<br>
    *  Information for the plots<br>
    ************************************************************************<br>
<br>
    plot_min_max = &#39;no&#39;<br>
    *<br>
    *  Mass flux variable scale and units<br>
    *<br>
    var_scale = 1000<br>
    var_units = &#39;(g m`a-2`n s`a-1`n)&#39;<br>
    *<br>
    *  Height levels (scale GrADS ctl file levels from &quot;m&quot; to &quot;km&quot;)<br>
    *<br>
    zscale = 1./1000.<br>
    zlevs = &#39;0 18&#39;<br>
    ylabel_int = 2<br>
    ylabel = &#39;Height (km)&#39;<br>
    *<br>
    *  Define the contour levels...<br>
    *<br>
    *contour_levels = &#39;1 3 5 7 9 11 13&#39;<br>
    *contour_levels = &#39;0 2 4 6 8 10 12 14 16&#39;<br>
    contour_levels = &#39;0 0.01 0.1 1 3 5 7 10 15&#39;<br>
    *<br>
    *  Plot level of minimum temperature?<br>
    *<br>
    plot_min_temp = &#39;yes&#39;<br>
<br>
    ************************************************************************<br>
    *  Plot variables&#39; page limits<br>
    ************************************************************************<br>
<br>
    pvar_vpage.1 = &#39;0 8.5 4.8 9.3&#39;<br>
    pvar_vpage.2 = &#39;0 8.5 0.3 4.8&#39;<br>
    pvar_parea   = &#39;1 7.0 0.5 4.0&#39;<br>
<br>
    xl_pvar_parea = subwrd(pvar_parea,1)<br>
    yt_pvar_parea = subwrd(pvar_parea,4)<br>
<br>
    ************************************************************************<br>
    *  Title information for the plots<br>
    ************************************************************************<br>
<br>
    mod_title = &#39;FMS lima 1983-1998&#39;<br>
    var_title = &#39;Mass Flux &#39;var_units<br>
    avg_title = &#39;Zonal average of weighted time average&#39;<br>
<br>
    figure_panel.1 = &#39;(a)&#39; ; model.1 = &#39;AM2-D&#39;<br>
    figure_panel.2 = &#39;(b)&#39; ; model.2 = &#39;AM2&#39;<br>
    *<br>
    *  Define names for the &quot;sdir_months&quot; subdirectories...<br>
    *<br>
    define_months()<br>
<br>
    ************************************************************************<br>
    *  GrADS metafile for output<br>
    ************************************************************************<br>
<br>
    if( do_print = &#39;yes&#39; )<br>
     &#39;enable print fig3ab.gx&#39;<br>
    endif<br>
<br>
    *-----------------------------------------------------------------------<br>
    *  Determine number of months to average...<br>
    *-----------------------------------------------------------------------<br>
<br>
    n=1<br>
    month = subwrd(sdir_months,n)<br>
    if( month = &#39;&#39; )<br>
     say<br>
     say &#39;No months specified in variable &quot;sdir_months&quot;...&#39;<br>
     say &#39;Exiting script&#39;<br>
     say<br>
     exit<br>
    else<br>
     while ( month != &#39;&#39; )<br>
       n=n+1<br>
       month = subwrd(sdir_months,n)<br>
     endwhile<br>
     nmonths=n-1<br>
    endif<br>
<br>
    first = subwrd(sdir_months,1) ; last = subwrd(sdir_months,nmonths)<br>
    months = &#39;&#39;_name.first&#39;-&#39;_name.last&#39;&#39;<br>
<br>
    *-----------------------------------------------------------------------<br>
    *  Verify height levels...<br>
    *-----------------------------------------------------------------------<br>
<br>
    l=1<br>
    zlv.l = subwrd(zlevs,l)<br>
    if( zlv.l = &#39;&#39; )<br>
     say<br>
     say &#39;No pressure levels specified in variable &quot;zlevs&quot;...&#39;<br>
     say &#39;Exiting script&#39;<br>
     say<br>
     exit<br>
    else<br>
     while ( zlv.l != &#39;&#39; )<br>
       l=l+1<br>
       zlv.l = subwrd(zlevs,l)<br>
     endwhile<br>
     nl = l-1<br>
     if( nl &gt; 2 )<br>
       say<br>
       say &#39;More than two height levels (&quot;nl&quot; = &#39;nl&#39;) specified in<br>
    variable &quot;zlevs&quot;...&#39;<br>
       say &#39;Exiting script&#39;<br>
       say<br>
       exit<br>
     else<br>
       if( zlv.2 &lt;= zlv.1 )<br>
         say<br>
         say &#39;Height level &quot;2&quot; (= &#39;zlv.2&#39;) not greater than height<br>
    level &quot;1&quot; (= &#39;plv.1&#39;)...&#39;<br>
         say &#39;Exiting script&#39;<br>
         say<br>
         exit<br>
       endif<br>
     endif<br>
    endif<br>
<br>
    say<br>
    say<br>
    &#39;------------------------------------------------------------------&#39;<br>
    say &#39;Calculate zonal averages of weighted time average &quot;mass<br>
    fluxes&quot;...&#39;<br>
    say<br>
    &#39;------------------------------------------------------------------&#39;<br>
    say<br>
    say &#39;Initialize time sum variables for time average...&#39;<br>
    say<br>
    *<br>
    *  Use GrADS ctl files for the first &quot;month&quot; to define time sum<br>
    variables...<br>
    *<br>
    month1 = subwrd(sdir_months,1)<br>
    say<br>
    say &#39;--------------------&#39;<br>
    say &#39;Model: &#39;model.1<br>
    say &#39;--------------------&#39;<br>
    say<br>
<br>
    ctl_file = &#39;&#39;level_dir&#39;/&#39;month1&#39;/&#39;level_ctl<br>
    *<br>
    *  Make local ctl file with scaled vertical levels...<br>
    *<br>
    ctl_file_scale = &#39;mass_flux.scale.ctl&#39;<br>
    scale_zdef_zlevs(ctl_file,zscale,ctl_file_scale)<br>
<br>
    say &#39;Open GrADS file:&#39;<br>
    say &#39;...&#39;ctl_file_scale<br>
    &#39;open &#39;ctl_file_scale<br>
<br>
    &#39;query file&#39;<br>
    rec5 = sublin(result,5)<br>
    nx = subwrd(rec5,3) ; ny = subwrd(rec5,6) ; nz = subwrd(rec5,9)<br>
    &#39;set x 1 &#39;nx<br>
    &#39;set y 1 &#39;ny<br>
    &#39;set z 1 &#39;nz<br>
    &#39;set t 1&#39;<br>
    say &#39;   initialize: wtsum1m&#39;<br>
    &#39;define wtsum1m = const(&#39;level_var&#39;,0,-a)&#39;<br>
    &#39;close 1&#39;<br>
    &#39;!rm &#39;ctl_file_scale<br>
<br>
    if( plot_min_temp = &#39;yes&#39; )<br>
    *<br>
    *  Make local ctl file with scaled vertical levels...<br>
    *<br>
     ctl_file = &#39;&#39;level_dir&#39;/&#39;month1&#39;/&#39;temp_ctl<br>
     ctl_file_scale = &#39;temp.scale.ctl&#39;<br>
     scale_zdef_zlevs(ctl_file,zscale,ctl_file_scale)<br>
<br>
     say &#39;Open GrADS file:&#39;<br>
     say &#39;...&#39;ctl_file_scale<br>
     &#39;open &#39;ctl_file_scale<br>
     &#39;query file&#39;<br>
     rec5 = sublin(result,5)<br>
     nxt = subwrd(rec5,3) ; nyt = subwrd(rec5,6) ; nzt = subwrd(rec5,9)<br>
     if( nxt != nx )<br>
       say &#39;...nxt = &#39;nxt<br>
       say &#39;...nx  = &#39;nx<br>
       exit<br>
     endif<br>
     if( nyt != ny )<br>
       say &#39;...nyt = &#39;nyt<br>
       say &#39;...ny  = &#39;ny<br>
       exit<br>
     endif<br>
     if( nzt != nz )<br>
       say &#39;...nzt = &#39;nzt<br>
       say &#39;...nz  = &#39;nz<br>
       exit<br>
     endif<br>
     &#39;set x 1 &#39;nx<br>
     &#39;set y 1 &#39;ny<br>
     &#39;set z 1 &#39;nz<br>
     &#39;set t 1&#39;<br>
     say &#39;   initialize: wtsum1t&#39;<br>
     &#39;define wtsum1t = const(&#39;temp_var&#39;,0,-a)&#39;<br>
     &#39;close 1&#39;<br>
     &#39;!rm &#39;ctl_file_scale<br>
    endif<br>
<br>
    say<br>
    say &#39;--------------------&#39;<br>
    say &#39;Model: &#39;model.2<br>
    say &#39;--------------------&#39;<br>
    say<br>
<br>
    ctl_file = &#39;&#39;ras_dir&#39;/&#39;month1&#39;/&#39;ras_ctl<br>
    *<br>
    *  Make local ctl file with scaled vertical levels...<br>
    *<br>
    ctl_file_scale = &#39;mass_flux.scale.ctl&#39;<br>
    scale_zdef_zlevs(ctl_file,zscale,ctl_file_scale)<br>
<br>
    say &#39;Open GrADS file:&#39;<br>
    say &#39;...&#39;ctl_file_scale<br>
    &#39;open &#39;ctl_file_scale<br>
    &#39;query file&#39;<br>
    rec5 = sublin(result,5)<br>
    nx = subwrd(rec5,3) ; ny = subwrd(rec5,6) ; nz = subwrd(rec5,9)<br>
    &#39;set x 1 &#39;nx<br>
    &#39;set y 1 &#39;ny<br>
    &#39;set z 1 &#39;nz<br>
    &#39;set t 1&#39;<br>
    say &#39;   initialize: wtsum2m&#39;<br>
    &#39;define wtsum2m = const(&#39;ras_var&#39;,0,-a)&#39;<br>
    &#39;close 1&#39;<br>
    &#39;!rm &#39;ctl_file_scale<br>
<br>
    if( plot_min_temp = &#39;yes&#39; )<br>
    *<br>
    *  Make local ctl file with scaled vertical levels...<br>
    *<br>
     ctl_file = &#39;&#39;ras_dir&#39;/&#39;month1&#39;/&#39;temp_ctl<br>
     ctl_file_scale = &#39;temp.scale.ctl&#39;<br>
     scale_zdef_zlevs(ctl_file,zscale,ctl_file_scale)<br>
<br>
     say &#39;Open GrADS file:&#39;<br>
     say &#39;...&#39;ctl_file_scale<br>
     &#39;open &#39;ctl_file_scale<br>
     &#39;query file&#39;<br>
     rec5 = sublin(result,5)<br>
     nxt = subwrd(rec5,3) ; nyt = subwrd(rec5,6) ; nzt = subwrd(rec5,9)<br>
     if( nxt != nx )<br>
       say &#39;...nxt = &#39;nxt<br>
       say &#39;...nx  = &#39;nx<br>
       exit<br>
     endif<br>
     if( nyt != ny )<br>
       say &#39;...nyt = &#39;nyt<br>
       say &#39;...ny  = &#39;ny<br>
       exit<br>
     endif<br>
     if( nzt != nz )<br>
       say &#39;...nzt = &#39;nzt<br>
       say &#39;...nz  = &#39;nz<br>
       exit<br>
     endif<br>
     &#39;set x 1 &#39;nx<br>
     &#39;set y 1 &#39;ny<br>
     &#39;set z 1 &#39;nz<br>
     &#39;set t 1&#39;<br>
     say &#39;   initialize: wtsum2t&#39;<br>
     &#39;define wtsum2t = const(&#39;temp_var&#39;,0,-a)&#39;<br>
     &#39;close 1&#39;<br>
     &#39;!rm &#39;ctl_file_scale<br>
    endif<br>
<br>
    if( do_pause = &#39;yes&#39; )<br>
     pause()<br>
    endif<br>
    *<br>
    *  Calculate running time sum variables for &quot;mass flux&quot; variable...<br>
    *<br>
    n=1<br>
    ndays=0<br>
    *-----------------------------------------------------------------------<br>
    while ( n &lt;= nmonths )<br>
    *-----------------------------------------------------------------------<br>
    *<br>
    *  Name of the month...<br>
    *<br>
     month = subwrd(sdir_months,n)<br>
    *<br>
    *  Days in the month...<br>
    *<br>
     days = subwrd(month_days,n)<br>
<br>
     say<br>
     say &#39;------------------------&#39;<br>
     say &#39;Month = &#39;month&#39;, days = &#39;days<br>
     say &#39;------------------------&#39;<br>
     say<br>
     say<br>
     say &#39;--------------------&#39;<br>
     say &#39;Model: &#39;model.1<br>
     say &#39;--------------------&#39;<br>
     say<br>
<br>
     ctl_file.1 = &#39;&#39;level_dir&#39;/&#39;month&#39;/&#39;level_ctl<br>
     ctl_file.2 = &#39;&#39;don_dir&#39;/&#39;month&#39;/&#39;don_ctl1<br>
     ctl_file.3 = &#39;&#39;don_dir&#39;/&#39;month&#39;/&#39;don_ctl2<br>
     ctl_file.4 = &#39;&#39;don_dir&#39;/&#39;month&#39;/&#39;don_ctl3<br>
    *<br>
    *  Make local ctl files with scaled vertical levels...<br>
    *<br>
     ctl_file_scale.1 = &#39;mass_flux.1.scale.ctl&#39;<br>
     scale_zdef_zlevs(ctl_file.1,zscale,ctl_file_scale.1)<br>
     ctl_file_scale.2 = &#39;mass_flux.2.scale.ctl&#39;<br>
     scale_zdef_zlevs(ctl_file.2,zscale,ctl_file_scale.2)<br>
     ctl_file_scale.3 = &#39;mass_flux.3.scale.ctl&#39;<br>
     scale_zdef_zlevs(ctl_file.3,zscale,ctl_file_scale.3)<br>
     ctl_file_scale.4 = &#39;mass_flux.4.scale.ctl&#39;<br>
     scale_zdef_zlevs(ctl_file.4,zscale,ctl_file_scale.4)<br>
<br>
     say &#39;Open GrADS file 1:&#39;<br>
     say &#39;...&#39;ctl_file_scale.1<br>
     &#39;open &#39;ctl_file_scale.1<br>
     say &#39;Open GrADS file 2:&#39;<br>
     say &#39;...&#39;ctl_file_scale.2<br>
     &#39;open &#39;ctl_file_scale.2<br>
     say &#39;Open GrADS file 3:&#39;<br>
     say &#39;...&#39;ctl_file_scale.3<br>
     &#39;open &#39;ctl_file_scale.3<br>
     say &#39;Open GrADS file 4:&#39;<br>
     say &#39;...&#39;ctl_file_scale.4<br>
     &#39;open &#39;ctl_file_scale.4<br>
     say &#39;GrADS files ready&#39;<br>
<br>
     say<br>
     say &#39;   calculate weighted (using days = &#39;days&#39;) &quot;mass flux&quot; time<br>
    sum&#39;<br>
     say &#39;     (&#39;level_var&#39;.1+&#39;don_var1&#39;.2+&#39;don_var2&#39;.3+&#39;don_var3&#39;.4)&#39;<br>
     say &#39;   for current month and add it to the time sum variable...&#39;<br>
     say<br>
     &#39;set dfile 1&#39;<br>
     &#39;set x 1 &#39;nx<br>
     &#39;set y 1 &#39;ny<br>
     &#39;set z 1 &#39;nz<br>
     &#39;set t 1&#39;<br>
     &#39;define wtsum1m = wtsum1m +<br>
    &#39;days&#39;*(&#39;level_var&#39;.1+&#39;don_var1&#39;.2+&#39;don_var2&#39;.3+&#39;don_var3&#39;.4)&#39;<br>
<br>
     &#39;close 4&#39; ; &#39;close 3&#39; ; &#39;close 2&#39; ; &#39;close 1&#39;<br>
     &#39;!rm &#39;ctl_file_scale.1<br>
     &#39;!rm &#39;ctl_file_scale.2<br>
     &#39;!rm &#39;ctl_file_scale.3<br>
     &#39;!rm &#39;ctl_file_scale.4<br>
<br>
     if( plot_min_temp = &#39;yes&#39; )<br>
<br>
       ctl_file = &#39;&#39;level_dir&#39;/&#39;month&#39;/&#39;temp_ctl<br>
    *<br>
    *  Make local ctl file with scaled vertical levels...<br>
    *<br>
       ctl_file_scale = &#39;temp.scale.ctl&#39;<br>
       scale_zdef_zlevs(ctl_file,zscale,ctl_file_scale)<br>
<br>
       say &#39;Open GrADS file:&#39;<br>
       say &#39;...&#39;ctl_file_scale<br>
       &#39;open &#39;ctl_file_scale<br>
       say &#39;GrADS file ready&#39;<br>
       say<br>
       say &#39;   calculate weighted (using days = &#39;days&#39;) temperature<br>
    time sum&#39;<br>
       say &#39;   for current month and add it to the time sum variable...&#39;<br>
       say<br>
<br>
       &#39;set x 1 &#39;nx<br>
       &#39;set y 1 &#39;ny<br>
       &#39;set z 1 &#39;nz<br>
       &#39;set t 1&#39;<br>
       &#39;define wtsum1t = wtsum1t + &#39;days&#39;*&#39;temp_var<br>
<br>
       &#39;close 1&#39;<br>
       &#39;!rm &#39;ctl_file_scale<br>
<br>
     endif<br>
<br>
     say<br>
     say &#39;--------------------&#39;<br>
     say &#39;Model: &#39;model.2<br>
     say &#39;--------------------&#39;<br>
     say<br>
<br>
     ctl_file = &#39;&#39;ras_dir&#39;/&#39;month&#39;/&#39;ras_ctl<br>
    *<br>
    *  Make local ctl file with scaled vertical levels...<br>
    *<br>
     ctl_file_scale = &#39;mass_flux.scale.ctl&#39;<br>
     scale_zdef_zlevs(ctl_file,zscale,ctl_file_scale)<br>
<br>
     say &#39;Open GrADS file:&#39;<br>
     say &#39;...&#39;ctl_file_scale<br>
     &#39;open &#39;ctl_file_scale<br>
     say &#39;GrADS file ready&#39;<br>
<br>
     say<br>
     say &#39;   calculate weighted (using days = &#39;days&#39;) &quot;mass flux&quot; time<br>
    sum&#39;<br>
     say &#39;     (&#39;ras_var&#39;.1)&#39;<br>
     say &#39;   for current month and add it to the time sum variable...&#39;<br>
     say<br>
     &#39;query file&#39;<br>
     rec5 = sublin(result,5)<br>
     nx = subwrd(rec5,3) ; ny = subwrd(rec5,6) ; nz = subwrd(rec5,9)<br>
     &#39;set x 1 &#39;nx<br>
     &#39;set y 1 &#39;ny<br>
     &#39;set z 1 &#39;nz<br>
     &#39;set t 1&#39;<br>
     &#39;define wtsum2m = wtsum2m + &#39;days&#39;*&#39;ras_var<br>
<br>
     &#39;close 1&#39;<br>
     &#39;!rm &#39;ctl_file_scale<br>
<br>
     if( plot_min_temp = &#39;yes&#39; )<br>
<br>
       ctl_file = &#39;&#39;ras_dir&#39;/&#39;month&#39;/&#39;temp_ctl<br>
    *<br>
    *  Make local ctl file with scaled vertical levels...<br>
    *<br>
       ctl_file_scale = &#39;temp.scale.ctl&#39;<br>
       scale_zdef_zlevs(ctl_file,zscale,ctl_file_scale)<br>
<br>
       say &#39;Open GrADS file:&#39;<br>
       say &#39;...&#39;ctl_file_scale<br>
       &#39;open &#39;ctl_file_scale<br>
       say &#39;GrADS file ready&#39;<br>
       say<br>
       say &#39;   calculate weighted (using days = &#39;days&#39;) temperature<br>
    time sum&#39;<br>
       say &#39;   for current month and add it to the time sum variable...&#39;<br>
       say<br>
<br>
       &#39;set x 1 &#39;nx<br>
       &#39;set y 1 &#39;ny<br>
       &#39;set z 1 &#39;nz<br>
       &#39;set t 1&#39;<br>
       &#39;define wtsum2t = wtsum2t + &#39;days&#39;*&#39;temp_var<br>
<br>
       &#39;close 1&#39;<br>
       &#39;!rm &#39;ctl_file_scale<br>
<br>
     endif<br>
<br>
     say<br>
     say &#39;...finished month&#39;<br>
     say<br>
<br>
     if( do_pause = &#39;yes&#39; )<br>
       pause()<br>
     endif<br>
<br>
     n=n+1<br>
     ndays=ndays+days<br>
    *-----------------------------------------------------------------------<br>
    endwhile<br>
    *-----------------------------------------------------------------------<br>
    say<br>
    say &#39;---------------------------&#39;<br>
    say &#39;Finished weighted time sums&#39;<br>
    say &#39;---------------------------&#39;<br>
    say<br>
    say<br>
    say<br>
    &#39;------------------------------------------------------------------&#39;<br>
    say &#39;Calculate zonal averages of the weighted time averages&#39;<br>
    say &#39;of the weighted time sums, and plot the data...&#39;<br>
    say<br>
    &#39;------------------------------------------------------------------&#39;<br>
    say<br>
    say &#39;Use GrADS ctl files for the first &quot;month&quot; to define time<br>
    averaged variables for plotting...&#39;<br>
    *<br>
    *  Model #1<br>
    *<br>
    ctl_file.1      = &#39;&#39;level_dir&#39;/&#39;month1&#39;/&#39;level_ctl<br>
    ctl_file_temp.1 = &#39;&#39;level_dir&#39;/&#39;month1&#39;/&#39;temp_ctl<br>
    *<br>
    *  Model #2<br>
    *<br>
    ctl_file.2      = &#39;&#39;ras_dir&#39;/&#39;month1&#39;/&#39;ras_ctl<br>
    ctl_file_temp.2 = &#39;&#39;ras_dir&#39;/&#39;month1&#39;/&#39;temp_ctl<br>
    *<br>
    *  Initialize min/max variables...<br>
    *<br>
    min = 1e6 ; max = -1e6<br>
    *<br>
    *  Start a new frame, and plot a title at top of page...<br>
    *<br>
    ptitle_top(var_title,avg_title,months,pvar_parea)<br>
<br>
    m=1<br>
    while ( m &lt;= 2 )<br>
<br>
     say<br>
     say &#39;--------------------&#39;<br>
     say &#39;Model: &#39;model.m<br>
     say &#39;--------------------&#39;<br>
     say<br>
<br>
     if( plot_min_temp = &#39;yes&#39; )<br>
       say<br>
       say &#39;Find and save level of minimum temperature for the&#39;<br>
       say &#39;zonal and weighted time average temperature...&#39;<br>
       say<br>
    *<br>
    *  Make local ctl file with scaled vertical levels...<br>
    *<br>
       ctl_file_scale = &#39;temp.scale.ctl&#39;<br>
       scale_zdef_zlevs(ctl_file_temp.m,zscale,ctl_file_scale)<br>
<br>
       say &#39;Open GrADS file:&#39;<br>
       say &#39;...&#39;ctl_file_scale<br>
       &#39;open &#39;ctl_file_scale<br>
       say &#39;GrADS file ready&#39;<br>
       say<br>
       &#39;query file&#39;<br>
       rec5 = sublin(result,5)<br>
       nx = subwrd(rec5,3) ; ny = subwrd(rec5,6) ; nz = subwrd(rec5,9)<br>
<br>
       say &#39;   calculate weighted time average (using ndays = &#39;ndays&#39;)...&#39;<br>
<br>
       &#39;set x 1 &#39;nx<br>
       &#39;set y 1 &#39;ny<br>
       &#39;set z 1 &#39;nz<br>
       &#39;set t 1&#39;<br>
       &#39;define tav = wtsum&#39;m&#39;t/&#39;ndays<br>
<br>
       say &#39;   calculate zonal averages of the weighted time average...&#39;<br>
<br>
       &#39;set x 1&#39;<br>
       &#39;set y 1 &#39;ny<br>
       &#39;set z 1 &#39;nz<br>
       &#39;set t 1&#39;<br>
       &#39;define ztav = ave(tav,x=1,x=&#39;nx&#39;)&#39;<br>
<br>
       say &#39;   plot zonal average of the weighted time average...&#39;<br>
<br>
       &#39;set vpage &#39;pvar_vpage.m<br>
       &#39;set parea &#39;pvar_parea<br>
       &#39;set grads off&#39;<br>
       &#39;set gxout contour&#39;<br>
       &#39;set clab off&#39;<br>
       &#39;set ccolor 0&#39;<br>
       &#39;set xlab off&#39;<br>
       &#39;set ylab off&#39;<br>
       &#39;d ztav&#39;<br>
<br>
       say &#39;   find and save location of minimum temperature...&#39;<br>
<br>
       j=1<br>
       while ( j &lt;= ny )<br>
         &#39;set y &#39;j<br>
         &#39;set gxout print&#39;<br>
         &#39;d minloc(ztav,z=1,z=&#39;nz&#39;)&#39; ; rec3 = sublin(result,3) ; zmin<br>
    = subwrd(rec3,1)<br>
    *      say result<br>
         say &#39;   ...j, zmin = &#39;j&#39;, &#39;zmin<br>
         &#39;query gr2xy &#39;j&#39; &#39;zmin<br>
         rec = sublin(result,1) ; xloc.j = subwrd(rec,3) ; yloc.j =<br>
    subwrd(rec,6)<br>
    *      say result<br>
         say &#39;      xloc, yloc = &#39;xloc.j&#39;, &#39;yloc.j<br>
         j=j+1<br>
       endwhile<br>
<br>
       &#39;undefine wtsum&#39;m&#39;t&#39; ; &#39;undefine tav&#39; ; &#39;undefine ztav&#39;<br>
       &#39;close 1&#39;<br>
       &#39;!rm &#39;ctl_file_scale<br>
<br>
     endif<br>
<br>
     say<br>
     say &#39;Calculate and plot zonally averaged &quot;mass flux&quot;...&#39;<br>
     say<br>
    *<br>
    *  Make local ctl file with scaled vertical levels...<br>
    *<br>
     ctl_file_scale = &#39;mass_flux.scale.ctl&#39;<br>
     scale_zdef_zlevs(ctl_file.m,zscale,ctl_file_scale)<br>
<br>
     say &#39;Open GrADS file:&#39;<br>
     say &#39;...&#39;ctl_file_scale<br>
     &#39;open &#39;ctl_file_scale<br>
     say &#39;GrADS file ready&#39;<br>
     say<br>
     say<br>
     &#39;query file&#39;<br>
     rec5 = sublin(result,5)<br>
     nx = subwrd(rec5,3) ; ny = subwrd(rec5,6) ; nz = subwrd(rec5,9)<br>
<br>
     say &#39;   calculate weighted &quot;mass flux&quot; time average (using ndays<br>
    = &#39;ndays&#39;)&#39;<br>
<br>
     &#39;set x 1 &#39;nx<br>
     &#39;set y 1 &#39;ny<br>
     &#39;set z 1 &#39;nz<br>
     &#39;set t 1&#39;<br>
     &#39;define tav = wtsum&#39;m&#39;m/&#39;ndays<br>
<br>
     say &#39;   calculate zonal averages of the weighted time average...&#39;<br>
<br>
     &#39;set x 1&#39;<br>
     &#39;set y 1 &#39;ny<br>
     &#39;set z 1 &#39;nz<br>
     &#39;set t 1&#39;<br>
     &#39;define ztav = &#39;var_scale&#39;*ave(tav,x=1,x=&#39;nx&#39;)&#39;<br>
<br>
     say &#39;   plot zonal averages of time averaged &quot;mass flux&quot;&#39;<br>
     &#39;set vpage &#39;pvar_vpage.m<br>
     &#39;set parea &#39;pvar_parea<br>
     &#39;set grads off&#39;<br>
     &#39;set clevs &#39;contour_levels<br>
     &#39;set gxout shaded&#39;<br>
     &#39;set xlab on&#39;<br>
     &#39;set ylab on&#39;<br>
     &#39;set ylint &#39;ylabel_int<br>
     &#39;set x 1&#39;<br>
     &#39;set y 1 &#39;ny<br>
     &#39;set lev &#39;zlevs<br>
     &#39;set t 1&#39;<br>
     &#39;d ztav&#39;<br></div></div>
     &#39;run <a href="http://cbar.gs" target="_blank">cbar.gs</a> &lt;<a href="http://cbar.gs" target="_blank">http://cbar.gs</a>&gt; 0.7&#39;<div><div></div><div class="h5"><br>
     &#39;draw title \\\ &#39;model.m<br>
    *  &#39;draw xlab Latitude \\\&#39;<br>
     &#39;draw ylab \\\ &#39;ylabel<br>
     xfp = xl_pvar_parea + 0.1<br>
     yfp = yt_pvar_parea + 0.2<br>
     &#39;set string 1 l 6&#39;<br>
     &#39;set strsiz 0.13&#39;<br>
     &#39;draw string &#39;xfp&#39; &#39;yfp&#39; &#39;figure_panel.m<br>
     &#39;set gxout stat&#39;<br>
     &#39;d ztav&#39;<br>
     min_max = sublin(result,8)<br>
     say &#39;   &#39;min_max<br>
     min = subwrd(min_max,4)<br>
     max = subwrd(min_max,5)<br>
     if( plot_min_max = &#39;yes&#39; )<br>
       xmm = xl_pvar_parea + 0.1<br>
       ymm = yt_pvar_parea - 0.1<br>
       &#39;set string 1 l 4&#39;<br>
       &#39;set strsiz 0.08&#39;<br>
       &#39;draw string &#39;xmm&#39; &#39;ymm&#39; &#39;min_max&#39; &#39;<br>
     endif<br>
<br>
     if( plot_min_temp = &#39;yes&#39; )<br>
       say &#39;   plot level of minimum temperature... &#39;<br>
       j=1<br>
       while ( j &lt;= ny )<br>
         &#39;set y &#39;j<br>
    *       say &#39;      xloc, yloc = &#39;xloc.j&#39;, &#39;yloc.j<br>
         &#39;set line 1&#39;<br>
         &#39;draw mark 3 &#39;xloc.j&#39; &#39;yloc.j&#39; 0.03&#39;<br>
         j=j+1<br>
       endwhile<br>
     endif<br>
<br>
     &#39;undefine wtsum&#39;m&#39;m&#39; ; &#39;undefine tav&#39; ; &#39;undefine ztav&#39;<br>
     &#39;close 1&#39;<br>
     &#39;!rm &#39;ctl_file_scale<br>
<br>
     say<br>
     say &#39;...finished plot for: &#39;model.m<br>
     say<br>
     m=m+1<br>
    endwhile<br>
<br>
    say<br>
    say &#39;--------------&#39;<br>
    say &#39;Finished plots&#39;<br>
    say &#39;--------------&#39;<br>
    say<br>
<br>
    if( do_print = &#39;yes&#39; )<br>
     &#39;print&#39;<br>
     &#39;disable print&#39;<br>
    endif<br>
<br>
    say<br>
    say &#39;--------------------------&#39;<br>
    say &#39;&quot;Mass flux&quot; min/max values&#39;<br>
    say &#39;--------------------------&#39;<br>
    say<br>
    say &#39;min = &#39;min&#39;  max = &#39;max<br>
<br>
    say<br>
    say &#39;************************************************&#39;<br>
    say &#39; Finished with this script.&#39;<br>
    say &#39;************************************************&#39;<br>
    say<br>
<br>
    if( batch_mode = &#39;yes&#39; )<br>
     quit<br>
    endif<br>
<br>
    return<br>
<br>
    ************************************************************************<br>
    *<br>
    function define_months()<br>
    *<br>
    * Define &quot;names&quot; for all months...<br>
    *<br>
    _name.Jan = &#39;January&#39;<br>
    _name.Feb = &#39;February&#39;<br>
    _name.Mar = &#39;March&#39;<br>
    _name.Apr = &#39;April&#39;<br>
    _name.May = &#39;May&#39;<br>
    _name.Jun = &#39;June&#39;<br>
    _name.Jul = &#39;July&#39;<br>
    _name.Aug = &#39;August&#39;<br>
    _name.Sep = &#39;September&#39;<br>
    _name.Oct = &#39;October&#39;<br>
    _name.Nov = &#39;November&#39;<br>
    _name.Dec = &#39;December&#39;<br>
    *<br>
    return<br>
    *<br>
    ************************************************************************<br>
<br>
    ************************************************************************<br>
    *<br>
    function ptitle_top(title,subtitle,months,plim)<br>
    *<br>
    * Plots a title at the top of the page<br>
    *<br>
    x1 = subwrd(plim,1)<br>
    x2 = subwrd(plim,2)<br>
    xc = x1 + (x2-x1)/2<br>
    &#39;c&#39;<br>
    &#39;set vpage 0 8.5 0 11&#39;<br>
    &#39;set string 1 c 6&#39;<br>
    &#39;set strsiz 0.14&#39;<br>
    &#39;draw string &#39;xc&#39; 10.2 &#39;title<br>
    *&#39;draw string &#39;xc&#39; 10.2 &#39;subtitle<br>
    &#39;draw string &#39;xc&#39;  9.8 &#39;months<br>
    *<br>
    return<br>
    *<br>
    ************************************************************************<br>
<br>
<br>
<br>
<br>
--<br>
Sushant Puranik<br>
Junior Research Fellow<br>
Dept. of Atmospheric &amp; Space Sciences,<br>
University of Pune,<br>
Pune-07,<br>
India.<br>
</div></div></blockquote>
<br><div><div></div><div class="h5">
--<br>
<br>
Please note that <a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a> should be considered my NOAA<br>
email address, not <a href="mailto:cjs@gfdl.noaa.gov" target="_blank">cjs@gfdl.noaa.gov</a>.<br>
<br>
********************************************************************<br>
Charles Seman                                <a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a><br>
U.S. Department of Commerce / NOAA / OAR<br>
Geophysical Fluid Dynamics Laboratory         voice: (609) 452-6547<br>
201 Forrestal Road                              fax: (609) 987-5063<br>
Princeton, NJ  08540-6649            <a href="http://www.gfdl.noaa.gov/%7Ecjs/" target="_blank">http://www.gfdl.noaa.gov/~cjs/</a><br>
********************************************************************<br>
<br>
&quot;The contents of this message are mine personally and do not necessarily<br>
reflect any position of the Government or NOAA.&quot;<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Sushant Puranik<br>Junior Research Fellow<br>Dept. of Atmospheric &amp; Space Sciences,<br>University of Pune,<br>Pune-07,<br>India.<br>