[ncl-install] [ncl-talk] Data processing problem

Jiang, Lifen lfjiang at ou.edu
Wed Feb 13 10:42:08 MST 2013


Oops, sorry about that. 

Thank you for checking the problem. I will try.
 
Lifen


2013-02-13 



Jiang, Lifen 



发件人: Dennis Shea 
发送时间: 2013-02-13  09:48:26 
收件人: Jiang, Lifen 
抄送: ncl-install 
主题: Re: [ncl-install] [ncl-talk] Data processing problem 
 
[1] You posted this to 'ncl-install'
     This is for installing NCL on your system not NCL questions.
[2] "Panoply" is not NCL. All Panoply questions should be sent to
      the Panoply help site ... not NCL. We know nothing about
      Panoply.
[3] What do you mean by "wrong names" ?
     If you did
         t  = short2flt(in->med_c0)
     then
         printVarSummary(t)
     it will show you the original dimension information.
     If you did some NCL processing and you did not handle
     the meta data (eg, dimension names), then NCL will
     provide default dimension names (ncl0. ncl1, ...)
---
You should do the following from the command line
   %> ncdump -h med_x0_kgm-2.nc  | less
or
   %> ncl_filedump med_x0_kgm-2.nc  | less
Either will show the real dimension names.
On 02/13/2013 08:22 AM, Jiang, Lifen wrote:
> Hi Dennis,
> Thank you for your reply!
> When I delete "(::5,::10)", the numbers of lat and lon are right but
> still have wrong names like this and cann't read by Panoply :
> I never changed the names for lat and lon. I really don't know what had
> happened to this.
> Thank you in advance for your time if you can take a look at this.
> Lifen
> 2013-02-13
> ------------------------------------------------------------------------
> Jiang, Lifen
> ------------------------------------------------------------------------
> *发件人:* Dennis Shea
> *发送时间:* 2013-02-12  22:03:33
> *收件人:* Jiang, Lifen
> *抄送:* ncl-talk at ucar.edu
> *主题:* Re: [ncl-talk] Data processing problem
> The data on the *file* may be 1676 x 4320
> BUT you sub-sampled the data (decimated)
> t  = short2flt(in->med_c0(::5,::10))
> decimates the lat dimension to 1/5 the original size (1676/5)
> and
> decimates the lon dimension to 1/10 the original size (4320/10)
> -----
> If you want to retain the original dimensions
> t  = short2flt(in->med_c0)     ; read all the data
> Good Luck
> On 2/12/13 8:51 PM, Jiang, Lifen wrote:
>  > Hello,
>  > I have a data set with two dimensions: lat=1676 and lon=4320; Variable type is short; Missing data are -32768 but many values of -9999 and -9998 should also be treated as missing values.
>  > I want to divide all values by 10 but the returned result has two dimensions: nc10=336 and nc11=432 instead of lat=1676 and lon=4320. And I can’t plot it at all.
>  > I greatly appreciate if anyone can help check what’s wrong with my scripts as bellow.
>  > Regards,
>  > Lifen
>  > **************************************************************************
>  >      load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
>  >
>  >      in = addfile("med_c0.nc",  "r")
>  >
>  >
>  >      t  = short2flt(in->med_c0(::5,::10))  ; convert to float
>  >      t at _FillValue  = -32768
>  >      t at missing_value = t at _FillValue
>  >      t = where(t .lt. -9997, t at _FillValue, t)
>  >
>  >      y  = t/10
>  >      printVarSummary(y)
>  >
>  >
>  >      system("/bin/rm -f med_c0_kgm-2.nc")
>  >      fout         = addfile("med_c0_kgm-2.nc", "c")   ; new netCDF file
>  >      fout at title   = "kg/m2"
>  >      fout->y   = y
>  >
>  >
>  >
>  >
>  >
>  >
>  > _______________________________________________
>  > ncl-talk mailing list
>  > List instructions, subscriber options, unsubscribe:
>  > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>  >
>
>
> _______________________________________________
> ncl-install mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-install
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-install/attachments/20130213/bcfd258e/attachment-0001.html 


More information about the ncl-install mailing list