Hi,
I'm working on regridding some of the IPCC AR4 model data, and I'm having
issues regridding with the srcFile/srcGrid. I followed the example pretty
much verbatim, but my issue is I'm not sure which type of method_to_SCRIP
to use. I have the description in the header below, it's a global model (I
commented the official min/max lat/lons). I thought it would be a lat/lon,
but I'm not sure...
The script is below
Thanks for you time
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl"
;--------------------------------------------------------
; Interpolate a file bilinear
; Michelle Cipullo
; 6/15/12
; bccr_bcm2_0 is a Gaussian Grid
;T63L31: A triangular truncation T63 with “linear” reduced Gaussian grid
equivalent to T42 quadratic grid (2.8 °). See: Hortal and Simmonds (1991)
for description of the linear reduced grid.
; After plotting it appears to be a lat/lon grid
;---------------------------------------------
begin
Opt = True
;------Interpolation method and addinf files
method = (/"bilinear"/)
srcFileName = "bccr_Feb_A2.nc"
destFile = "bccr_dest.nc" ;not a file i have
;-------Output/input
srcGridName = "bccr_src_SCRIP.nc" ;file to create
dstGridName = "bccr_dst_SCRIP.nc" ;file to create
wgtFile_b = "bcc_bilinear.nc" ;file to create
bccr = addfile(srcFileName,"r")
temp_pert = bccr->diff(:,:,:)
bccr_lat = bccr->lat
bccr_lon = bccr->lon
;____0 is treated as missing value, so fill it____
temp_pert = where(temp_pert.eq.0,temp_pert@_FillValue,temp_pert)
;_____Check region/assign region___
minlon = min(bccr_lon)
maxlon = max(bccr_lon)
minlat = min(bccr_lat)
maxlat = max(bccr_lat)
print("min/max lat = " +minlat+"/" +maxlat) ; -87.8638/87.8638
print("min/max lon = " +minlon+"/"+maxlon) ; 0/357.188
;_______Convert to a SCRIP convention file____
Opt = True
Opt@ForceOverwrite = True
Opt@PrintTimings = True
Opt@Title = "BCCR lat/lon grid"
latlon_to_SCRIP(dstGridName,"1x1",Opt)
delete(Opt)
Opt = True
Opt@ForceOverwrite = True
Opt@PrintTimings = True
*curvilinear_to_SCRIP(srcGridName,bccr_lat,bccr_lon,Opt) ;*tried
rectilinear as well and lat/lon. (?)
delete(Opt)
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jun 18 07:37:44 2012
This archive was generated by hypermail 2.1.8 : Mon Jun 25 2012 - 09:57:23 MDT