<div dir="ltr">Thanks for suggesting this.<br><div><br></div><div>Actually, I am trying to calculate the COD at each grid cell. </div><div><br></div><div>So as you suggested</div><div><br></div><div><b>DATA_SINGLE_3D = conform<span id="gmail-4d1d247c-8835-461a-9aba-fc72fd4921bc" class="gmail-GINGER_SOFTWARE_mark"><span id="gmail-4d1d247c-8835-461a-9aba-fc72fd4921bc" class="gmail-GINGER_SOFTWARE_mark">(</span></span>data_subset, data_single, 0)<span id="e262d9e9-5ea7-4717-b170-38c825314fc5" class="gmail-GINGER_SOFTWARE_mark gmail-GINGER_SOFTWARE_mark gmail-GINGER_SOFTWARE_mark GINGER_SOFTWARE_mark">    ;</span><font color="#ff0000"> it worked</font><br></b></div><div><b><font color="#ff0000"><br></font></b></div><div><b><font color="#ff0000"><div>Variable: DATA_SINGLE_3D</div><div>Type: float</div><div>Total Size: 7824960 bytes</div><div>            1956240 values</div><div>Number of Dimensions: 3</div><div>Dimensions and sizes:<span class="gmail-Apple-tab-span" style="white-space:pre">   </span>[3] x [660] x [988]</div><div>Coordinates: </div><div>Number Of Attributes: 1</div><div>  _FillValue<span id="gmail-498988b2-5ab0-43fb-a66e-5f5a0ba77ed3" class="gmail-GINGER_SOFTWARE_mark"> :</span><span class="gmail-Apple-tab-span" style="white-space:pre">  </span>-28672</div><div><br></div><div><br></div></font></b></div><div><span id="gmail-f4589880-5c60-4d76-a40a-83cacea63490" class="gmail-GINGER_SOFTWARE_mark">step</span> 1:</div><div><div>CoD1 = ((DATA_SINGLE_3D - data_subset)/(DATA_SINGLE_3D+ data_subset))^2</div><div>   <span id="gmail-718b2d7f-f7e4-44b8-ae4a-eb5ab8fe9340" class="gmail-GINGER_SOFTWARE_mark">printVarSummary</span><span id="gmail-d8aa9a22-27eb-4856-8d20-fd1434446a9c" class="gmail-GINGER_SOFTWARE_mark">(</span>CoD1)</div><div>   <span id="gmail-f07677e3-4fc5-41db-a2b4-611089cecdc5" class="gmail-GINGER_SOFTWARE_mark">printMinMax</span><span id="gmail-108006d0-8577-49b3-a271-ab96242b30ad" class="gmail-GINGER_SOFTWARE_mark">(</span>CoD1,<span id="gmail-a025e217-7776-42bb-ab6b-198d874834ad" class="gmail-GINGER_SOFTWARE_mark"> 0)</span></div><div>   </div><div><div><b><font color="#ff0000">Variable: CoD1</font></b></div><div><b><font color="#ff0000">Type: float</font></b></div><div><b><font color="#ff0000">Total Size: 7824960 bytes</font></b></div><div><b><font color="#ff0000">            1956240 values</font></b></div><div><b><font color="#ff0000">Number of Dimensions: 3</font></b></div><div><b><font color="#ff0000">Dimensions and sizes:<span class="gmail-Apple-tab-span" style="white-space:pre">       </span>[3] x [660] x [988]</font></b></div><div><b><font color="#ff0000">Coordinates: </font></b></div><div><b><font color="#ff0000">Number Of Attributes: 1</font></b></div><div><b><font color="#ff0000">  _FillValue<span id="gmail-697a03de-1cb7-4b52-adf4-2714a21512f7" class="gmail-GINGER_SOFTWARE_mark"> :</span><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>-28672</font></b></div><div><b><font color="#ff0000">(0)<span class="gmail-Apple-tab-span" style="white-space:pre">        </span><span id="gmail-a025e217-7776-42bb-ab6b-198d874834ad" class="gmail-GINGER_SOFTWARE_mark">min</span>=0   max=0.961394</font></b></div></div><div><br></div><div><br></div><div><span id="gmail-02ab6800-01cf-41ce-a808-a4f6da9413c6" class="gmail-GINGER_SOFTWARE_mark">step</span> 2:</div><div><br></div><div>   CoD2 = sum<span id="gmail-aab7a6b6-8992-4c85-a864-019797dad701" class="gmail-GINGER_SOFTWARE_mark">(</span>CoD1<span id="gmail-25748076-22e9-4da2-a3f6-a4689ef3177c" class="gmail-GINGER_SOFTWARE_mark">)</span>/3</div><div>   <span id="gmail-19f4e55f-9759-4113-b92c-ef4270b7ecad" class="gmail-GINGER_SOFTWARE_mark">printVarSummary</span><span id="gmail-0b15cea6-78ea-4c43-881c-bf5587fa5012" class="gmail-GINGER_SOFTWARE_mark">(</span>CoD2)</div><div>   <span id="e2d4155c-54dc-471f-86be-5ea46b9fdb32" class="gmail-GINGER_SOFTWARE_mark gmail-GINGER_SOFTWARE_mark gmail-GINGER_SOFTWARE_mark gmail-GINGER_SOFTWARE_mark GINGER_SOFTWARE_mark">printMinMax</span><span id="gmail-2232c81d-a1b2-4b34-99c5-2030e8aca179" class="gmail-GINGER_SOFTWARE_mark">(</span>CoD2, 0)</div><div><br></div><div><div><b><font color="#ff0000">Variable: CoD2</font></b></div><div><b><font color="#ff0000">Type: float</font></b></div><div><b><font color="#ff0000">Total Size: 4 bytes</font></b></div><div><b><font color="#ff0000">            1 values</font></b></div><div><b><font color="#ff0000">Number of Dimensions: 1</font></b></div><div><b><font color="#ff0000">Dimensions and sizes:<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>[1]</font></b></div><div><b><font color="#ff0000">Coordinates: </font></b></div><div><b><font color="#ff0000">(0)</font><span class="gmail-Apple-tab-span" style="color:rgb(255,0,0);white-space:pre">        </span><font color="#0000ff">min=20691.8   max=20691.8   --------> values are very high? and also it's not giving at each grid cell, because of that I can't calculate the sqrt in the next step</font></b></div></div><div>   </div><div><br></div><div>step 3:</div><div><br></div><div>  CoD3 = <span id="gmail-8324fdf8-e72e-485d-a2e4-80307341aec8" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-8324fdf8-e72e-485d-a2e4-80307341aec8" class="gmail-GINGER_SOFTWARE_mark">sqrt</span><span id="gmail-46d68118-f778-42d9-9096-beb149b46d75" class="gmail-GINGER_SOFTWARE_mark">(CoD</span>2)</div><div> <span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark">printVarSumma</span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark">r</span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark">y</span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-59872f0a-1047-4fdb-8ee6-84f4e485a831" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-4d4bcedc-9f15-4319-84a6-375ff40c00eb" class="gmail-GINGER_SOFTWARE_mark">(</span><span id="gmail-4d4bcedc-9f15-4319-84a6-375ff40c00eb" class="gmail-GINGER_SOFTWARE_mark"></span>CoD3)</div><div> <span id="gmail-468ee3ec-9871-4351-9114-3aebbdcfc91d" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-468ee3ec-9871-4351-9114-3aebbdcfc91d" class="gmail-GINGER_SOFTWARE_mark">printMinMa</span><span id="gmail-468ee3ec-9871-4351-9114-3aebbdcfc91d" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-468ee3ec-9871-4351-9114-3aebbdcfc91d" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-468ee3ec-9871-4351-9114-3aebbdcfc91d" class="gmail-GINGER_SOFTWARE_mark">x</span><span id="gmail-468ee3ec-9871-4351-9114-3aebbdcfc91d" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-713ec912-7274-4a06-afd4-4482885a83c5" class="gmail-GINGER_SOFTWARE_mark"></span><span id="gmail-713ec912-7274-4a06-afd4-4482885a83c5" class="gmail-GINGER_SOFTWARE_mark">(</span>CoD2, 0)</div></div><div><br></div><div><br></div><div>The final values are coming very high. It should be less than 0.3 at each grid cell. </div><div><br></div><div class="gmail_extra">regards<br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Kunal Bali<br></div><div><br></div><div><br></div><div><br></div><div><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left: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, Nov 8, 2017 at 1:18 AM, Dennis Shea <span dir="ltr"><<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">If you have a one-dimensional array (1D; eg: a 'time series') and a three-dimensional array (3D; eg: time series at multiple grid points), you *must* make the arrays 'conformant' for an array calculation<br><div><br>You have:<br></div><div>   CoD1 = ((data_single(:) - data_subset(:,:,:))/(data_sing<wbr>le(:) + data_subset(:,:,:)))^2<br><br></div><div>You did not include a 'printVarSummary' of these variables. Assuming data_single(ntim) and data_subset(ntim,nlat,mlon) then you must replicate (aka, propogate) the 1D array to the 3D array size. In NCL, this is called 'array conformance' . Please see and carefully read:<br><br><a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/conform.shtml" target="_blank">https://www.ncl.ucar.edu/Docum<wbr>ent/Functions/Built-in/conform<wbr>.shtml</a><br><a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/conform_dims.shtml" target="_blank">https://www.ncl.ucar.edu/Docum<wbr>ent/Functions/Built-in/conform<wbr>_dims.shtml</a><br><br>---<br></div><div>  DATA_SINGLE_3D = conform(data_subset, data_single, 0)    ; (ntim,nlat,mlon)<br></div><div>  printVarSummary(DATA_SINGLE_3D<wbr>)   ; Look at data<br></div><div><br>Do *not* use (:,:,:) in a computation... this is inefficient.<br><br>  CoD1 = ((DATA_SINGLE_3D - data_subset)/(DATA_SINGLE_3D+ data_subset))^2</div><div>  printVarSummary(CoD1)<br></div><div>  printMinMax(CoD1, 0)<br><br><br></div><div><br><br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Tue, Nov 7, 2017 at 11:15 AM, Kunal Bali <span dir="ltr"><<a href="mailto:kunal.bali9@gmail.com" target="_blank">kunal.bali9@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Dear NCL user<div><br></div><div>Suppose, I have 2 datasets </div><div><span id="m_9015766445916537037m_5515606383850329571gmail-24da4d6e-023a-4f1a-b118-d5e1a4c82fd0" class="m_9015766445916537037m_5515606383850329571gmail-GINGER_SOFTWARE_mark">e.g.</span></div><div><br></div><div>data1 = of single point <span id="m_9015766445916537037m_5515606383850329571gmail-6aca75ac-d298-40a8-985f-1cbbb96b5695" class="m_9015766445916537037m_5515606383850329571gmail-GINGER_SOFTWARE_mark">lat</span> & <span id="m_9015766445916537037m_5515606383850329571gmail-bff943b5-43c0-40fa-a663-b799819a52ff" class="m_9015766445916537037m_5515606383850329571gmail-GINGER_SOFTWARE_mark">lon</span> (e.g 28N, 72E) with time steps 365 (having filling values)</div><div>data2 = of grid box (24-32N, 68-76E) with time steps 365  (having filling values)</div><div><br></div><div><span id="m_9015766445916537037m_5515606383850329571gmail-66abf8dd-5002-4f45-affb-3d51dc239b49" class="m_9015766445916537037m_5515606383850329571gmail-GINGER_SOFTWARE_mark">Now</span> I want to calculate the CoD from one single point to 400km grid box area and then lot the spatial map of the calculated product. </div><div><br></div><div><span class="m_9015766445916537037m_5515606383850329571gmail-GINGER_SOFTWARE_mark">Formula</span> for CoD is GIVEN BELOW<img src="cid:ii_j9pxiu9x1_15f97ab70e5f7d73" width="467" height="98"><br>​</div><div><br></div><div>So I calculated in NCL as </div><div><br></div><div>CoD1 = ((data1 - data2<span id="m_9015766445916537037m_5515606383850329571gmail-9c0766d1-b7ae-40ad-a6fd-7d16b19ee10a" class="m_9015766445916537037m_5515606383850329571gmail-GINGER_SOFTWARE_mark">)</span>/(data1 + data2)<span id="m_9015766445916537037m_5515606383850329571gmail-6dab5315-cc3c-41e8-b9d7-53268320e1c9" class="m_9015766445916537037m_5515606383850329571gmail-GINGER_SOFTWARE_mark">)</span>^2</div><div>CoD_final = (sqrt<span id="m_9015766445916537037m_5515606383850329571gmail-4532ee9b-4867-4186-806e-11e562eabf37" class="m_9015766445916537037m_5515606383850329571gmail-GINGER_SOFTWARE_mark">(</span>sum<span id="m_9015766445916537037m_5515606383850329571gmail-9c6d88cf-f4c7-419e-865b-49604afa5b43" class="m_9015766445916537037m_5515606383850329571gmail-GINGER_SOFTWARE_mark">(</span>CoD1))<span id="m_9015766445916537037m_5515606383850329571gmail-de678d04-615b-4668-963c-db988d6ae0e2" class="m_9015766445916537037m_5515606383850329571gmail-GINGER_SOFTWARE_mark">)</span>/3</div><div><br></div><div><span id="m_9015766445916537037m_5515606383850329571gmail-32f19815-56c6-4d4c-b70f-e51d0a0d030e" class="m_9015766445916537037m_5515606383850329571gmail-GINGER_SOFTWARE_mark">please let me know is</span> it the <span id="m_9015766445916537037m_5515606383850329571gmail-798c9baa-ab22-45e1-8ddb-6a1e673aa7fb" class="m_9015766445916537037m_5515606383850329571gmail-GINGER_SOFTWARE_mark">right way</span> to do?</div><div><br></div><div>I tried to plot the final product CoD_final with the attached script, but error comes as</div><div><br></div><div><div>fatal:Minus: Number of dimensions do not match, can't continue</div><div>fatal:["Execute.c":8578]:Execu<wbr>te: Error occurred at or near line 116 in file plot.ncl</div></div><div><br></div><div><br></div><div><br clear="all"><div><div class="m_9015766445916537037m_5515606383850329571gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><span id="m_9015766445916537037m_5515606383850329571gmail-f5df93db-c322-49af-98a9-077ea58741ad" class="m_9015766445916537037m_5515606383850329571gmail-GINGER_SOFTWARE_mark">regards</span></div><span class="m_9015766445916537037HOEnZb"><font color="#888888"><div>Kunal Bali<br></div><div><br></div></font></span></div></div></div></div></div>
</div></div>
<br></div></div>______________________________<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><br></div>
</blockquote></div><br></div></div>