[ncl-talk] problems with regriding

Dennis Shea shea at ucar.edu
Thu Aug 21 15:12:20 MDT 2014


[1]
I would say it is highly unlikely that "NCL is not correctly plotting the
data"!
NCL is plotting what you sent it.

[2]
Did you examine the output from

printVarSummary(var)

[snip]

Dimensions and sizes: [TIME | 360] x [lat | 149] x [lon | 182]
Coordinates:
            TIME: [76.5..3636.5]
            lat: [1..149]                  <================
            lon: [1..182]                <====================

The coordinates associated with 'var' are numbers spanning 1-149 and 1-182
These are *not* latitudes or longitudes. So, when you  use

new_var = linint2_Wrap(var&lon,var&lat,var,True,new_lon,new_lat,0)
You could do you own 'debugging by printing the input

print(var&lon)
print(var&lat)

Punch line ... you are inputting number 1 to 149 and 1 to 182
NCL is interpolating to those values.

Use

ncl_filedump

or

ncdump  -h

on your source file. That should have some lat.lon info





On Thu, Aug 21, 2014 at 2:12 PM, Vanúcia Schumacher <
vanucia-schumacher at hotmail.com> wrote:

> Hi users,
>
> I do regridding data for resolution of 2 degrees and the NCL is not
> correctly plotting the data, it is cutting the data to the new resolution
> as opposed to a new lat and lon.
>
> >begin
>
> >var = f[:]->SST
>
> >var!1="lat"
> >var!2="lon"
> >j=var!1
> >i=var!2
>
> newfile = "tos_90x180.nc"
>
> file_create = addfile(newfile, "c")
>
> new_lon = fspan(0,358, 180)
> new_lon at units = "degrees_east"
> new_lon!0 = "lon"
>
> new_lat = fspan(-87.86, 87.86, 90)
> new_lat at units = "degrees_north"
> new_lat!0 = "lat"
>
> new_var = linint2_Wrap(var&lon,var&lat,var,True,new_lon,new_lat,0)
>
> file_create->tos = new_var
>
>
> Variable: var
> Type: double
> Total Size: 78099840 bytes
>             9762480 values
> Number of Dimensions: 3
> Dimensions and sizes: [TIME | 360] x [lat | 149] x [lon | 182]
> Coordinates:
>             TIME: [76.5..3636.5]
>             lat: [1..149]
>             lon: [1..182]
> Number Of Attributes: 4
>   missing_value : -9.999999999999999e+33
>   _FillValue : -9.999999999999999e+33
>   long_name : TOS[L=3:122]
>   history : From tos_Omon_CMCC-CM_decadal1980_r1i1p1_198011-199012
>
> Variable: new_var
> Type: double
> Total Size: 46656000 bytes
>             5832000 values
> Number of Dimensions: 3
> Dimensions and sizes: [TIME | 360] x [lat | 90] x [lon | 180]
> Coordinates:
>             TIME: [76.5..3636.5]
>             lat: [-87.86..87.86]
>             lon: [ 0..358]
> Number Of Attributes: 4
>   missing_value : -9.999999999999999e+33
>   _FillValue : -9.999999999999999e+33
>   long_name : TOS[L=3:122]
>   history : From tos_Omon_CMCC-CM_decadal1980_r1i1p1_198011-199012
>
>
>
> ---
> Vanúcia Schumacher
> Mestranda em Meteorologia - UFV
> Meteorologista -UFPel
> Departamento de Meteorologia Agrícola - DEA
> Cel: (31) 9978 2522
> DEA: (31) 3899 1890
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140821/6219b5cf/attachment.html 


More information about the ncl-talk mailing list