Chao,
As the error message states, you can't create 2D coordinate arrays. It is a NetCDF requirement, and hence an NCL requirement, that variable coordinate arrays be 1D.
When you have 2D lat/lon arrays, you need to set the sfYArray/sfXArray resources to these arrays.
So, remove this code:
raincc!0 = "lat"
raincc!1 = "lon"
raincc&lat = lat
raincc&lon = lon
and then before this line:
plot(0) = gsn_csm_contour_map_ce(wks_id,raincc(:,:),res)
add these three lines:
res@gsnAddCyclic = False
res@sfYArray = lat
res@sfXArray = lon
--Mary
On Nov 11, 2011, at 10:43 AM, Chao Luo wrote:
> Hi,
>
> I want to plot convective precipitation simulated by WRF by NCL. WRF output RAINC (two dimensions), and
> XLAT (two dimensions), XLONG (two dimensions). I wrote the NCL script to plot the rain. The error messages like:
>
> ---------------------------------
> fatal:Coordinate variables must have one dimension only
> fatal:No coordinate variable exists for dimension (lat) in variable (raincc)
> fatal:Execute: Error occurred at or near line 23 in file wrf.ncl
>
> fatal:Coordinate variables must have one dimension only
> fatal:No coordinate variable exists for dimension (lon) in variable (raincc)
> fatal:Execute: Error occurred at or near line 24 in file wrf.ncl
>
> ----------------------------------
>
> Attached is the script I used. Thanks very much for any help!
>
> Chao<wrf.ncl>_______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Nov 11 11:46:03 2011
This archive was generated by hypermail 2.1.8 : Mon Nov 14 2011 - 10:41:55 MST