[ncl-talk] error in dimension

Karin Meier-Fleischer meier-fleischer at dkrz.de
Thu Dec 7 07:11:04 MST 2017


Hi Ehsan,

the syntax for multiple files is correct

   prc = f[:]->precipitationCal(lat|:,lon|:)

Are you sure that all files have the same dimensions and names?

-Karin


Am 07.12.17 um 14:53 schrieb Ehsan Taghizadeh:
> Dear Karin
> Thank you so much for your nice reply. However for
>   prc    = f[:]->precipitationCal
> printVarSummary(prc)
>
> I got:
> Copyright (C) 1995-2017 - All Rights Reserved
>  University Corporation for Atmospheric Research
>  NCAR Command Language Version 6.4.0
>  The use of this software is governed by a License Agreement.
>  See http://www.ncl.ucar.edu/ for more details.
> warning:Aggregated dimension coordinate values are non-monotonic; 
> check aggregated file ordering
>
> Variable: prc
> Type: float
> Total Size: 849120 bytes
>             212280 values
> Number of Dimensions: 2
> Dimensions and sizes:   [lon | 3480] x [lat | 61]
> Coordinates:
>             lon: [40.05..51.55]
>             lat: [34.25..40.25]
> Number Of Attributes: 6
>   units :       mm
>   long_name :   Daily accumulated precipitation (combined 
> microwave-IR) estimate
>   coordinates : lat lon
>   _FillValue :  -9999.9
>   origname :    precipitationCal
>   fullnamepath :        /precipitationCal
>
> In fact for one file, I don't have any problem and following lines 
> work correctly:
>   f = addfile(filess,"r")
>   prc = f->precipitationCal(lat | :, lon | :)
>
> however for multiple files I counter problem. I attached 3 files which 
> I want to open.
> As Karin mentioned the problem is related to "Dimenstions and sizes". 
> So how could I point to a variable and simultaneous reorder (lat, lon) 
> dimension in case of multiple files?
> I mean what is the form of
>   f = addfile(filess,"r")
>   prc = f->precipitationCal(lat | :, lon | :)
> for multiple files?
>
> Again I'll be thankful for any help.
>
> Sincerely
> Ehsan
>
> On Thursday, December 7, 2017, 4:51:40 PM GMT+3:30, Karin 
> Meier-Fleischer <meier-fleischer at dkrz.de> wrote:
>
>
> Hi Ehsan,
>
> please, have a look at your data first. Do
>
>   prc    = f[:]->precipitationCal
>   printVarSummary(prc)
>
> to see what dimension names precipitationCal has.
>
> -Karin
>
> Am 07.12.17 um 12:18 schrieb Ehsan Taghizadeh:
>> Hi, I want to open multiple netcdf files. Also I had to change 
>> dimesion of variable (precipitationCal(lat | :, lon | :)), but I got 
>> an error (fatal:(lat) is not a dimension name in variable (lon), 
>> could not determine dimension number). What should I do?
>> Following lines are simple code.
>>
>>    diri = "path/"   ; input directory
>>    files = systemfunc("ls "+diri+"3B-DAY-L.MS.MRG.3IMERG.201704*.nc") 
>> ; file paths
>>    f = addfiles(files,"r")
>>   prc    = f[:]->precipitationCal(lat | :, lon | :)       ; read 
>> precipitation from all files
>>
>>
>> Sincerely
>> Ehsan
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
> _______________________________________________
> 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/20171207/f0a94a3b/attachment.html>


More information about the ncl-talk mailing list