<div dir="ltr">Hi Zhuxiao,<div>Can you run the following and report back on the returned output?</div><div><br></div><div>printVarSummary(den)</div><div>plot = gsn_csm_contour_map_ce(wks,den(lat|:,lon|:),res)</div><div><br></div><div>That syntax looks good to me assuming den is a 2-dimensional array with dimension names lat and lon. </div><div><br></div><div>This syntax will likely throw an error:</div><div>den_md = wgt_areaave_Wrap(den(:,lat|:,lon|:),cost(:),1.0,0)</div><div>This is due to the fact that you are coordinate subscripting (with the lat|:,lon|: syntax) with your 1st and 2nd dimensions but you are not referring to the name of the 0th dimension.</div><div>I believe what you would need to do is something like this:</div><div><div>den_md = wgt_areaave_Wrap(den(time|:,lat|:,lon|:),cost(:),1.0,0)</div><div>Note that you need to specify time|: even though you are not reordering the time dimension.</div><div>Best,</div><div>Adam</div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Mar 14, 2026 at 5:05 PM Zhuxiao Li - NOAA Affiliate <<a href="mailto:zhuxiao.li@noaa.gov" target="_blank">zhuxiao.li@noaa.gov</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 dir="ltr"><div>Hi Adam, </div><div>How are you? </div><div>I have met a problem to deal with a 2D array, as den[lon, lat], </div><div> den!0 = "lon"<br> den&lon = lon<br> den!1 = "lat"<br> den&lat = lat<br></div><div>Note that the latitude is the fastest changing dimension. </div><div>I got a problem when I do </div><div> plot = gsn_csm_contour_map_ce(wks,den(lat|:,lon|:),res)</div><div>or den_md = wgt_areaave_Wrap(den(:,lat|:,lon|:),cost(:),1.0,0)</div><div>Got the following error message </div><div>fatal:Error in subscript, normal subscripting is being used, make sure named subscripting has not been used<br>fatal:Error in subscript, normal subscripting is being used, make sure named subscripting has not been used<br>fatal:syntax error: function gsn_csm_contour_map_ce expects 3 arguments, got 1<br>I am using NCL6.6.2</div><div>Could you please tell me the solution?</div><div>Thanks!</div><div>Zhuxiao</div><div><br></div><div><br></div><div><br></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div style="margin:0px;padding:0px 0px 20px;width:1560px;color:rgb(34,34,34);font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif"><div><div style="margin:8px 0px 0px;padding:0px"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Dr. Zhuxiao Li</div><div dir="ltr">NOAA/NWS/NCEP/SWPC</div><div dir="ltr">325 Broadway, </div><div dir="ltr">Boulder, Colorado 80305</div><div dir="ltr">303-497-4649<br><div style="margin:2px 0px 0px"><div><img src="https://ssl.gstatic.com/ui/v1/icons/mail/images/cleardot.gif" style="background-image: url("https://ci3.googleusercontent.com/meips/ADKq_NapKeXWRbMZdFh8JaDvGXyynYknLCwr6NatZUUm25MtP4JWtqaT0csR5HBIi6A5YzOX9GWteWk7lgv7sZg_YZBkWnQa0-GDZMJNnKHZo8Cl8GZMZQgSDztsXJhWpebQFwELRFT_t0s=s0-d-e1-ft#https://www.gstatic.com/images/icons/material/system/1x/more_horiz_black_20dp.png");"></div><div><br></div></div></div></div></div></div></div></div></div><div style="font-size:medium"></div></div></div></div></div></div>
</blockquote></div>