0.40x0.40 to 1.0x1.0 grid

From: Gabrielle Ferreira Pires <gabrielle.pires_at_nyahnyahspammersnyahnyah>
Date: Tue, 17 Mar 2009 11:49:00 -0300

Hello there!

I have a 0.40x0.40 file and I want to turn it into 1.0x1.0 grid. I get
the correct coordinates, but when I try to open the netcdf file I created,
there's no value for the variable.
I also get the warnings:

warning:linint2: xi, yi, xo, and yo must be monotonically increasing
warning:Dimension (0) has not been defined
I'm sending my script and the ncdump of my 0.40x0.40 file, of my 1.0x1.0
file, in case it'll help! Thanks!!

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/csm/shea_util.ncl"

a = addfile("/home/mhcosta/gabrielle/graciela/RATE02_0.40g.200101.SA.nc<http://rate02_0.40g.200101.sa.nc/>"
b = a->NEE
lon = a->lon
lat = a->lat
c = addfile("/home/mhcosta/gabrielle/graciela/RATE_200101_1.0.nc<http://rate_200101_1.0.nc/>",

new_lon = fspan(-99.5, -30.5, 70)
new_lat = fspan(-59.5, 19.5, 80)

new_inmatrix = linint2_Wrap(lon,lat,b,True,new_lon,new_lat,0)
    new_inmatrix!0 ="time"
    new_inmatrix!1 ="lat"
    new_inmatrix!2 = "lon"
    new_inmatrix&lat = new_lat
    new_inmatrix&lon = new_lon
    new_inmatrix&lat_at_units = "degrees_north"
    new_inmatrix&lon_at_units = "degrees_east"

    c->NEE = new_inmatrix

Gabrielle Ferreira Pires
Graduanda em Engenharia Ambiental
Universidade Federal de Viosa

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:

Received on Tue Mar 17 2009 - 08:49:00 MDT

This archive was generated by hypermail 2.2.0 : Wed Mar 18 2009 - 14:50:21 MDT