thank you very much,Mary Haley . your suggest is right.
I see example ESMF_regrid_6.ncl. in ESMF_regrid_6.ncl,the time dimension is
only one,it works well.when I use the whole time dimensions,new problem
appears:
my ncl script is:
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/esmf/ESMF_regridding.ncl"
begin
;---Interpolation methods
methods = (/"patch"/)
;---Input file
srcFileName = "tos_Omon_MPI-ESM-P_historical_r1i1p1_185001-200512.nc"
wgtFile = "CMIP5_2_World_" + methods + ".nc"
;---Get data and lat/lon grid from CMIP5 Grid
sfile = addfile(srcFileName,"r")
thetao = sfile->tos(0,:,:)
thetao@lat2d = sfile->lat
thetao@lon2d = sfile->lon
printVarSummary(thetao)
Opt = True
Opt@SrcFileName = "CMIP5_SCRIP.nc" ; source file name
Opt@DstFileName = "World1deg_SCRIP.nc" ; destination file name
Opt@ForceOverwrite = True
Opt@SrcGridCornerLat = sfile->lat_vertices ; corners are necessary
Opt@SrcGridCornerLon = sfile->lon_vertices ; for "conserve" method
Opt@SrcMask2D = where(.not.ismissing(thetao),1,0)
Opt@DstGridType = "1x1" ; Destination grid
Opt@DstTitle = "World Grid 1-degree Resolution"
Opt@DstLLCorner = (/-89.75d, 0.00d /)
Opt@DstURCorner = (/ 89.75d, 359.75d /)
print("Generating interpolation weights from CMIP5 to")
print("World 1 degree grid using the " + methods + " method.")
Opt@WgtFileName = wgtFile
Opt@InterpMethod = methods
;----------------------------------------------------------------------
; Interpolate data from CMIP5 to World 1-degree grid.
;----------------------------------------------------------------------
thetao_regrid = ESMF_regrid(thetao,Opt)
printVarSummary(thetao_regrid)
end
fatal:Eq: Dimension size, for dimension number 0, of operands does not
match, can't continue
fatal:["Execute.c":7556]:Execute: Error occurred at or near line 1071 in
file $NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl
fatal:["Execute.c":7556]:Execute: Error occurred at or near line 2810 in
file $NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl
fatal:["Execute.c":7556]:Execute: Error occurred at or near line 2921 in
file $NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl
I don't know what the problem is. thank you.
-------------------------------------------------------------------
-----ÔʼÓʼþ-----
From: Mary Haley
Sent: Monday, October 01, 2012 1:49 AM
To: Ëïyan
Cc: ncl-talk@ucar.edu
Subject: Re: [ncl-talk] cmip5 ¡°lon2d,lat2d¡±data
On Sep 27, 2012, at 6:28 PM, Ëïyan wrote:
> hello,
> (1) I use cmip5 data, many datas are ¡°lon2d,lat2d¡±data.when I use
> ¡°rcm2rgrid¡± function to regrid,some region is FillValue.why?
> (2) how to deal with ¡°lon2d,lat2d¡±data?
> thank you
>
There's not enough information to help you. It doesn't surprise me that you
would have missing values, especially if the rectilinear grid goes outside
the range of your curvilinear grid.
Did you print out any values, or try plotting the regridded data to see if
it looks correct?
You can also visit our ESMF regridding page. See example ESMF_regrid_6.ncl:
http://www.ncl.ucar.edu/Applications/ESMF.shtml#ex6
--Mary
>
> ------------------------------------------------------------------
>
> National Key Laboratory of Atmospheric Sciences and
> Geophysical Fluid Dynamics (LASG),
> Institute of Atmospheric Physics (IAP),
> Chinese Academy of Sciences (CAS),
>
> -------------------------------------------------------------------
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Oct 10 01:24:43 2012
This archive was generated by hypermail 2.1.8 : Fri Oct 12 2012 - 15:38:19 MDT