Plot from WRF Grib files / renaming variables

From: Jonas Kaufmann <jonas.kaufmann_at_nyahnyahspammersnyahnyah>
Date: Tue Jul 03 2012 - 05:30:19 MDT

Hello,

I am trying to create a plot based on my WRF run. I am not using the
direct WRF output files, but the converted Grib files instead and
convert them again to NetCDF. My WRF domain is set up over Europe and
I want to plot the area in Mercator projection.

I can successfully plot the whole area with (example only):

fin = addfile(grib_file,"r")
wind_u = fin->U_GRD_GDS3_HTGL(:,:)
wind_v = fin->V_GRD_GDS3_HTGL(:,:)
wind_speed = sqrt(wind_u^2+wind_v^2)
lat2d = fin->g3_lat_0
lon2d = fin->g3_lon_1
[...]
res1@mpProjection = "Mercator"
res1@mpLimitMode = "Corners"
res1@mpLeftCornerLatF = lat2d@corners(0)
res1@mpLeftCornerLonF = lon2d@corners(0)
res1@mpRightCornerLatF = lat2d@corners(2)
res1@mpRightCornerLonF = lon2d@corners(2)
[...]
plot = gsn_csm_vector_scalar_map(wks, wind_u, wind_v, wind_speed, res1)

...however I cannot limit the range of the plot using mpLimitMode =
"LatLon" and setting mpMinLatF etc. This always gives me the error:
check_for_y_lat_coord: Warning: Data either does not contain a valid
latitude coordinate array or doesn't contain one at all.
[...]

According to the error message FAQ
(http://www.ncl.ucar.edu/Document/Graphics/error_msg.shtml), I should
rename the variable names to the automatically found variable names
like "lat" and "lon". However I do not manage to get this to run
correctly.

What is the correct syntax to rename the variables and display my plot
with mpLimitMode = "LatLon"? As an attachment you can find a
ncl_filedump of the WRF file. Thank you for your help!

Best regards,

Jonas Kaufmann

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Tue Jul 3 05:30:49 2012

This archive was generated by hypermail 2.1.8 : Tue Jul 03 2012 - 15:40:39 MDT