[ncl-talk] read variable with different size dimension in multiple files

Stefane Fonseca Freitas fane.freitas at hotmail.com
Sat Oct 6 19:47:37 MDT 2018


Hi users,



I'm using TRMM precipitation features swath data. In this data, for each orbit, the variables size changes (dimensions number remains same) because only precipitation pixels are recording in the file. I want read reflectivity profile  in multiple files (~7000 files) using addfiles and join operation. I know that join requires that variables in each file must be the same size. So, my question is: is there a way to conform the dimension sizes of variables while reading the files?  Is it possible to read in NCL a variable with different dimension size in each file? Or any other suggestion how could I manipulate this variable as one file for statistical analysis?




Script:

;***********************************************************************************************************************************************************************************************

begin


 diri  = "/media/stefaneff/Seagate\ Expansion\ Drive/TRMM-PF/199801/"


   cmd  = "find "+ diri + "1Z09.* -type f -print"
   fili = systemfunc(cmd)

  nfil = dimsizes( fili )

  varname="pr_dbz"


    f=addfiles(fili, "r")

 ListSetType (f, "join")


    var=int2flt(f[:]->$varname$(::-1,:))

end
;***********************************************************************************************************************************************************************************************

Error message:

warning:File /media/stefaneff/Seagate Expansion Drive/TRMM-PF/199801/1Z09.19980101.00545.7.HDF dimension sizes do not conform to others in list; skipping file
warning:File /media/stefaneff/Seagate Expansion Drive/TRMM-PF/199801/1Z09.19980101.00544.7.HDF dimension sizes do not conform to others in list; skipping file
warning:File /media/stefaneff/Seagate Expansion Drive/TRMM-PF/199801/1Z09.19980101.00543.7.HDF dimension sizes do not conform to others in list; skipping file
warning:File /media/stefaneff/Seagate Expansion Drive/TRMM-PF/199801/1Z09.19980101.00542.7.HDF dimension sizes do not conform to others in list; skipping file
warning:File /media/stefaneff/Seagate Expansion Drive/TRMM-PF/199801/1Z09.19980101.00541.7.HDF dimension sizes do not conform to others in list; skipping file
warning:File /media/stefaneff/Seagate Expansion Drive/TRMM-PF/199801/1Z09.19980101.00540.7.HDF dimension sizes do not conform to others in list; skipping file
warning:File /media/stefaneff/Seagate Expansion Drive/TRMM-PF/199801/1Z09.19980101.00539.7.HDF dimension sizes do not conform to others in list; skipping file
warning:A valid instance of variable pr_dbz was not found in one or more elements of the file list
fatal:Number of subscripts on rhs do not match number of dimensions of aggregated join type variable, (2) subscripts used, (3) subscripts expected
fatal:["Execute.c":8637]:Execute: Error occurred at or near line 29 in file reflectivity_profile.ncl

;***********************************************************************************************************************************************************************************************

PrintVarSummary of pr_dbz in one file: first dimension has always the same size (levels), second dimension not (lat,lon)


Variable: pr_profile
Type: integer
Total Size: 10451520 bytes
            2612880 values
Number of Dimensions: 2
Dimensions and sizes:    [fakeDim6 | 80] x [fakeDim7 | 32661]
Coordinates:
Number Of Attributes: 2
  long_name :    2A25 REFLECTIVITY profiles (dBZ*100)
  hdf_name :    pr_dbz




Best regards,



Stefane Fonseca Freitas

Doutoranda em Meteorologia - PGMET - CPTEC / INPE
Centro de Previsão de Tempo e Estudos Climáticos / Instituto Nacional de Pesquisas Espaciais
Cachoeira Paulista - SP - Brasil

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181007/689d1518/attachment.html>


More information about the ncl-talk mailing list