Hi David,
(I did get your email about the landmask regridding.) Strange that only 
part of the data is being regridded correctly, in this case from 
60W->180W.  Can you place the data (the landmask file will do) on our 
ftp site so I can take a look?
ftp ftp.cgd.ucar.edu
cd incoming
put filename.nc
Let me know the exact name of the file, and I will take a look at it 
when I get a chance, which might not be before tomorrow morning.
Best regards,
Adam
David Porter wrote:
> Adam,
> 
> Thanks!  Good call.  They did not match.
> 
> (0)     LATITUDE, SOUTH IS NEGATIVE: min=16.535   max=89.7878
> (0)     LONGITUDE, WEST IS NEGATIVE: min=-179.995   max=179.997
> (0)     latitude: min=-89.1415   max=89.1415
> (0)     longitude: min=0   max=358.875
> 
> I did the following to remedy this:  jlon = jlon - (358.875 / 2)
> 
> This produces somewhat better results, still not quite right, see ( http://cires.colorado.edu/~porterdf/regridOLR.ps 
>   and http://cires.colorado.edu/~porterdf/ncview.LANDMASK.ps )
> (0)     longitude: min=-179.438   max=179.438
> 
> Thanks again.
> Dave
> 
> 
> 
> 
> On Oct 14, 2009, at 5:46 PM, Adam Phillips wrote:
> 
>> Hi David,
>> Make sure that the range of longitudes of your WRF data matches the  
>> range of longitudes in your new longitude array (jlon).
>> I'd do a printMinMax on the lon2d array to check. If the ranges of  
>> your input/output longitudes do match, let us know and we can take a  
>> deeper look.
>> Best regards,
>> Adam
>>
>> David Porter wrote:
>>> 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@units = "degrees_north"
>>>   lon2d@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@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@gsnPolar   = "NH"                            ; select the N.  
>>> Hem.
>>>   res@mpMinLatF  = 60                           ; minimum lat to plot
>>>   res@mpFillOn   = False
>>>   res@cnFillOn          = True                  ; color fill
>>>   res@cnLinesOn         = False                 ; no contour lines
>>>   res@gsnSpreadColors     = True                ; use full colormap
>>>   res@gsnSpreadColorStart = 2
>>>   res@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
>> -- 
>> __________________________________________________
>> Adam Phillips asphilli@ucar.edu
>> National Center for Atmospheric Research   tel: (303) 497-1726
>> Climate and Global Dynamics Division         fax: (303) 497-1333
>> P.O. Box 3000				
>> Boulder, CO 80307-3000    http://www.cgd.ucar.edu/cas/asphilli
> 
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-- __________________________________________________ Adam Phillips asphilli@ucar.edu National Center for Atmospheric Research tel: (303) 497-1726 Climate and Global Dynamics Division fax: (303) 497-1333 P.O. Box 3000 Boulder, CO 80307-3000 http://www.cgd.ucar.edu/cas/asphilli _______________________________________________ ncl-talk mailing list List instructions, subscriber options, unsubscribe: http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Thu, 15 Oct 2009 13:54:27 -0600
This archive was generated by hypermail 2.1.8 : Thu Oct 22 2009 - 12:22:52 MDT