Hi,
I'm attempting to regrid the WRF output winds using rcm2rgrid so that they
are "true" winds. At the moment, my plots of the regridded winds are
displaying a very small slice of the whole domain. The west_east has been
flipped so that they are east_west. Below is part of the script and some of
the output:
; Regrid winds to lat/lon grid rcm2rgrid_Wrap
DimLat = dimsizes(lat2d)
i = DimLat(0) ; 135
j = DimLat(1) ; 125
dlat = 90./i
dlon = 360./j
lat1D = fspan(0,(i - 1) * dlat, i)
lat1D!0 = "lat"
lat1D@units = "degrees_north"
lat1D&lat = lat1D
lon1D = fspan(0,(j - 1) * dlon, j)
lon1D!0 = "lon"
lon1D@units = "degrees_east"
lon1D&lon = lon1D
printVarSummary(lat1D)
print(lat1D)
printVarSummary(lon1D)
print(lon1D)
printVarSummary(i)
print(i)
printVarSummary(j)
print(j)
f_um_N = new((/i,j/), typeof(f_um), -999.)
f_um_N!0 = "lat"
f_um_N&lat = lat1D
f_um_N!1 = "lon"
f_um_N&lon = lon1D
f_um_N@units = f_um@units
b_um_N = new((/i,j/), typeof(b_um), -999.)
b_um_N!0 = "lat"
b_um_N&lat = lat1D
b_um_N!1 = "lon"
b_um_N&lon = lon1D
b_um_N@units = b_um@units
f_vm_N = new((/i,j/), typeof(f_vm), -999.)
f_vm_N!0 = "lat"
f_vm_N&lat = lat1D
f_vm_N!1 = "lon"
f_vm_N&lon = lon1D
f_vm_N@units = f_vm@units
b_vm_N = new((/i,j/), typeof(b_vm), -999.)
b_vm_N!0 = "lat"
b_vm_N&lat = lat1D
b_vm_N!1 = "lon"
b_vm_N&lon = lon1D
b_vm_N@units = b_vm@units
etdiff = new((/i,j/), typeof(f_vm), -999.)
etdiff!0 = "lat"
etdiff&lat = lat1D
etdiff!1 = "lon"
etdiff&lon = lon1D
etdiff@units = f_vm@units
f_um_N = rcm2rgrid(lat2d,lon2d,f_um,lat1D,lon1D,1)
b_um_N = rcm2rgrid(lat2d,lon2d,b_um,lat1D,lon1D,1)
f_vm_N = rcm2rgrid(lat2d,lon2d,f_vm,lat1D,lon1D,1)
b_vm_N = rcm2rgrid(lat2d,lon2d,b_vm,lat1D,lon1D,1)
printVarSummary(f_um_N)
printVarSummary(f_um)
printVarSummary(f_vm_N)
printVarSummary(f_vm)
.
.
res = True
res@tiMainFontHeightF = 0.012
res@tiMainPosition = "Left"
res@pmTickMarkDisplayMode = "Never"
res@pmTickMarkZone = 0.1
res@pmLabelBarOrthogonalPosF = 0.10
res@tmXTOn = False
res@tmXBOn = False
res@tmYROn = False
res@tmXTOn = False
res@gsnMaximize = True
res@gsnSpreadColors = True
res@lbOrientation = "Vertical"
res@lbTitlePosition = "Right"
res@lbTitleDirection = "Across"
res@lbTitleAngleF = 90
res@lbTitleFontHeightF = 0.015
res@lbTitleString = "m s~S~-1~N~"
res@lbTitleOffsetF = -0.001
res@lbBoxMinorExtentF = 0.12 ;.20
res@lbLabelPosition = "Right"
res@lbLabelAutoStride = True
res@lbLabelDirection = "Across"
res@lbLabelAngleF = 90
res@tfDoNDCOverlay = True
res@mpProjection = "Stereographic"
res@mpCenterLatF = 88.86
res@mpCenterLonF = 179.4
res@mpGridSpacingF = 15
res@mpGridPolarLonSpacingF = 20
res@mpLimitMode = "NPC"
res@mpLeftNPCF = 0.3525
res@mpBottomNPCF = 0.365
res@mpRightNPCF = 0.753
res@mpTopNPCF = 0.647
res@mpLimitMode = "Corners"
res@mpLeftCornerLonF = -44.9
res@mpLeftCornerLatF = 51.9
res@mpRightCornerLatF = 50.1
res@mpRightCornerLonF = 138.5
res@mpFillOn = False
res@mpFillDrawOrder = "PreDraw"
res@mpFillBoundarySets = "AllBoundaries"
res@mpFillPatternBackground = -1
res@mpGeophysicalLineColor = "Black"
res@mpGeophysicalLineThicknessF = 1.0
res@mpGridAndLimbOn = True
res@mpGridMaskMode = "MaskLand"
res@mpGridLineDashPattern = 2
res@mpPerimOn = True
res@mpPerimLineColor = "Black"
res@mpPerimLineThicknessF = 1.5
res@vcRefMagnitudeF = 5.0
res@vcRefLengthF = 0.045
res@vcMinDistanceF = 0.017
res@vcMonoLineArrowColor = False
res@stArrowLengthF = 0.015
res@stArrowStride = 5
res@stLineStartStride = 14
res@gsnDraw = False
res@gsnFrame = False
gsn_define_colormap(wks,"BlWhRe")
Variable: f_um
Type: float
Total Size: 67500 bytes
16875 values
Number of Dimensions: 2
Dimensions and sizes: [south_north | 135] x [west_east | 125]
Coordinates:
south_north: [0..134]
west_east: [124..0]
Number Of Attributes: 11
lon2d : <ARRAY of 16875 elements>
lat2d : <ARRAY of 16875 elements>
_FillMissing : -999999
pressure : 300
long_name : 300hPa wind
standard_name : eastward_wind
units : m s-1
_FillValue : -999999
missing_value : -999999
coordinates : lon lat
average_op_ncl : dim_avg over dimension: time
Variable: f_um_N
Type: float
Total Size: 67500 bytes
16875 values
Number of Dimensions: 2
Dimensions and sizes: [lat | 135] x [lon | 125]
Coordinates:
lat: [ 0..89.33334]
lon: [ 0..357.12]
Number Of Attributes: 2
units : m s-1
_FillValue : -999
Variable: f_vm
Type: float
Total Size: 67500 bytes
16875 values
Number of Dimensions: 2
Dimensions and sizes: [south_north | 135] x [west_east | 125]
Coordinates:
south_north: [0..134]
west_east: [124..0]
Number Of Attributes: 11
lon2d : <ARRAY of 16875 elements>
lat2d : <ARRAY of 16875 elements>
_FillMissing : -999999
pressure : 300
long_name : 300hPa wind
standard_name : northward_wind
units : m s-1
_FillValue : -999999
missing_value : -999999
coordinates : lon lat
average_op_ncl : dim_avg over dimension: time
Variable: f_vm_N
Type: float
Total Size: 67500 bytes
16875 values
Number of Dimensions: 2
Dimensions and sizes: [lat | 135] x [lon | 125]
Coordinates:
lat: [ 0..89.33334]
lon: [ 0..357.12]
Number Of Attributes: 2
units : m s-1
_FillValue : -999
-------------------------------------------------------------
Brandon Fisel
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Aug 5 14:27:04 2010
This archive was generated by hypermail 2.1.8 : Fri Oct 29 2010 - 13:25:49 MDT