Re: Regrid T62 data to POP grid

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Wed Oct 30 2013 - 13:27:30 MDT

I am not sure about this but I speculate that the
variable 'air' on the file is type short.
It *must* be unscaled prior to use.

   short air(time,lat,lon)
   ^^^^^

plus it will have associated attributes named:
"add_offset" and "scale_factor"

===

Try:

   var = short2flt(f->air)

http://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt.shtml

===
The 1st rule of data processing is 'look at your data'.

Please use the following to examimine file contents.

%> ncdump -h air.2m.gauss.1997.nc | less

or

%> ncl_filedump air.2m.gauss.1997.nc | less

On 10/30/13 11:48 AM, Prasad, Siva wrote:
> Hi all,
>
> I am new to NCL. I have generated a weight file for T62
> (map_T62_to_gx3_bilin_da_301310.nc)
>
> I tried to use the following ncl script to remap to the POP but it shows
> error
>
> 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/popRemap.ncl"
>
> a = addfile("air.2m.gauss.1997.nc","r")
> var = a->air
> remap = PopLatLon(var,"T62","gx3","bilin","da","301310")
>
> out=addfile("t_10.nc","c")
> filedimdef(out,"time",-1,True)
> out->t10=remap
>
> I get the following error
>
> (0)
> (0) create_rmpPopFileName: ./map_T62_to_gx3_bilin_da_301310.nc
> fatal:pop_remap: dst_array must be of type float or double
> fatal:["Execute.c":8128]:Execute: Error occurred at or near line 462 in
> file $NCARG_ROOT/lib/ncarg/nclscripts/csm/popRemap.ncl
>
> fatal:["Execute.c":8128]:Execute: Error occurred at or near line 642 in
> file $NCAT
>
> Thanks and Regards
> Nandu
>
>
>
> _______________________________________________
> 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 30 13:27:40 2013

This archive was generated by hypermail 2.1.8 : Fri Nov 01 2013 - 08:58:14 MDT