Re: [ncl-install] short2flt

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Wed, 29 Apr 2009 16:01:58 -0600

The following was inadvertently sent to ncl-install_at_ucar.edu
It should have been sent to ncl-talk_at_ucar.edu
------------------------------------------------------------

The MJO diagnostics that have been posted as examples. They are
meant as 'guide' for user. They are not 'plug-and-go'.
Users must adjust for the datasets they are using.

They were developed using a particular set of files. The array rank
[ 3D (time,lat,lon) or 4D (time,lev,lat,lon) ] and variable type
[eg, short, float, double] will vary depending on the data source
and variable.

mjoclivar_2.ncl was using OLR. That is a 3D variable.
It was type 'short' on the source netCDF file. Hence,

             x = short2flt( f->$var$(iStrt:iLast,:,:) )

If the variable is 4D (time,lev,lat,lon) and the level to be processed
is lev=0
then
             x = short2flt( f->$var$(iStrt:iLast,0,:,:) )

=====

If creating netCDF output, he example reads variables "lat"
and "lon" [your variable names may differ]. You must alter to
fit your data
    
      if (NC) then

        lat = f->lat
        lon = f->lon

....
Later is gets the type and dimension name

        filevardef(fnc, "time" ,typeof(time),getvardims(time))
        filevardef(fnc, "lat" ,typeof(lat) ,getvardims(lat))
        filevardef(fnc, "lon" ,typeof(lon) ,getvardims(lon))

you must change to fit your data.

Boa Sorte
D

Cristiano Prestrelo wrote:
> Hi,
>
> In example file mjoclivar_2.ncl in line 63 the function ( x
> = short2flt( f->$var$(iStrt:iLast,:,:) ) ) this missing in a one
> dimensions the correct is x = short2flt(
> f->$var$(iStrt:iLast,0,:,:) ) ok ???
>
>
> when I run this script with my data shows the following error:
>
>
> fatal:(lon) is not a dimension name in variable (x), could not
> determine dimension number
> fatal:Execute: Error occurred at or near line 3252 in file
> $NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl
>
> fatal:Execute: Error occurred at or near line 69 in file mjoclivar_2.ncl
>
>
> What this means?
>
> Regards,
>
> Cristiano
>
> ------------------------------------------------------------------------
> Descubra quais produtos Windows Live tem mais a ver com você! Faça o
> teste! <http://www.windowslive.com.br>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ncl-install mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-install
>

-- 
======================================================
Dennis J. Shea                  tel: 303-497-1361    |
P.O. Box 3000                   fax: 303-497-1333    |
Climate Analysis Section                             |
Climate & Global Dynamics Div.                       |
National Center for Atmospheric Research             |
Boulder, CO  80307                                   |
USA                        email: shea 'at' ucar.edu |
======================================================
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Apr 29 2009 - 16:01:58 MDT

This archive was generated by hypermail 2.2.0 : Thu Apr 30 2009 - 15:56:01 MDT