[ncl-talk] Error in reading in multiple files

Shani Tiwari pshanitiwari at gmail.com
Thu Dec 28 02:12:04 MST 2017


Dear NCL users
                         I want to read multiple CALIPSO data files (5444
files) and add all file files in every five days average but I got the
error.
*Dimension sizes of left hand side and right hand side of assignment do not
match*
 Here is my script following the calipso_3.ncl at
https://www.ncl.ucar.edu/Ap
<https://www.ncl.ucar.edu/Applications/calipso.shtml>
plications/calipso.shtml
<https://www.ncl.ucar.edu/Applications/calipso.shtml>. Kindly help me to
overcome this problem.

;----------------------------------------------
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/ut_string.ncl"
;----------------------------------------------
begin

;----------------------------------------------
;  OPEN CALIPSO FILES of the selected year, month and days
;----------------------------------------------
; define year, month, date (yyyys, mms, dds) as strings
;----------------------------------------------
 yyyys = (/"2014"/)
 mms   = (/"06","07","08","09","10","11","12"/)
 dds   = (/"01","02","03","04","05","06","07","08","09","10", \
           "11","12","13","14","15","16","17","18","19","20", \
  "21","22","23","24","25","26","27","28","29","30", "31"/)

 ;kyy=14     ; year 20kyy
  jmm=7      ; month  jmm

;----------------------------------------------
; setting directory of the data files
;----------------------------------------------

 diri = "/Volumes/OSX/CALIPSO/L2V410/2014/"

;----------------------------------------------
;----------------------------------------------
;  LOOP TO GET FILE NAMES OF A DAY SEQUENTIALLY
;  AND READ THE FILE
;----------------------------------------------
;----------------------------------------------

do idd=0,5  ;30                                           ; loop for day
(idd-1).

 fili = systemfunc("cd "+diri+" ; ls CAL_LID_L2_05kmAPro-Standard-V
4-10."+yyyys+"-"+mms(jmm-1)+"-"+dds(idd)+"*N.hdf ")
 nfil = dimsizes(fili)                                   ; nfil = number of
CALIPSO files, use for loop.

;print (nfil)

 f = addfiles(diri+fili,"r")


end do

;print (f)

end

------------------------------------------------------------
Shani Tiwari, Ph.D.
Graduate School of Environmental Studies,
Nagoya University, Nagoya, Japan
Mob: +91 9451952997 <+91%2094519%2052997>
Skype ID: shani.tiwari2
Research Gate: Dr. Shani Tiwari
<https://www.researchgate.net/profile/Shani_Tiwari2>
Google Scholar Web-page: Dr. Shani Tiwari
<https://scholar.google.co.jp/citations?user=IjIjMTMAAAAJ&hl=en>
-------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171228/6ac5fc6e/attachment.html>


More information about the ncl-talk mailing list