<div dir="ltr"><div>Hi,</div><div><br></div><div>The problem is just what the error message says; in these lines:</div><div><br></div><div>data(0,:) = var_ann_flip(55,:,:)<br>data(1,:) = var_ann_flip(55,:,:)<br>data(2,:) = var_ann_flip(55,:,:)</div><div><br></div><div>data is [3] x [192] <br></div><div>whereas var_ann_flip is [lev | 56] x [lat | 192] x [lon | 288]</div><div><br></div><div>I would speculate that the line that creates data should be something like:</div><div><br></div><div>data = new((/3,dimsizes(var_ann_flip&lat)<span style="color:rgb(255,0,0)">,dimsizes(var_ann_flip&lon)</span> /),float)</div><div><br></div><div>Hope that helps...</div><div>Rick</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 9, 2022 at 7:23 AM Najib Yusuf via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:13px"><div dir="ltr">Dear NCL experts and colleagues,</div><div dir="ltr"><br></div><div dir="ltr">I am trying to plot multiple time series annual averages(monthly files) of three variables from same files using xy2 example, but I am getting error of dimension subscripting, when I tried using only One File it plotted. Kindly assist. See attached the script, and below is the VarSummaries. The error message is <span><span style="color:rgb(0,0,0);font-family:Helvetica Neue,Helvetica,Arial,sans-serif">fatal:VarVarWrite: Number of dimensions on left hand side does not match right hand side. </span></span></div><div dir="ltr"><span><span style="color:rgb(0,0,0);font-family:Helvetica Neue,Helvetica,Arial,sans-serif"><br></span></span></div><div dir="ltr"><span><div><div>data(0,:) = var_ann_flip(55,:,:)</div><div>data(1,:) = var_ann_flip(55,:,:)</div><div>data(2,:) = var_ann_flip(55,:,:)</div><div><br></div></div></span></div><div dir="ltr"><br></div><div dir="ltr">Thank you for your support always</div><div><br></div><div><br></div><div>Variable: f_all<br></div><div dir="ltr"><div><div>Type: string</div><div>Total Size: 96 bytes</div><div>            12 values</div><div>Number of Dimensions: 1</div><div>Dimensions and sizes:   [12]</div><div>Coordinates:</div><div>(0)     /glade/work/najiby/f.e20.FCSD/f.e20.FCSD/atm/hist/<a href="http://f.e20.FCSD.cam.h0.2013-01.nc" target="_blank">f.e20.FCSD.cam.h0.2013-01.nc</a></div><div>(1)     /glade/work/najiby/f.e20.FCSD/f.e20.FCSD/atm/hist/<a href="http://f.e20.FCSD.cam.h0.2013-02.nc" target="_blank">f.e20.FCSD.cam.h0.2013-02.nc</a></div><div>(2)     /glade/work/najiby/f.e20.FCSD/f.e20.FCSD/atm/hist/<a href="http://f.e20.FCSD.cam.h0.2013-03.nc" target="_blank">f.e20.FCSD.cam.h0.2013-03.nc</a></div><div>(3)     /glade/work/najiby/f.e20.FCSD/f.e20.FCSD/atm/hist/<a href="http://f.e20.FCSD.cam.h0.2013-04.nc" target="_blank">f.e20.FCSD.cam.h0.2013-04.nc</a></div><div>(4)     /glade/work/najiby/f.e20.FCSD/f.e20.FCSD/atm/hist/<a href="http://f.e20.FCSD.cam.h0.2013-05.nc" target="_blank">f.e20.FCSD.cam.h0.2013-05.nc</a></div><div>(5)     /glade/work/najiby/f.e20.FCSD/f.e20.FCSD/atm/hist/<a href="http://f.e20.FCSD.cam.h0.2013-06.nc" target="_blank">f.e20.FCSD.cam.h0.2013-06.nc</a></div><div>(6)     /glade/work/najiby/f.e20.FCSD/f.e20.FCSD/atm/hist/<a href="http://f.e20.FCSD.cam.h0.2013-07.nc" target="_blank">f.e20.FCSD.cam.h0.2013-07.nc</a></div><div>(7)     /glade/work/najiby/f.e20.FCSD/f.e20.FCSD/atm/hist/<a href="http://f.e20.FCSD.cam.h0.2013-08.nc" target="_blank">f.e20.FCSD.cam.h0.2013-08.nc</a></div><div>(8)     /glade/work/najiby/f.e20.FCSD/f.e20.FCSD/atm/hist/<a href="http://f.e20.FCSD.cam.h0.2013-09.nc" target="_blank">f.e20.FCSD.cam.h0.2013-09.nc</a></div><div>(9)     /glade/work/najiby/f.e20.FCSD/f.e20.FCSD/atm/hist/<a href="http://f.e20.FCSD.cam.h0.2013-10.nc" target="_blank">f.e20.FCSD.cam.h0.2013-10.nc</a></div><div>(10)    /glade/work/najiby/f.e20.FCSD/f.e20.FCSD/atm/hist/<a href="http://f.e20.FCSD.cam.h0.2013-11.nc" target="_blank">f.e20.FCSD.cam.h0.2013-11.nc</a></div><div>(11)    /glade/work/najiby/f.e20.FCSD/f.e20.FCSD/atm/hist/<a href="http://f.e20.FCSD.cam.h0.2013-12.nc" target="_blank">f.e20.FCSD.cam.h0.2013-12.nc</a></div><div>(0)     1.016496e-05</div><div>(0)     3.577813e-09</div><div><br></div><div>Variable: var_ann</div><div>Type: float</div><div>Total Size: 12386304 bytes</div><div>            3096576 values</div><div>Number of Dimensions: 3</div><div>Dimensions and sizes:   [lev | 56] x [lat | 192] x [lon | 288]</div><div>Coordinates:</div><div>            lev: [1.867879997007549..992.5000106104562]</div><div>            lat: [ -90..  90]</div><div>            lon: [   0..358.75]</div><div>Number Of Attributes: 5</div><div>  cell_methods :        time: mean</div><div>  long_name :   O3 concentration</div><div>  units :       mol/mol</div><div>  mdims :       1</div><div>  average_op_ncl :      dim_avg_n over dimension(s): time</div><div><br></div><div>Variable: var_ann_flip</div><div>Type: float</div><div>Total Size: 12386304 bytes</div><div>            3096576 values</div><div>Number of Dimensions: 3</div><div>Dimensions and sizes:   [lev | 56] x [lat | 192] x [lon | 288]</div><div>Coordinates:</div><div>            lev: [1.867879997007549..992.5000106104562]</div><div>            lat: [ -90..  90]</div><div>            lon: [-180..178.75]</div><div>Number Of Attributes: 6</div><div>  cell_methods :        time: mean</div><div>  long_name :   O3 concentration</div><div>  units :       mol/mol</div><div>  mdims :       1</div><div>  average_op_ncl :      dim_avg_n over dimension(s): time</div><div>  lonFlip :     longitude coordinate variable has been reordered via lonFlip</div><div><br></div><div>Variable: data</div><div>Type: float</div><div>Total Size: 2304 bytes</div><div>            576 values</div><div>Number of Dimensions: 2</div><div>Dimensions and sizes:   [3] x [192]</div><div>Coordinates:</div><div>Number Of Attributes: 1</div><div>  _FillValue :  9.96921e+36</div><div>fatal:VarVarWrite: Number of dimensions on left hand side does not match right hand side</div><div>fatal:["Execute.c":8637]:Execute: Error occurred at or near line 50 in file Timeser_annavg_O3CONOX.ncl</div><div><br></div></div><br></div><div><br></div><div><div dir="ltr" style="font-family:Helvetica,Arial,sans-serif;font-size:16px"><div><p style="font-size:16px;font-family:Helvetica,Arial,sans-serif;margin:0in 0in 0.0001pt;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial"><font size="2" color="#5b8828"><b><span style="background-color:rgb(255,255,255)"><span lang="EN-ZA">---------------------</span><span id="gmail-m_-1502436771958690513ydp766c7059yiv5048509013ydp2fa15795yiv8158744610yMail_cursorElementTracker_1626107004843">-------------</span>--</span></b></font></p><div style="text-align:left;font-family:Helvetica,Arial,sans-serif;margin:0in 0in 0.0001pt;background-image:initial;background-position:initial;background-repeat:initial;background-size:auto"><span id="gmail-m_-1502436771958690513ydp766c7059yiv5048509013ydp2fa15795yiv8158744610ydpe5107903yiv2904767006yMail_cursorElementTracker_1625609058231"><span style="background-color:rgb(255,255,255)" lang="EN-ZA"><font style="background-color:inherit" size="1" color="#5b8828"><b>Najib Yusuf Galadanci PhD</b></font></span></span></div><div style="text-align:left;font-family:Helvetica,Arial,sans-serif;margin:0in 0in 0.0001pt;background-image:initial;background-position:initial;background-repeat:initial;background-size:auto"><b style="color:rgb(91,136,40);font-size:x-small">Assistant Director (R & D)</b></div><span id="gmail-m_-1502436771958690513ydp766c7059yiv5048509013ydp2fa15795yiv8158744610yMail_cursorElementTracker_1626106986344" style="font-family:Helvetica,Arial,sans-serif;background-color:rgb(91,136,40)"><font style="background-color:inherit" size="1" color="#5b8828"><b><p style="text-align:left;margin:0in 0in 0.0001pt;background-image:initial;background-position:initial;background-repeat:initial;background-size:auto"><span lang="EN-ZA">Lower Atmospheric Dynamics</span></p><p style="text-align:left;margin:0in 0in 0.0001pt;background-image:initial;background-position:initial;background-repeat:initial;background-size:auto"><span lang="EN-ZA">(Aerosol radiative forcing, air quality observations and modeling)</span></p><p style="text-align:left;margin:0in 0in 0.0001pt;background-image:initial;background-position:initial;background-repeat:initial;background-size:auto"><span lang="EN-ZA">Centre for Atmospheric Research</span></p><p style="text-align:left;margin:0in 0in 0.0001pt;background-image:initial;background-position:initial;background-repeat:initial;background-size:auto"><span lang="EN-ZA">National Space Research and Development Agency. Kogi State</span></p><p style="text-align:left;margin:0in 0in 0.0001pt;background-image:initial;background-position:initial;background-repeat:initial;background-size:auto"><span lang="EN-ZA">University Campus, Anyigba. Kogi State. Nigeria</span></p><p style="text-align:left;margin:0in 0in 0.0001pt;background-image:initial;background-position:initial;background-repeat:initial;background-size:auto"><span id="gmail-m_-1502436771958690513ydp766c7059yiv5048509013ydp2fa15795yiv8158744610ydpe5107903yiv2904767006yMail_cursorElementTracker_1625609053689"><span lang="EN-ZA">+234 80 3871 4158</span></span></p><div style="margin:0in 0in 0.0001pt;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial"><span lang="EN-ZA">------------------------------------</span></div><div style="margin:0in 0in 0.0001pt;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial"><i>Know that Victory comes with Patience, </i></div><div style="margin:0in 0in 0.0001pt;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial"><i>Relief with Affliction, and Ease with Hardship.</i></div><div style="margin:0in 0in 0.0001pt;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial"><i>Prophet Muhammad Rasulullah (PBUH)</i></div><p style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><span><i> </i></span></p></b></font></span></div><br><br></div></div></div></div>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>