Dear All,
We have been trying to run the NCL script to convert ROTMER monthly
postprocessed output of RegCM3 into regular lat long grid. But find
the following error.
------------------------------------------------
[root_at_localhost root]# ncl rcm2grid.ncl
fatal:Number of dimensions in parameter (0) of (rcm2rgrid) is (3), (2)
dimensions were expected
fatal:Execute: Error occurred at or near line 38 in file rcm2grid.ncl
-----------------------------------------------
 nc dump files of the outhead.nc and surface.nc file used in the script.
Also the script for this convertion is also pasted at the end.
thanks in advance,
Regards,
----------------------------------------------
------------------------------------------------
[root_at_localhost root]# ncl_filedump outhead.nc
 Variable: f (file variable)
filename:       outhead
path:   outhead.nc
   file global attributes:
      Conventions : COARDS
      calendar : standard
      comments : file created by grads using lats4d available from
http://dao.gsfc.nasa.gov/sofware/grads/lats4d/
      model : geos/das
      center : gsfc
   dimensions:
      time = 1  // unlimited
      longitude = 303
      latitude = 226
   variables:
      double time ( time )
         units :        hours since 2001-1-1 0
-----------------------------------------------------
----------------------------------------------------
filename:       SRF
path:   SRF.nc
   file global attributes:
      domxmin : 52.37275
      domxmax : 108.0947
      domymin : -2.378861
      domymax : 44.79095
      domzmin : 1050
      domzmax : 1050
   dimensions:
      lon = 118
      lat = 109
      time = 132  // unlimited
   variables:
      float lon ( lon )
         long_name :    Longitude
         units :        degrees_east
         actual_range : <ARRAY>
      float lat ( lat )
         long_name :    Latitude
         units :        degrees_north
         actual_range : <ARRAY>
-----------------------------------------------------------
NCL SCRIPT
-----------------------------------------------------------
load "/usr/local/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "/usr/local/lib/ncarg/nclscripts/csm/shea_util.ncl"
load "/usr/local/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "/usr/local/lib/ncarg/nclscripts/csm/contributed.ncl"
;********************************************
begin
dirhead="/root/"
filhead="outhead.nc"
dirrcm="/root/"
filrcm="SRF.nc"
fhead=addfile(dirhead+filhead,"r")
f1 = addfile(dirrcm+filrcm,"r")
var = f1->RT
lat2d = fhead->xlat(0,:,:)
lon2d = fhead->xlong(0,:,:)
newlon = new((/280/),typeof(lon2d))
newlat = new((/200/),typeof(lat2d))
do j=0,279
newlon(j)= 50+(0.25)*j
end do
do i=0,199
newlat(i)=-5+(0.25)*i
end do
newvar = rcm2rgrid(lat2d,lon2d,var,newlat,newlon,0)
end
------------------------------------------------
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Mar 29 2007 - 01:58:34 MDT
This archive was generated by hypermail 2.2.0 : Sun Apr 01 2007 - 11:52:46 MDT