<div dir="ltr"><div><br></div><div>Sir, Thanks for your suggestions and effort for this query.</div><div>I also figured out to solve this query using CDO. So I have created 2d coordinates from that and then calculated the coff. of divergence (CoD). The script was successfully run and I am able to plot the CoD data. But the pattern of resultant CoD did not come as the attached figure1. Figure1 is related to AOD and Figure2 is PM. So, I was expecting the shape of figure2 just like figure 1. But it didn't come. <br></div><div><br></div><div>any thoughts on that? <br></div><br><br><br><br><div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail-m_-2841897427032266679gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Kunal Bali<br></div><br><div><br></div><div><br></div><div><br></div><div><p style="margin:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br></font></p></div></div></div></div></div></div>
<br><div class="gmail_quote">On Wed, Dec 6, 2017 at 12:08 PM, Guido Cioni <span dir="ltr"><<a href="mailto:guidocioni@gmail.com" target="_blank">guidocioni@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">You can try to use these functions to create 2d coordinate arrays from 1d arrays. They were provided by Karin Meier Flascher.<div dir="auto"><br></div><div dir="auto"><div dir="auto">;-----------------------------<wbr>------------------------------<wbr>-</div><div dir="auto">;-- Function: create_lon2d(y,x)</div><div dir="auto">;-- Description: create 2d lon array from 1D rotlon, rotlat</div><div dir="auto">;-----------------------------<wbr>------------------------------<wbr>-</div><div dir="auto">undef("create_lon2d")</div><div dir="auto">function create_lon2d(rotlat[*]:numeric<wbr>, rotlon[*]:numeric)</div><div dir="auto">local x, i</div><div dir="auto">begin</div><div dir="auto"> x = new((/dimsizes(rotlat),dimsize<wbr>s(rotlon)/),typeof(rotlat))</div><div dir="auto">; print("Function create_lon2d: dimsizes of x: "+dimsizes(x))</div><div dir="auto"> do i=0,dimsizes(rotlat)-1</div><div dir="auto"> x(i,:) = rotlon</div><div dir="auto"> end do</div><div dir="auto"> return(x)</div><div dir="auto">end</div><div dir="auto"><br></div><div dir="auto">;-----------------------------<wbr>------------------------------<wbr>-</div><div dir="auto">;-- Function: create_lat2d(y,x)</div><div dir="auto">;-- Description: create 2d lat array from 1D rotlon,rotlat</div><div dir="auto">;-----------------------------<wbr>------------------------------<wbr>-</div><div dir="auto">undef("create_lat2d")</div><div dir="auto">function create_lat2d(rotlat[*]:numeric<wbr>, rotlon[*]:numeric)</div><div dir="auto">local y, i</div><div dir="auto">begin</div><div dir="auto"> y = new((/dimsizes(rotlat),dimsize<wbr>s(rotlon)/),typeof(rotlat))</div><div dir="auto">; print("Function create_lat2d: dimsizes of y: "+dimsizes(y))</div><div dir="auto"> do i=0,dimsizes(rotlon)-1</div><div dir="auto"> y(:,i) = rotlat</div><div dir="auto"> end do</div><div dir="auto"> return(y)</div><div dir="auto">end</div><div dir="auto"><br></div><div dir="auto">Kunal Please try to figure it out things on your own by searching in the mailing list or in the NCL website. You have some really basic question which shouldn't be posted here.</div><div dir="auto">I'm not going to reply next time if you don't show any intention of solving the problem on your own. </div><div dir="auto"><br></div><div dir="auto">Good luck </div></div></div><div class="gmail-m_-2841897427032266679HOEnZb"><div class="gmail-m_-2841897427032266679h5"><div class="gmail_extra"><br><div class="gmail_quote">Il 6 dic 2017 7:32 AM, "Guido Cioni" <<a href="mailto:guidocioni@gmail.com" target="_blank">guidocioni@gmail.com</a>> ha scritto:<br type="attribution"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Kunal, <div dir="auto"> lat and lon have to be 2 dimensional. Just renaming them to lat2d and lon2d doesn't make them 2 dimensional.... </div></div><div class="gmail_extra"><br><div class="gmail_quote">Il 6 dic 2017 6:36 AM, "Kunal Bali" <<a href="mailto:kunal.bali9@gmail.com" target="_blank">kunal.bali9@gmail.com</a>> ha scritto:<br type="attribution"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div>Okay, thanks for the suggestion. <br><br><br></div>If I modify the script using <br></div><div><br></div><div><b><span style="color:rgb(255,0,0)">lat2d = a->lat</span></b></div><div><b><span style="color:rgb(255,0,0)">lon2d = a->lon</span></b></div><div><b><span style="color:rgb(255,0,0)"><br></span></b></div><div><b><span style="color:rgb(255,0,0)">and then <br></span></b></div><div><b><span style="color:rgb(255,0,0)"><br></span></b></div><div><b><span style="color:rgb(255,0,0)">nm = getind_latlon2d (lat2d, lon2d, latv, lonv)</span></b></div><div><b><span style="color:rgb(255,0,0)"><br></span></b></div><div><b><span style="color:rgb(255,0,0)">I mean I tried this but still got the same error. </span></b><br></div><div><br></div><div>Variable: totc<br>Type: float<br>Total Size: 9478656 bytes<br> 2369664 values<br>Number of Dimensions: 3<br>Dimensions and sizes: [2] x [1088] x [1089]<br>Coordinates:<br>Number Of Attributes: 1<br> _FillValue : -28672<br><br>Variable: lat2d<br>Type: double<br>Total Size: 8704 bytes<br> 1088 values<br>Number of Dimensions: 1<br>Dimensions and sizes: [lat | 1088]<br>Coordinates:<br> lat: [21.00781..37.992185]<br>Number Of Attributes: 3<br> long_name : "latitude"<br> units : "degrees_north"<br> axis : Y<br>fatal:Number of dimensions in parameter (0) of (getind_latlon2d) is (1), (2) dimensions were expected<br></div><div><br></div><div><br></div><div><br></div><div><br></div><br><div class="gmail_extra"><br><br><br><br></div><div class="gmail_extra">regards<br clear="all"></div><div class="gmail_extra"><div><div class="gmail-m_-2841897427032266679m_7951192753154719075m_-1784557998836196707m_5280498202514852980gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Kunal Bali<br></div><br><div><br></div><div><br></div><div><p style="margin:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br></font></p></div></div></div></div></div></div>
<br><div class="gmail_quote">On Tue, Dec 5, 2017 at 10:41 PM, Guido Cioni <span dir="ltr"><<a href="mailto:guidocioni@gmail.com" target="_blank">guidocioni@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;">Did you even try to understand the error? <span><div><br></div><div><blockquote type="cite"><div dir="ltr">fatal:Number of dimensions in parameter (0) of (getind_latlon2d) is (1), (2) dimensions were expected<br></div></blockquote><br></div></span><div><div><font face="Menlo"> nm = getind_latlon2d (lat(:), lon(:), latv, lonv)</font></div></div><div><br></div><div>lat and lon are 1-dimensional while the function needs 2-dimensional latitude and longitudes (getind_latlon<b>2d</b>)</div><div><br></div><div><br><div><blockquote type="cite"><div><div class="gmail-m_-2841897427032266679m_7951192753154719075m_-1784557998836196707m_5280498202514852980h5"><div>On 5. Dec 2017, at 10:59, Kunal Bali <<a href="mailto:kunal.bali9@gmail.com" target="_blank">kunal.bali9@gmail.com</a>> wrote:</div><br class="gmail-m_-2841897427032266679m_7951192753154719075m_-1784557998836196707m_5280498202514852980m_5987379236400984351Apple-interchange-newline"></div></div><div><div><div class="gmail-m_-2841897427032266679m_7951192753154719075m_-1784557998836196707m_5280498202514852980h5"><div dir="ltr"><div><div>Dear NCL user,<br><br><br></div>I am trying to plot the coff. of divergence of the attached file (as a sample file with 2-time steps). the original file has 365 time steps. The script related to this query is also attached.<br><br></div>The error is given below <br><br><br>Variable: totc<br>Type: float<br>Total Size: 9478656 bytes<br> 2369664 values<br>Number of Dimensions: 3<br>Dimensions and sizes: [2] x [1088] x [1089]<br>Coordinates:<br>Number Of Attributes: 1<br> _FillValue : -28672<br>fatal:Number of dimensions in parameter (0) of (getind_latlon2d) is (1), (2) dimensions were expected<br>fatal:["Execute.c":8640]:Execu<wbr>te: Error occurred at or near line 106 in file iitd_PM2.5_plot_new.ncl<br><br> <br><div><br></div><div>regards<br clear="all"></div><div><div><div><div><div class="gmail-m_-2841897427032266679m_7951192753154719075m_-1784557998836196707m_5280498202514852980m_5987379236400984351gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Kunal Bali<br></div><br><div><br></div><div><br></div><div><div style="margin:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br></font></div></div></div></div></div></div></div>
</div></div></div></div>
</div></div><span id="gmail-m_-2841897427032266679m_7951192753154719075m_-1784557998836196707m_5280498202514852980m_5987379236400984351cid:DAD834E3-27C7-4780-8190-604EC3474B3A@mpimet.mpg.de"><data.tar.bz2></span><span id="gmail-m_-2841897427032266679m_7951192753154719075m_-1784557998836196707m_5280498202514852980m_5987379236400984351cid:AA59EF39-2EAB-4E8E-A0A4-CB543991591D@mpimet.mpg.de"><iitd_PM2.5_plot<wbr>_new.ncl></span>_____________________<wbr>__________________________<br>ncl-talk mailing list<br><a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>List instructions, subscriber options, unsubscribe:<br><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><span class="gmail-m_-2841897427032266679m_7951192753154719075m_-1784557998836196707m_5280498202514852980HOEnZb"><font color="#888888"><br></font></span></div></blockquote></div><span class="gmail-m_-2841897427032266679m_7951192753154719075m_-1784557998836196707m_5280498202514852980HOEnZb"><font color="#888888"><br><div>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br class="gmail-m_-2841897427032266679m_7951192753154719075m_-1784557998836196707m_5280498202514852980m_5987379236400984351Apple-interchange-newline">Guido Cioni</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="http://guidocioni.altervista" target="_blank">http://guidocioni.altervista</a>.o<wbr>rg</div>
</div>
<br></font></span></div></div></blockquote></div><br></div></div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div></div>
</blockquote></div></div>
</div></div></blockquote></div><br></div></div>