Re: warning:ScalarFieldSetValues: coordinate array sfXArray requires 15475147 elements: defaulting

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu, 16 Apr 2009 09:41:06 -0600 (MDT)

Estatio,

You are setting sfXArray and sfYArray, *and* setting 1D coordinate
arrays. This is misleading because you are giving NCL two different
sets of lat/lon data to represent the locations of your data array.

Since you already set sfXArray and sfYArray, try commenting out the
code where you create lat/lon coordinate arrays for "n":

; n!0 = "lat"
; n!1 = "lon"
; n&lat = lat
; n&lon = lon

Otherwise, you can try leaving the above code alone, and commenting out
the settings for sfXArray and sfYArray.

--Mary

On Thu, 16 Apr 2009, Estatio Gutierrez wrote:

> Hi.
>
> I'm just want to make a contour plot of Land surface temperature from a MODIS-HDF file and I'm getting this error message:
>
> warning:ScalarFieldSetValues: coordinate array sfXArray requires 15475147 elements: defaulting
>
> I don't have any idea how to solve this problem. Could you give me some suggestions? You can see the code below.
>
> Thank you very much.
>
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
>
> begin
>
> hdf=addfile(dir+"MYD11C2.A2009073.005.2009090205119.hdf","r")
>
> n=hdf->LST_Night_CMG*0.02
> n@_FillValue=0
> n@_FillValue=-999
>
> n_at_units="(K)"
> r=True
> r_at_tiMainString = "Temperature (K)"
> r_at_tiXAxisString = "Longitude"
> r_at_tiYAxisString = "Latitude"
> r_at_gsnMaximize = True
> r_at_cnFillOn = True
> r_at_cnMonoFillPattern = True
> r_at_cnMonoFillColor = False
> r_at_cnMonoLineColor = False
> r_at_cnLineLabelsOn = False
> r_at_cnInfoLabelOn = False
> r_at_pmLabelBarDisplayMode = "Always"
> r_at_lbPerimOn = False
> r_at_sfXArray = lon
> r_at_sfYArray = lat
> r_at_mpMinLatF = 40.0 ; map area
> r_at_mpMaxLatF = 41.6 ; latitudes
> r_at_mpMinLonF = -75.0 ; and
> r_at_mpMaxLonF = -72.0 ; longitudes
>
> nlat = 3600
> nlon=7200
> lat = latGlobeFo(nlat, "lat", "latitude", "degrees_north")
> lat = lat(::-1)
> lon = lonGlobeFo(nlon, "lon", "longitude", "degrees_east")
> n!0 = "lat"
> n!1 = "lon"
> n&lat = lat
> n&lon = lon
>
> n=lonFlip(n)
> printVarSummary(n)
>
> wks = gsn_open_wks("x11","h3")
>
> setvalues NhlGetWorkspaceObjectId()
> "wsMaximumSize" : 110000000
> end setvalues
>
> gsn_define_colormap(wks,"BlueDarkRed18")
>
> plot = gsn_csm_contour_map(wks,n,r)
>
> end
>
>
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Apr 16 2009 - 09:41:06 MDT

This archive was generated by hypermail 2.2.0 : Thu Apr 16 2009 - 10:05:49 MDT