WRF and rcm2rgrid

From: David Porter <porterdf_at_nyahnyahspammersnyahnyah>
Date: Wed, 14 Oct 2009 17:37:57 -0600

Hi,

I am having problems when trying to regrid my WRF output to a gaussian
grid (to compare to a reanalysis). The regridded data is mostly, but
not all, missing values. The WRF domain is pan-arctic. I have a
feeling it is due to the ordering of the 2D lat/lon arrays. I have
enclosed both my script and output.

Thanks
Dave

  Copyright (C) 1995-2009 - All Rights Reserved
  University Corporation for Atmospheric Research
  NCAR Command Language Version 5.1.1
  The use of this software is governed by a License Agreement.
  See http://www.ncl.ucar.edu/ for more details.

Variable: fi
Type: float
Total Size: 1804000 bytes
             451000 values
Number of Dimensions: 3
Dimensions and sizes: [Time | 8] x [south_north | 205] x [west_east
| 275]
Coordinates:
Number Of Attributes: 6
   FieldType : 104
   MemoryOrder : XY
   description : TOA OUTGOING LONG WAVE
   units : W m-2
   stagger :
   coordinates : XLONG XLAT
(0)
(0) TOA OUTGOING LONG WAVE: min=95.4118 max=304.182

Variable: lat2d
Type: float
Total Size: 225500 bytes
             56375 values
Number of Dimensions: 2
Dimensions and sizes: [south_north | 205] x [west_east | 275]
Coordinates:
Number Of Attributes: 5
   FieldType : 104
   MemoryOrder : XY
   description : LATITUDE, SOUTH IS NEGATIVE
   units : degrees_north
   stagger :

Variable: lon2d
Type: float
Total Size: 225500 bytes
             56375 values
Number of Dimensions: 2
Dimensions and sizes: [south_north | 205] x [west_east | 275]
Coordinates:
Number Of Attributes: 5
   FieldType : 104
   MemoryOrder : XY
   description : LONGITUDE, WEST IS NEGATIVE
   units : degrees_east
   stagger :

Variable: fir
Type: float
Total Size: 1638400 bytes
             409600 values
Number of Dimensions: 3
Dimensions and sizes: [Time | 8] x [lat | 160] x [lon | 320]
Coordinates:
             lat: [-89.14152..89.14152]
             lon: [ 0..358.875]
Number Of Attributes: 8
   _FillValue : -999
   FieldType : 104
   MemoryOrder : XY
   description : TOA OUTGOING LONG WAVE
   units : W m-2
   stagger :
   coordinates : XLONG XLAT
   ncl : rcm2rgrid used for interpolation

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
;load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
load "/home/porterdf/src/NCL/WRFUserARW.ncl"

begin
   f = addfile("/data4/porterdf/wrfout20001231.nc","r")
   fi = f->OLR
   lat2d = f->XLAT(0,:,:)
   lon2d = f->XLONG(0,:,:)
   lat2d_at_units = "degrees_north"
   lon2d_at_units = "degrees_east"
           printVarSummary(fi)
           printMinMax(fi, True )
           printVarSummary(lat2d)
           printVarSummary(lon2d)

   jlat = latGau(160, "lat", "latitude", "degrees_north")
   jlon = lonGlobeF(320, "lon", "longitude", "degrees_east")

   fir = rcm2rgrid_Wrap(lat2d,lon2d,fi,jlat,jlon,1)
     printVarSummary(fir)

;************************************************
; create plot
;************************************************
   plDir = "./" ; output dir for plots
   plFile = "test"
   type = "x11" ; create variable
to hold info
   type_at_wkColorModel = "cmyk" ; make output cmyk
   wks = gsn_open_wks(type,plDir+plFile) ; open a ps
file
   gsn_define_colormap(wks,"testcmap") ; choose colormap

   res = True ; plot mods desired
   res_at_gsnPolar = "NH" ; select the N. Hem.
   res_at_mpMinLatF = 60 ; minimum lat to plot
   res_at_mpFillOn = False
   res_at_cnFillOn = True ; color fill
   res_at_cnLinesOn = False ; no contour lines

   res_at_gsnSpreadColors = True ; use full colormap
   res_at_gsnSpreadColorStart = 2
   res_at_gsnSpreadColorEnd = -3

     plot = gsn_csm_contour_map_polar(wks,fir(0,:,:), res)

end
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Oct 14 2009 - 17:37:57 MDT

This archive was generated by hypermail 2.2.0 : Thu Oct 15 2009 - 09:30:48 MDT