[ncl-talk] (no subject)

Karin Meier-Fleischer meier-fleischer at dkrz.de
Mon Apr 18 03:02:43 MDT 2016


Hi Yan,

the problem is the dot within the variable name. Write the variable name 
p110.162 to a string variable and enclose it with $...$ to import the 
variable with "->" :

    name = "p110.162"
    a = f->$name$(:,:,:,:)

Bye,
Karin

Am 18.04.16 um 05:22 schrieb WIND:
> Hi all,
> I am trying to analyze the ERA-20C temperature tendency due to physics 
> data. My version is 6.2.1 and I cannot read the data by
>  a=f->p110.162(:,:,:,:)
> the error says
>  fatal:syntax error: line 18 before or near .162
>  a=f->p110.162
> The file data is listed as
>  file global attributes:
>       Conventions : CF-1.6
>       history : 2016-04-18 01:42:30 GMT by grib_to_netcdf-1.14.5: 
> grib_to_netcdf
>  /data/data01/scratch/_mars-atls17-95e2cf679cd58ee9b4db4dd119a05a8d-b7PJNh.grib
> -o 
> /data/data01/scratch/_grib2netcdf-atls09-95e2cf679cd58ee9b4db4dd119a05a8d-WLB
> 95O.nc -utime
>    dimensions:
>       longitude = 144
>       latitude = 13
>       level = 91
>       time = 33  // unlimited
>    variables:
>       float longitude ( longitude )
>          units :        degrees_east
>          long_name :    longitude
>
>       float latitude ( latitude )
>          units :        degrees_north
>          long_name :    latitude
>
>       integer level ( level )
>          long_name :    model_level_number
>
>       integer time ( time )
>          units :        hours since 1900-01-01 00:00:0.0
>          long_name :    time
>          calendar :     gregorian
>
>       short p110.162 ( time, level, latitude, longitude )
>          scale_factor : 0.001885669448575691
>          add_offset :   21.14551006902327
>          _FillValue :   -32767
>          missing_value :        -32767
>          units :        K
>          long_name :    Tendency of temperature due to physics
> Are there ways I can read this variable? Any help you could lend would 
> be appreciated.
>
> Yan
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> 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/20160418/97e7fc30/attachment.html 


More information about the ncl-talk mailing list