Project

General

Profile

generic to rectilinear and mean the file

Added by kunal bali over 1 year ago

Hi,

Hi have several files, a few are attached.

All the attached files are in generic coordinates.

I want to convert it into rectilinear and make it one grid file.

I am having an issue with the

daymean
function as well. I guess it is coming with generic coordinates, everyfile has a different xsize and ysize numbers.

Maybe after converting it into rectilinear I can do the mean of all the attached files.

#
# gridID 1
#
gridtype  = generic
gridsize  = 180
xsize     = 3
ysize     = 60
#
# gridID 2
#
gridtype  = generic
gridsize  = 36360
xsize     = 60
ysize     = 606

Replies (1)

RE: generic to rectilinear and mean the file - Added by kunal bali over 1 year ago

Also, I tried to convert this generic file to rectilinear via NCL

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" 
;
OutFileName = "scrip_grid.nc" 
;
f     = addfile ("2019m0729t2230.nc", "r")
lat2d = f->lat                        
lon2d = f->lon                        
; 
Opt                      = True
Opt@InterpMethod         = "bilinear"     ; default
Opt@ForceOverwrite       = True
Opt@PrintTimings         = True
;
curvilinear_to_SCRIP(OutFileName,lat2d,lon2d,Opt)

But getting issues with this. I have used this script before, but this time it's not working.

    (1-1/1)