<div dir="ltr"><div>As I noted in my 1st response, "there may be errors" because I did it very quickly.</div><div><br></div><div>Still, something is unusual. I didn't have your data file(s). try the following</div><div><br></div><div><br></div><div><a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/month_to_season.shtml" target="_blank"><b>month_to_season </b></a>computes the seasonal mean for *each year*. <br></div><div>This is *not* a climatological seasonal mean.</div><div>**********************************************************************************<br></div><div>begin<br><br>; read model data<br><br> spec_units = ("ppb")<br> factor = (/1.e+09/) <br> wkdir = "/glade/scratch/najiby/"<br> diri = "/glade/scratch/najiby/"<br> fili = systemfunc("ls "+diri+"f.e20.FSCD_FullEmissNig.cam.h0.2013*.nc")<br> print(fili)<br> print("==========================================")<br><br> minLat = -35<br> maxLat = 35<br> minLon = -30<br> maxLon = 60<br><br> f = addfiles(fili, "r")<br> o3x_surf = f[:]->O3(:,55,:,:) ; input only surface<br> o3x_surf = o3x_surf*1.e+09 ; units change<br>;;o3x_surf@units = "..."<br> printVarSummary(o3x_surf) ; (time,lat,lon) ; lon: 0->360<br> print("==========================================")<br><br>; reorder longitudes<br> o3x_surf := <b>lonFlip</b>(o3x_surf)<br> print("++++++++++++++++++++++++++++++++++++++++++")<br> print(" AFTER LONGITUDE REORDER ")<br> print("++++++++++++++++++++++++++++++++++++++++++")<br> printVarSummary(o3x_surf) ; (time,lat,lon) ; lon: -180->180<br><br> date = f[:]->date<br> print("==========================================")<br>;;printVarSummary(date)<br> print(date) ; (time)</div><div><br></div><div> print("==========================================")<br><br> nyear = dimsizes(date)/12 ; number of years<br> print("nyear="+nyear)<br> print("==========================================")<br> <br>;-------------------------------------------------------<br>; season average for ** EACH YEAR ** This is NOT a climatological average<br> xSea = month_to_seasonN(o3x_surf,(/"DJF","MAM","JJA","SON"/))<br> printVarSummary(xSea) ; (4,nyr,lat,lon) <br> ; DJF -> (0,nyear,lat,lon) for EACH year [time-> nyr]<br> ; MAM -> (1,nyear,lat,lon) for EACH year<br> ; JJA -> (2,nyear,lat,lon) for EACH year<br> ; SON -> (3,neayr,lat,lon) for EACH year<br><br><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, May 29, 2022 at 12:51 PM Najib Yusuf <<a href="mailto:najibgal@yahoo.com" target="_blank">najibgal@yahoo.com</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:16px"><div><div dir="ltr">Dear Dennis,</div><div dir="ltr"><br></div><div dir="ltr">Thank you. I did as you said and I know have (time,lat,lon) atributes and <span><span style="color:rgb(0,0,0);font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px">xSea_surf <span><span style="color:rgb(0,0,0);font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px"> [season | 4] x (time | 1] x [lat | 192] x [lon | 288)</span></span></span></span>, the subscripting is a bit confusing. However, I used these to plot:</div><div dir="ltr"><br></div><div dir="ltr"><div><div style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif"> res@gsnLeftString = "DJF_dry cold"<br clear="none"> plot1 = gsn_csm_contour_map_ce(wks,xSea_surf(0,{-35:35},{-30:60}),res)</div><div style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif"><br clear="none"></div><div style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif"> res@gsnLeftString = "MAM_dry warm"<br clear="none"> plot2 = gsn_csm_contour_map_ce(wks,xSea_surf2(1,:,:),res)</div></div><br></div><div dir="ltr">but got error of subscripting then I tried this to have 4 subscripts (seas,time,lat,lon) I still got error</div><div dir="ltr"><br></div><div dir="ltr"><div><div style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif"> res@gsnLeftString = "DJF_dry cold"<br clear="none"> plot1 = gsn_csm_contour_map_ce(wks,xSea_surf(0,:,{-35:35},{-30:60}),res)</div><div style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif"><br clear="none"></div><div style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif"> res@gsnLeftString = "MAM_dry warm"<br clear="none"> plot2 = gsn_csm_contour_map_ce(wks,xSea_surf2(1,1,:,:),res)</div></div><br></div><div dir="ltr"><div><div>Variable: xSea_surf</div><div>Type: float</div><div>Total Size: 884736 bytes</div><div> 221184 values</div><div>Number of Dimensions: 4</div><div>Dimensions and sizes: [season | 4] x [time | 1] x [lat | 192] x [lon | 288]</div><div>Coordinates:</div><div> season: [DJF..SON]</div><div> time: [2953..2953]</div><div> lat: [ -90.. 90]</div><div> lon: [-180..178.75]</div><div>Number Of Attributes: 7</div><div> lonFlip : longitude coordinate variable has been reordered via lonFlip</div><div> mdims : 1</div><div> units : mol/mol</div><div> long_name : Seasonal Means: O3 concentration</div><div> cell_methods : time: mean</div><div> lev : 992.5000106104562</div><div> _FillValue : 9.96921e+36</div><div>fatal:Number of subscripts do not match number of dimensions of variable,(3) Subscripts used, (4) Subscripts expected</div><div>fatal:["Execute.c":8637]:Execute: Error occurred at or near line 143 in file month_to_seasO3.ncl</div><div><br></div></div>Kindly, help me out.</div><div dir="ltr"><br></div><div dir="ltr">Thank you so much.</div><div><br></div><div><div dir="ltr" style="font-family:Helvetica,Arial,sans-serif;font-size:16px"><div><p style="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_-1983183415710362852gmail-m_-1775148573297990538ydp766c7059yiv5048509013ydp2fa15795yiv8158744610yMail_cursorElementTracker_1626107004843">-------------</span>--</span></b></font></p><p style="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_-1983183415710362852gmail-m_-1775148573297990538ydp766c7059yiv5048509013ydp2fa15795yiv8158744610ydpe5107903yiv2904767006yMail_cursorElementTracker_1625609058231"><span style="background-color:rgb(255,255,255)" lang="EN-ZA"><font style="background-color:inherit" size="2" color="#5b8828"><b>Najib Yusuf Galadanci Ph.D.</b></font></span></span></p><p style="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_-1983183415710362852gmail-m_-1775148573297990538ydp766c7059yiv5048509013ydp2fa15795yiv8158744610ydpe5107903yiv2904767006yMail_cursorElementTracker_1625609090665"><span style="background-color:rgb(255,255,255)" lang="EN-ZA"><font style="background-color:inherit" size="2" color="#5b8828"><b>Assistant Director (R & D)</b></font></span></span></p><span id="gmail-m_-1983183415710362852gmail-m_-1775148573297990538ydp766c7059yiv5048509013ydp2fa15795yiv8158744610yMail_cursorElementTracker_1626106986344" style="font-family:Helvetica,Arial,sans-serif;background-color:rgb(91,136,40)"><b><font size="2" color="#5b8828"><p style="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="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="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="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="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="margin:0in 0in 0.0001pt;background-image:initial;background-position:initial;background-repeat:initial;background-size:auto"><span id="gmail-m_-1983183415710362852gmail-m_-1775148573297990538ydp766c7059yiv5048509013ydp2fa15795yiv8158744610ydpe5107903yiv2904767006yMail_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">Know that Victory comes with Patience, </div><div style="margin:0in 0in 0.0001pt;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial">Relief with Affliction, and Ease with Hardship.</div><p style="margin:0in 0in 0.0001pt;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial">Prophet Muhammad Rasulullah</p><p style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><span> </span></p></font></b></span></div><br></div></div></div>
<div><br></div><div><br></div>
</div><div id="gmail-m_-1983183415710362852gmail-m_-1775148573297990538yahoo_quoted_4113884980">
<div style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;color:rgb(38,40,42)">
<div>
On Friday, May 27, 2022, 01:46:31 PM GMT+1, Dennis Shea <<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div id="gmail-m_-1983183415710362852gmail-m_-1775148573297990538yiv9548229058"><div><div dir="ltr">[2]<br clear="none"> o3x_surf = o3x(0,55,:,:)<br clear="none"> printVarSummary(o3x_surf) ; TWO dimension (lat,lon); NO 'time' dimension<br clear="none"><br clear="none"> I think you want<br clear="none"><div> o3x_surf = o3x(<b>:,</b>55,:,:) ; (time,lat,lon)</div><div>----------------</div><div><br clear="none"></div><div>You have <br clear="none"></div><div><span></span><div>Variable: o3x_surf</div><div>Number of Dimensions: 2</div><div>Dimensions and sizes: [lat | 192] x [lon | 288] <=== NO TIME DIMENSION</div><div><br clear="none"></div><div>You must do as I suggested:</div><div><br clear="none"></div><div>o3x_surf = o3x(:,55,:,:) ; (time,lat,lon)</div><div>printVarSummary(o3x_surf)</div><div><br clear="none"></div><div>You must have a time dimension<br clear="none"></div></div></div><br clear="none"><div id="gmail-m_-1983183415710362852gmail-m_-1775148573297990538yiv9548229058yqt31025"><div><div dir="ltr">On Fri, May 27, 2022 at 7:03 AM Najib Yusuf <<a rel="nofollow noopener noreferrer" shape="rect" href="mailto:najibgal@yahoo.com" target="_blank">najibgal@yahoo.com</a>> wrote:<br clear="none"></div><blockquote 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:16px"><div><div dir="ltr"><div><div dir="ltr" style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px">Dear Dennis,</div><div dir="ltr" style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px"><br clear="none"></div><div dir="ltr" style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px">I have done as you advise, 1 to 5 all work out, thank you, but I had to do this first:</div><div dir="ltr" style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px"><br clear="none"></div><div dir="ltr" style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px"><div><div>o3x_surf_flip := lonFlip(o3x_surf)<br clear="none"></div><div> printVarSummary(o3x_surf_flip) ,,,,,,,and it works, prior to the seasons average but the xSea_surf (below)</div><div><br clear="none"></div><div> xSea_surf = month_to_seasonN(o3x_surf_flip,(/"DJF","MAM","JJA","SON"/))</div><div> printVarSummary(xSea_surf)</div><div><br clear="none"></div></div>is giving this error:</div><div dir="ltr" style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px"><br clear="none"></div><div dir="ltr" style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px"><div><div>(0) contributed: month_to_seasonN: rank=2</div><div>(0) ----- rank currently not handled -----</div><div>(0) contributed: month_to_season12: rank=2</div><div>(0) ----- rank currently not handled -----</div><div>fatal:Illegal right-hand side type for assignment</div><div><br clear="none"></div></div>I haven't seen this rank error before. Please help out.</div><div dir="ltr" style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px"><br clear="none"></div><div dir="ltr" style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px">Thank you</div></div><br clear="none"></div><div><br clear="none"></div><div><br clear="none"></div><div><br clear="none"></div><div><br clear="none"></div><div dir="ltr">Summary of variables</div><div dir="ltr"><div><div>Variable: o3x</div><div>Type: float</div><div>Total Size: 148635648 bytes</div><div> 37158912 values</div><div>Number of Dimensions: 4</div><div>Dimensions and sizes: [time | 12] x [lev | 56] x [lat | 192] x [lon | 288]</div><div>Coordinates:</div><div> time: [2953..3287]</div><div> lev: [1.867879997007549..992.5000106104562]</div><div> lat: [ -90.. 90]</div><div> lon: [ 0..358.75]</div><div>Number Of Attributes: 4</div><div> mdims : 1</div><div> units : mol/mol</div><div> long_name : O3 concentration</div><div> cell_methods : time: mean</div><div><br clear="none"></div><div>Variable: o3x_surf</div><div>Type: float</div><div>Total Size: 221184 bytes</div><div> 55296 values</div><div>Number of Dimensions: 2</div><div>Dimensions and sizes: [lat | 192] x [lon | 288]</div><div>Coordinates:</div><div> lat: [ -90.. 90]</div><div> lon: [ 0..358.75]</div><div>Number Of Attributes: 6</div><div> lev : 992.5000106104562</div><div> time : 2953</div><div> cell_methods : time: mean</div><div> long_name : O3 concentration</div><div> units : mol/mol</div><div> mdims : 1</div><div>(0) O3 concentration (mol/mol) : min=3.61245 max=77.7517</div><div><br clear="none"></div><div>Variable: o3x_surf_flip</div><div>Type: float</div><div>Total Size: 221184 bytes</div><div> 55296 values</div><div>Number of Dimensions: 2</div><div>Dimensions and sizes: [lat | 192] x [lon | 288]</div><div>Coordinates:</div><div> lat: [ -90.. 90]</div><div> lon: [-180..178.75]</div><div>Number Of Attributes: 7</div><div> lev : 992.5000106104562</div><div> time : 2953</div><div> cell_methods : time: mean</div><div> long_name : O3 concentration</div><div> units : mol/mol</div><div> mdims : 1</div><div> lonFlip : longitude coordinate variable has been reordered via lonFlip</div><div><br clear="none"></div><div>Variable: xMon</div><div>Type: integer</div><div>Total Size: 48 bytes</div><div> 12 values</div><div>Number of Dimensions: 1</div><div>Dimensions and sizes: [time | 12]</div><div>Coordinates:</div><div> time: [2953..3287]</div><div>Number Of Attributes: 1</div><div> long_name : current date (YYYYMMDD)</div><div><br clear="none"></div><div><br clear="none"></div><div>Variable: xMon</div><div>Type: integer</div><div>Total Size: 48 bytes</div><div> 12 values</div><div>Number of Dimensions: 1</div><div>Dimensions and sizes: [time | 12]</div><div>Coordinates:</div><div> time: [2953..3287]</div><div>Number Of Attributes: 1</div><div> long_name : current date (YYYYMMDD)</div><div>(0) 20130201</div><div>(1) 20130301</div><div>(2) 20130401</div><div>(3) 20130501</div><div>(4) 20130601</div><div>(5) 20130701</div><div>(6) 20130801</div><div>(7) 20130901</div><div>(8) 20131001</div><div>(9) 20131101</div><div>(10) 20131201</div><div>(11) 20140101</div><div>(0) contributed: month_to_seasonN: rank=2</div><div>(0) ----- rank currently not handled -----</div><div>(0) contributed: month_to_season12: rank=2</div><div>(0) ----- rank currently not handled -----</div><div>fatal:Illegal right-hand side type for assignment</div><div>fatal:["Execute.c":8637]:Execute: Error occurred at or near line 8300 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl</div><div><br clear="none"></div><div>fatal:["Execute.c":8637]:Execute: Error occurred at or near line 55 in file month_to_seasO3.ncl</div><div><br clear="none"></div></div><br clear="none"></div><div><div dir="ltr" style="font-family:Helvetica,Arial,sans-serif;font-size:16px"><div><p style="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_-1983183415710362852gmail-m_-1775148573297990538yiv9548229058gmail-m_-3453637723940766088ydp766c7059yiv5048509013ydp2fa15795yiv8158744610yMail_cursorElementTracker_1626107004843">-------------</span>--</span></b></font></p><p style="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_-1983183415710362852gmail-m_-1775148573297990538yiv9548229058gmail-m_-3453637723940766088ydp766c7059yiv5048509013ydp2fa15795yiv8158744610ydpe5107903yiv2904767006yMail_cursorElementTracker_1625609058231"><span style="background-color:rgb(255,255,255)" lang="EN-ZA"><font style="background-color:inherit" size="2" color="#5b8828"><b>Najib Yusuf Galadanci Ph.D.</b></font></span></span></p><p style="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_-1983183415710362852gmail-m_-1775148573297990538yiv9548229058gmail-m_-3453637723940766088ydp766c7059yiv5048509013ydp2fa15795yiv8158744610ydpe5107903yiv2904767006yMail_cursorElementTracker_1625609090665"><span style="background-color:rgb(255,255,255)" lang="EN-ZA"><font style="background-color:inherit" size="2" color="#5b8828"><b>Assistant Director (R & D)</b></font></span></span></p><span id="gmail-m_-1983183415710362852gmail-m_-1775148573297990538yiv9548229058gmail-m_-3453637723940766088ydp766c7059yiv5048509013ydp2fa15795yiv8158744610yMail_cursorElementTracker_1626106986344" style="font-family:Helvetica,Arial,sans-serif;background-color:rgb(91,136,40)"><b><font size="2" color="#5b8828"></font></b></span><p style="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="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="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="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="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="margin:0in 0in 0.0001pt;background-image:initial;background-position:initial;background-repeat:initial;background-size:auto"><span id="gmail-m_-1983183415710362852gmail-m_-1775148573297990538yiv9548229058gmail-m_-3453637723940766088ydp766c7059yiv5048509013ydp2fa15795yiv8158744610ydpe5107903yiv2904767006yMail_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">Know that Victory comes with Patience, </div><div style="margin:0in 0in 0.0001pt;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial">Relief with Affliction, and Ease with Hardship.</div><p style="margin:0in 0in 0.0001pt;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial">Prophet Muhammad Rasulullah</p><p style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><span> </span></p></div><br clear="none"></div></div></div>
<div><br clear="none"></div><div><br clear="none"></div>
</div><div id="gmail-m_-1983183415710362852gmail-m_-1775148573297990538yiv9548229058gmail-m_-3453637723940766088yahoo_quoted_4176107393">
<div style="font-family:Helvetica,Arial,sans-serif;font-size:13px;color:rgb(38,40,42)">
<div>
On Friday, May 27, 2022, 11:58:25 AM GMT+1, Najib Yusuf <<a rel="nofollow noopener noreferrer" shape="rect" href="mailto:najibgal@yahoo.com" target="_blank">najibgal@yahoo.com</a>> wrote:
</div>
<div><br clear="none"></div>
<div><br clear="none"></div>
<div><div id="gmail-m_-1983183415710362852gmail-m_-1775148573297990538yiv9548229058gmail-m_-3453637723940766088yiv2977952838"><div><div style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px"><div><div dir="ltr">Dear Dennis,</div><div dir="ltr"><br clear="none"></div><div dir="ltr">I have done as you advise, 1 to 5 all work out, thank you, but I had to do this first:</div><div dir="ltr"><br clear="none"></div><div dir="ltr"><div><div>o3x_surf_flip := lonFlip(o3x_surf)<br clear="none"></div><div> printVarSummary(o3x_surf_flip) ,,,,,,,and it works, prior to the seasons average but the xSea_surf (below)</div><div><br clear="none"></div><div> xSea_surf = month_to_seasonN(o3x_surf_flip,(/"DJF","MAM","JJA","SON"/))</div><div> printVarSummary(xSea_surf)</div><div><br clear="none"></div></div>is giving this error:</div><div dir="ltr"><br clear="none"></div><div dir="ltr"><div><div>(0) contributed: month_to_seasonN: rank=2</div><div>(0) ----- rank currently not handled -----</div><div>(0) contributed: month_to_season12: rank=2</div><div>(0) ----- rank currently not handled -----</div><div>fatal:Illegal right-hand side type for assignment</div><div><br clear="none"></div></div>I haven't seen this rank error before. Please help out.</div><div dir="ltr"><br clear="none"></div><div dir="ltr">Thank you</div><div><div dir="ltr" style="font-family:Helvetica,Arial,sans-serif;font-size:16px"><div><p style="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_-1983183415710362852gmail-m_-1775148573297990538yiv9548229058gmail-m_-3453637723940766088yiv2977952838ydp766c7059yiv5048509013ydp2fa15795yiv8158744610yMail_cursorElementTracker_1626107004843">-------------</span>--</span></b></font></p><p style="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_-1983183415710362852gmail-m_-1775148573297990538yiv9548229058gmail-m_-3453637723940766088yiv2977952838ydp766c7059yiv5048509013ydp2fa15795yiv8158744610ydpe5107903yiv2904767006yMail_cursorElementTracker_1625609058231"><span style="background-color:rgb(255,255,255)" lang="EN-ZA"><font style="background-color:inherit" size="2" color="#5b8828"><b>Najib Yusuf Galadanci Ph.D.</b></font></span></span></p><p style="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_-1983183415710362852gmail-m_-1775148573297990538yiv9548229058gmail-m_-3453637723940766088yiv2977952838ydp766c7059yiv5048509013ydp2fa15795yiv8158744610ydpe5107903yiv2904767006yMail_cursorElementTracker_1625609090665"><span style="background-color:rgb(255,255,255)" lang="EN-ZA"><font style="background-color:inherit" size="2" color="#5b8828"><b>Assistant Director (R & D)</b></font></span></span></p><span id="gmail-m_-1983183415710362852gmail-m_-1775148573297990538yiv9548229058gmail-m_-3453637723940766088yiv2977952838ydp766c7059yiv5048509013ydp2fa15795yiv8158744610yMail_cursorElementTracker_1626106986344" style="font-family:Helvetica,Arial,sans-serif;background-color:rgb(91,136,40)"><b><font size="2" color="#5b8828"></font></b></span><p style="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="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="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="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="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="margin:0in 0in 0.0001pt;background-image:initial;background-position:initial;background-repeat:initial;background-size:auto"><span id="gmail-m_-1983183415710362852gmail-m_-1775148573297990538yiv9548229058gmail-m_-3453637723940766088yiv2977952838ydp766c7059yiv5048509013ydp2fa15795yiv8158744610ydpe5107903yiv2904767006yMail_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">Know that Victory comes with Patience, </div><div style="margin:0in 0in 0.0001pt;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial">Relief with Affliction, and Ease with Hardship.</div><p style="margin:0in 0in 0.0001pt;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial">Prophet Muhammad Rasulullah</p><p style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><span> </span></p></div><br clear="none"></div></div></div>
<div><br clear="none"></div><div><br clear="none"></div>
</div><div id="gmail-m_-1983183415710362852gmail-m_-1775148573297990538yiv9548229058gmail-m_-3453637723940766088yiv2977952838yqt91589"><div id="gmail-m_-1983183415710362852gmail-m_-1775148573297990538yiv9548229058gmail-m_-3453637723940766088yiv2977952838yahoo_quoted_4298614745">
<div style="font-family:Helvetica,Arial,sans-serif;font-size:13px;color:rgb(38,40,42)">
<div>
On Thursday, May 26, 2022, 03:36:37 PM GMT+1, Dennis Shea <<a rel="nofollow noopener noreferrer" shape="rect" href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>> wrote:
</div>
<div><br clear="none"></div>
<div><br clear="none"></div>
<div><div id="gmail-m_-1983183415710362852gmail-m_-1775148573297990538yiv9548229058gmail-m_-3453637723940766088yiv2977952838"><div><div dir="ltr">It is always best to examine the variable's structure via printVarSummary(...)<br clear="none"><br clear="none">[1]<br clear="none"> o3x = f[:]->O3<br clear="none"> printVarSummary(o3x) ; I speculate 4 dimensions (time,level,lat,lon)<br clear="none"><br clear="none">[2]<br clear="none"> o3x_surf = o3x(0,55,:,:)<br clear="none"> printVarSummary(o3x_surf) ; TWO dimension (lat,lon); NO 'time' dimension<br clear="none"><br clear="none"> I think you want<br clear="none"> o3x_surf = o3x(:,55,:,:) ; (time,lat,lon)<br clear="none"><br clear="none">[3]<br clear="none">; seasons average at surface<br clear="none"> xDJF = month_to_seasonN(o3x,(/"DJF","MAM","JJA","SON"/))<br clear="none"> printVarSummary(xDJF) ; I speculate (4,lat,lon)<br clear="none"><br clear="none">The name xDJF implies a one season mean for DJF but it is not.<br clear="none">I think it should contain 4 seasonal means<br clear="none"><br clear="none">I think you should name it xSea for 'season'<br clear="none"> xSea_surf = month_to_seasonN(o3x_surf,(/"DJF","MAM","JJA","SON"/))<br clear="none"> printVarSummary(xSea_surf) ; I speculate (4,lat,lon)<br clear="none"><br clear="none">[4]<br clear="none"> The following creates a scalar variable of type string<br clear="none"> o3x_surf1 = "DJF"<br clear="none"> print(03x_surf1)<br clear="none"><br clear="none"> I have no idea why you are doing this.<br clear="none"> ***This has no spatial information.*** It cannot be plotted on a map.<br clear="none"><br clear="none"><br clear="none">[5]<br clear="none">The rest is too confusing to explain.<br clear="none"><br clear="none">To get to the 'answer'<br clear="none"> xSea_surf(4,lat,lon)<br clear="none"><br clear="none">has spatial coordinates:<br clear="none"> lat: [ -90.. 90]<br clear="none"> lon: [ 0..358.75]<br clear="none"><br clear="none">You must use <a rel="nofollow noopener noreferrer" shape="rect" href="https://www.ncl.ucar.edu/Document/Functions/Contributed/lonFlip.shtml" target="_blank"><b>lonFlip</b></a> to get longitudes to get the -180->180 range<br clear="none"> xSea_surf :=<a rel="nofollow noopener noreferrer" shape="rect" href="https://www.ncl.ucar.edu/Document/Functions/Contributed/lonFlip.shtml" target="_blank"><b> lonFlip</b></a>(xSea_surf)<br clear="none"><div> printVarSummary(xSea_surf) ; look at 'new' coordinates</div><div><br clear="none"></div><div>--</div><div> res@gsnLeftString = "DJF_dry cold"<br clear="none"> plot1 = gsn_csm_contour_map_ce(wks,xSea_surf(0,{-35:35},{-30:60}),res)</div><div><br clear="none"></div><div> res@gsnLeftString = "MAM_dry warm"<br clear="none"> plot2 = gsn_csm_contour_map_ce(wks,xSea_surf2(1,:,:),res)</div><div><br clear="none"></div><div>etc <br clear="none"></div><div>=======</div><div><br clear="none"></div><div>I did this VERY QUICKLY. there may be errors but you shuld have the idea of how to proceed.</div><div><br clear="none"></div><div>Good Luck<br clear="none"></div><div> </div></div><br clear="none"><div><div id="gmail-m_-1983183415710362852gmail-m_-1775148573297990538yiv9548229058gmail-m_-3453637723940766088yiv2977952838yqt92524"><div dir="ltr">On Thu, May 26, 2022 at 6:59 AM Najib Yusuf via ncl-talk <<a rel="nofollow noopener noreferrer" shape="rect" href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:<br clear="none"></div><blockquote 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:16px"><div dir="ltr">Dear NCL experts and colleagues,</div><div dir="ltr"><br clear="none"></div><div dir="ltr">I have an error with the subscripting in the attached script while trying to plot spatial distribution month_to_season surface Ozone model data. I did try to change my subscripting to solve the error but seems beyond my little understanding of subscripting in ncl. Kindly assist.</div><div dir="ltr"><br clear="none"></div><div dir="ltr"><div><div>Variable: o3x_surf</div><div>Type: float</div><div>Total Size: 221184 bytes</div><div> 55296 values</div><div>Number of Dimensions: 2</div><div>Dimensions and sizes: [lat | 192] x [lon | 288]</div><div>Coordinates:</div><div> lat: [ -90.. 90]</div><div> lon: [ 0..358.75]</div><div>Number Of Attributes: 6</div><div> lev : 992.5000106104562</div><div> time : 2953</div><div> cell_methods : time: mean</div><div> long_name : O3 concentration</div><div> units : mol/mol</div><div> mdims : 1</div><div>(0) O3 concentration (mol/mol) : min=3.61245 max=77.7517</div><div><br clear="none"></div><div>Variable: xMon</div><div>Type: integer</div><div>Total Size: 48 bytes</div><div> 12 values</div><div>Number of Dimensions: 1</div><div>Dimensions and sizes: [time | 12]</div><div>Coordinates:</div><div> time: [2953..3287]</div><div>Number Of Attributes: 1</div><div> long_name : current date (YYYYMMDD)</div><div><br clear="none"></div><div><br clear="none"></div><div>Variable: xMon</div><div>Type: integer</div><div>Total Size: 48 bytes</div><div> 12 values</div><div>Number of Dimensions: 1</div><div>Dimensions and sizes: [time | 12]</div><div>Coordinates:</div><div> time: [2953..3287]</div><div>Number Of Attributes: 1</div><div> long_name : current date (YYYYMMDD)</div><div>(0) 20130201</div><div>(1) 20130301</div><div>(2) 20130401</div><div>(3) 20130501</div><div>(4) 20130601</div><div>(5) 20130701</div><div>(6) 20130801</div><div>(7) 20130901</div><div>(8) 20131001</div><div>(9) 20131101</div><div>(10) 20131201</div><div>(11) 20140101</div><div>fatal:Number of subscripts do not match number of dimensions of variable,(2) Subscripts used, (1) Subscripts expected</div><div>fatal:["Execute.c":8637]:Execute: Error occurred at or near line 137 in file month_to_seasO3.ncl</div><div><br clear="none"></div></div><br clear="none"></div><div><br clear="none"></div><div><div dir="ltr" style="font-family:Helvetica,Arial,sans-serif;font-size:16px"><div><p style="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_-1983183415710362852gmail-m_-1775148573297990538yiv9548229058gmail-m_-3453637723940766088yiv2977952838gmail-m_4856345064671843630ydp766c7059yiv5048509013ydp2fa15795yiv8158744610yMail_cursorElementTracker_1626107004843">-------------</span>--</span></b></font></p><p style="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_-1983183415710362852gmail-m_-1775148573297990538yiv9548229058gmail-m_-3453637723940766088yiv2977952838gmail-m_4856345064671843630ydp766c7059yiv5048509013ydp2fa15795yiv8158744610ydpe5107903yiv2904767006yMail_cursorElementTracker_1625609058231"><span style="background-color:rgb(255,255,255)" lang="EN-ZA"><font style="background-color:inherit" size="2" color="#5b8828"><b>Najib Yusuf Galadanci Ph.D.</b></font></span></span></p><p style="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_-1983183415710362852gmail-m_-1775148573297990538yiv9548229058gmail-m_-3453637723940766088yiv2977952838gmail-m_4856345064671843630ydp766c7059yiv5048509013ydp2fa15795yiv8158744610ydpe5107903yiv2904767006yMail_cursorElementTracker_1625609090665"><span style="background-color:rgb(255,255,255)" lang="EN-ZA"><font style="background-color:inherit" size="2" color="#5b8828"><b>Assistant Director (R & D)</b></font></span></span></p><span id="gmail-m_-1983183415710362852gmail-m_-1775148573297990538yiv9548229058gmail-m_-3453637723940766088yiv2977952838gmail-m_4856345064671843630ydp766c7059yiv5048509013ydp2fa15795yiv8158744610yMail_cursorElementTracker_1626106986344" style="font-family:Helvetica,Arial,sans-serif;background-color:rgb(91,136,40)"><b><font size="2" color="#5b8828"></font></b></span><p style="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="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="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="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="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="margin:0in 0in 0.0001pt;background-image:initial;background-position:initial;background-repeat:initial;background-size:auto"><span id="gmail-m_-1983183415710362852gmail-m_-1775148573297990538yiv9548229058gmail-m_-3453637723940766088yiv2977952838gmail-m_4856345064671843630ydp766c7059yiv5048509013ydp2fa15795yiv8158744610ydpe5107903yiv2904767006yMail_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">Know that Victory comes with Patience, </div><div style="margin:0in 0in 0.0001pt;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial">Relief with Affliction, and Ease with Hardship.</div><p style="margin:0in 0in 0.0001pt;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial">Prophet Muhammad Rasulullah</p><p style="margin-bottom:0.0001pt;text-align:justify;line-height:normal"><span> </span></p></div><br clear="none"></div></div></div></div>_______________________________________________<br clear="none">
ncl-talk mailing list<br clear="none">
<a rel="nofollow noopener noreferrer" shape="rect" href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br clear="none">
List instructions, subscriber options, unsubscribe:<br clear="none">
<a rel="nofollow noopener noreferrer" shape="rect" href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br clear="none">
</blockquote></div></div>
</div></div></div>
</div>
</div></div></div></div></div>
</div>
</div></div></blockquote></div></div>
</div></div></div>
</div>
</div></div></blockquote></div>