<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:16px"><div dir="ltr" id="yui_3_16_0_1_1448377166405_2933"><span id="yui_3_16_0_1_1448377166405_2960">thanks Dennis for your reply. <br></span></div><div id="yui_3_16_0_1_1448377166405_3187" dir="ltr"><span id="yui_3_16_0_1_1448377166405_2960">I used ls only in the systemfunc .</span></div><div id="yui_3_16_0_1_1448377166405_3197" dir="ltr"><span id="yui_3_16_0_1_1448377166405_2960"><br></span></div><div id="yui_3_16_0_1_1448377166405_3198" dir="ltr"><span id="yui_3_16_0_1_1448377166405_2960">My data is of different years. hence I wanted to see if the files are being in the right order in which I wanted (2011, 2013,2014 and 2015). Hence I wanted the date of each file too. </span></div><div id="yui_3_16_0_1_1448377166405_3213" dir="ltr"><br><span id="yui_3_16_0_1_1448377166405_2960"></span></div><div id="yui_3_16_0_1_1448377166405_3214" dir="ltr"><span id="yui_3_16_0_1_1448377166405_2960">I have modified the script slightly to include that. It is like this. <br></span></div><div id="yui_3_16_0_1_1448377166405_3215" dir="ltr"><span id="yui_3_16_0_1_1448377166405_2960"> ntrmm = dimsizes(trmm)<br class="" id="yui_3_16_0_1_1448377166405_3306">; print(ntrmm)<br class="" id="yui_3_16_0_1_1448377166405_3308"><br class="" id="yui_3_16_0_1_1448377166405_3310">; do i = 0, ntr mm-1,1<br class="" id="yui_3_16_0_1_1448377166405_3312">; print(i)<br class="" id="yui_3_16_0_1_1448377166405_3314"> trmm0 = trmm[0]->r(0,:,:)<br class="" id="yui_3_16_0_1_1448377166405_3316"> trmmdate0 = trmm[0]->time<br class="" id="yui_3_16_0_1_1448377166405_3318"> print(trmmdate0)</span></div><div id="yui_3_16_0_1_1448377166405_3321" dir="ltr"><br><span id="yui_3_16_0_1_1448377166405_2960"></span></div><div dir="ltr"><br><span id="yui_3_16_0_1_1448377166405_2960"></span></div><div dir="ltr"><span id="yui_3_16_0_1_1448377166405_2960">the output looks like this. <br></span></div><div id="yui_3_16_0_1_1448377166405_3501" dir="ltr"><span id="yui_3_16_0_1_1448377166405_2960">ariable: trmm0<br class="" id="yui_3_16_0_1_1448377166405_3438">Type: float<br class="" id="yui_3_16_0_1_1448377166405_3440">Total Size: 2304000 bytes<br class="" id="yui_3_16_0_1_1448377166405_3442"> 576000 values<br class="" id="yui_3_16_0_1_1448377166405_3444">Number of Dimensions: 2<br class="" id="yui_3_16_0_1_1448377166405_3446">Dimensions and sizes: [latitude | 400] x [longitude | 1440]<br class="" id="yui_3_16_0_1_1448377166405_3448">Coordinates: <br class="" id="yui_3_16_0_1_1448377166405_3450"> latitude: [-49.875..49.875]<br class="" id="yui_3_16_0_1_1448377166405_3452"> longitude: [0.125..359.875]<br class="" id="yui_3_16_0_1_1448377166405_3454">Number Of Attributes: 8<br class="" id="yui_3_16_0_1_1448377166405_3456"> time : 0<br class="" id="yui_3_16_0_1_1448377166405_3458"> long_name : daily (0Z-21Z) rainfall total<br class="" id="yui_3_16_0_1_1448377166405_3460"> units : mm<br class="" id="yui_3_16_0_1_1448377166405_3462"> grid_name : grid-1<br class="" id="yui_3_16_0_1_1448377166405_3464"> grid_type : linear<br class="" id="yui_3_16_0_1_1448377166405_3466"> level_description : Earth surface<br class="" id="yui_3_16_0_1_1448377166405_3468"> _FillValue : -9999.9<br class="" id="yui_3_16_0_1_1448377166405_3470"> coordinates : time latitude longitude<br class="" id="yui_3_16_0_1_1448377166405_3472"><br class="" id="yui_3_16_0_1_1448377166405_3474"><br class="" id="yui_3_16_0_1_1448377166405_3476">Variable: trmmdate0<br class="" id="yui_3_16_0_1_1448377166405_3478">Type: double<br class="" id="yui_3_16_0_1_1448377166405_3480">Total Size: 8 bytes<br class="" id="yui_3_16_0_1_1448377166405_3482"> 1 values<br class="" id="yui_3_16_0_1_1448377166405_3484">Number of Dimensions: 1<br class="" id="yui_3_16_0_1_1448377166405_3486">Dimensions and sizes: [time | 1]<br class="" id="yui_3_16_0_1_1448377166405_3488">Coordinates: <br class="" id="yui_3_16_0_1_1448377166405_3490"> time: [ 0.. 0]<br class="" id="yui_3_16_0_1_1448377166405_3492">Number Of Attributes: 1<br class="" id="yui_3_16_0_1_1448377166405_3494"> units : hours since 2011-04-22 00:00:00Z<br class="" id="yui_3_16_0_1_1448377166405_3496">(0) 0<br class="" id="yui_3_16_0_1_1448377166405_3498"></span></div><div id="yui_3_16_0_1_1448377166405_3502" dir="ltr"><span id="yui_3_16_0_1_1448377166405_2960"><br></span></div><div id="yui_3_16_0_1_1448377166405_3211" dir="ltr"><br></div><div dir="ltr">I have 5 of TRMM files. I tried read the trmm using the do loop, But unsuccessful. this is what I have done now for this<br></div><div dir="ltr"><br></div><div id="yui_3_16_0_1_1448377166405_3844" dir="ltr">18 trmmf = systemfunc("ls 3B42_daily.20*.nc") ; TRMM RF 22 May 2013<br class="" id="yui_3_16_0_1_1448377166405_3795"> 19 trmma = addfiles(trmmf,"r") ; TRMM RF 22 May 2013<br class="" id="yui_3_16_0_1_1448377166405_3797"> 20 trmms = trmma[0]<br class="" id="yui_3_16_0_1_1448377166405_3799"> 21 <br class="" id="yui_3_16_0_1_1448377166405_3801"> 22 wrff = systemfunc("ls wrfout_d03_20*_00:00:00") ; model rainfall<br class="" id="yui_3_16_0_1_1448377166405_3803"> 23 wrfa = addfiles(wrff,"r")<br class="" id="yui_3_16_0_1_1448377166405_3805"> 24 wrfs = wrfa[0]<br class="" id="yui_3_16_0_1_1448377166405_3807"> 25 <br class="" id="yui_3_16_0_1_1448377166405_3809"> 26 ; a = addfile("3B42_daily.2013.05.22.7.nc","r") ; TRMM RF 22 May 2013<br class="" id="yui_3_16_0_1_1448377166405_3811"> 27 <br class="" id="yui_3_16_0_1_1448377166405_3813"> 28 ; f = addfile("wrfout_d03_2013-05-21_00:00:00","r") ; model rainfall<br class="" id="yui_3_16_0_1_1448377166405_3815"> 29 <br class="" id="yui_3_16_0_1_1448377166405_3817"> 30 ; Plotting TRMM rainfall<br class="" id="yui_3_16_0_1_1448377166405_3819"> 31 var = 0<br class="" id="yui_3_16_0_1_1448377166405_3821"> 32 <br class="" id="yui_3_16_0_1_1448377166405_3823"> 33 plot = new(10,graphic)<br class="" id="yui_3_16_0_1_1448377166405_3825"> 34 wks = gsn_open_wks("ps","trmm_model")<br class="" id="yui_3_16_0_1_1448377166405_3827"> 35 gsn_define_colormap(wks,"prcp_2")<br class="" id="yui_3_16_0_1_1448377166405_3829"> 36 <br class="" id="yui_3_16_0_1_1448377166405_3831"> 37 ; print(a)<br class="" id="yui_3_16_0_1_1448377166405_3833"> 38 do n = 0, 4<br class="" id="yui_3_16_0_1_1448377166405_3835"> 39 trmms= trmma[n]<br class="" id="yui_3_16_0_1_1448377166405_3837"> 40 wrfs = wrfa[n]<br class="" id="yui_3_16_0_1_1448377166405_3839"> 41 <br class="" id="yui_3_16_0_1_1448377166405_3841"> 42 rf = trmms->r(0,:,:)</div><div id="yui_3_16_0_1_1448377166405_4124" dir="ltr"><br></div><div id="yui_3_16_0_1_1448377166405_4136" dir="ltr"><br></div><div id="yui_3_16_0_1_1448377166405_4137" dir="ltr"> rainc28 = wrfs->RAINC(28,:,:)<br class="" id="yui_3_16_0_1_1448377166405_4126"> 57 rainnc28 = wrfs->RAINNC(28,:,:)<br class="" id="yui_3_16_0_1_1448377166405_4128"> 58 rainc4 = wrfs->RAINC(4,:,:)<br class="" id="yui_3_16_0_1_1448377166405_4130"> 59 rainnc4 = wrfs->RAINNC(4,:,:)<br class="" id="yui_3_16_0_1_1448377166405_4132"> 60 ;</div><div id="yui_3_16_0_1_1448377166405_4267" dir="ltr">61 latitude = wrfs->XLAT(0,:,0)<br class="" id="yui_3_16_0_1_1448377166405_4269"> 62 longitude = wrfs->XLONG(0,0,:)<br class="" id="yui_3_16_0_1_1448377166405_4271"> 63 ; times_in_file = wrfs->Times<br class="" id="yui_3_16_0_1_1448377166405_4273"> 64 ; init = times_in_file(:,0)<br class="" id="yui_3_16_0_1_1448377166405_4275"> 65 ; print(init)<br class="" id="yui_3_16_0_1_1448377166405_4277"></div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr">I get an error at the LINE 40. <br></div><div id="yui_3_16_0_1_1448377166405_4463" dir="ltr">(0) latitude<br class="" id="yui_3_16_0_1_1448377166405_4438">(1) longitude<br class="" id="yui_3_16_0_1_1448377166405_4440">warning:_NclIRemovePrimitive: First parameter is a missing value, returning missing values<br class="" id="yui_3_16_0_1_1448377166405_4442">warning:_NclIRemovePrimitive: First parameter is a missing value, returning missing values<br class="" id="yui_3_16_0_1_1448377166405_4444">(0) latitude<br class="" id="yui_3_16_0_1_1448377166405_4446">(1) longitude<br class="" id="yui_3_16_0_1_1448377166405_4448">warning:_NclIRemovePrimitive: First parameter is a missing value, returning missing values<br class="" id="yui_3_16_0_1_1448377166405_4450">warning:_NclIRemovePrimitive: First parameter is a missing value, returning missing values<br class="" id="yui_3_16_0_1_1448377166405_4452">(0) latitude<br class="" id="yui_3_16_0_1_1448377166405_4454">(1) longitude<br class="" id="yui_3_16_0_1_1448377166405_4456">warning:_NclIRemovePrimitive: First parameter is a missing value, returning missing values<br class="" id="yui_3_16_0_1_1448377166405_4458">warning:_NclIRemovePrimitive: First parameter is a missing value, returning missing values<br class="" id="yui_3_16_0_1_1448377166405_4460">fatal:ListSelect: Index out of range<br class="" id="yui_3_16_0_1_1448377166405_4462">fatal:["Execute.c":8578]:Execute: Error occurred at or near line 40 in file trmm-model-</div><div id="yui_3_16_0_1_1448377166405_4464" dir="ltr"><br></div><div id="yui_3_16_0_1_1448377166405_4466" dir="ltr"><br></div><div id="yui_3_16_0_1_1448377166405_4467" dir="ltr">Dont know what's going wrong. <br></div><div id="yui_3_16_0_1_1448377166405_4066" dir="ltr"><br><span id="yui_3_16_0_1_1448377166405_2960"></span></div><div id="yui_3_16_0_1_1448377166405_4049" dir="ltr"><span id="yui_3_16_0_1_1448377166405_2960"></span></div><div id="yui_3_16_0_1_1448377166405_2954"> </div><div class="signature">Geeta.</div> <br><div class="qtdSeparateBR"><br><br></div><div style="display: block;" class="yahoo_quoted"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif; font-size: 16px;"> <div dir="ltr"><font face="Arial" size="2"> On Tuesday, 24 November 2015 12:31 AM, Dennis Shea <shea@ucar.edu> wrote:<br></font></div> <br><br> <div class="y_msg_container">Please do not start a new thread. Use the 'reply all' to keep all<br clear="none">emails together<br clear="none"><br clear="none">====<br clear="none"><br clear="none">[1]<br clear="none">Note what I suggested<br clear="none"><br clear="none"> trmm_files = systemfunc("ls 3B42_daily.20*.nc")<br clear="none"><br clear="none">I did *not* use<br clear="none"><br clear="none"> trmm_files = systemfunc("ls -l 3B42_daily.20*.nc")<br clear="none"><br clear="none">the '-l' returns much more information than just the file names.<br clear="none"><br clear="none">===<br clear="none"><br clear="none">[2]<br clear="none">Had you informed ncl-talk that you wanted data for 2011 and the file names are<br clear="none"><br clear="none">3B42_daily.2011.04.22.7.nc 3B42_daily.2014.06.05.7.nc<br clear="none">3B42_daily.2013.05.22.7.nc 3B42_daily.2015.04.23.7.nc<br clear="none">3B42_daily.2014.06.02.7.nc<br clear="none"><br clear="none">Then<br clear="none"><br clear="none"> trmm_files = systemfunc("ls 3B42_daily.2011*.nc")<br clear="none"><br clear="none"> would have been suggested. Note: no '-l'<br clear="none"><br clear="none">[3]<br clear="none">I did *not* use<br clear="none"> nfiles = ListCount(trmm)<br clear="none">but this should return the same as<br clear="none"> nfiles = dimsizes(trmm_files)<br clear="none"><br clear="none">[4]<br clear="none"><br clear="none">re: "In the printVarSummary, I dont get the time info of each file...."<br clear="none"><br clear="none">trmm_rf2011 = trmm[0]->r<br clear="none"> printVarSummary(trmm_rf2011)<br clear="none"> trmm_rf2013 = trmm[1]->r<br clear="none"> printVarSummary(trmm_rf2013)<br clear="none"> trmm_rf2014a = trmm[2]->r<br clear="none"> printVarSummary(trmm_rf2014a)<br clear="none"> trmm_rf2014b = trmm[3]->r<br clear="none"> printVarSummary(trmm_rf2014b)<br clear="none"> trmm_rf2015 = trmm[4]->r<br clear="none"> printVarSummary(trmm_rf2015)<br clear="none"><br clear="none"><br clear="none">Since you did not include any output from 'printVarSummary', how is<br clear="none">ncl-talk supposed to answer the question.<br clear="none"><div class="yqt3979912984" id="yqtfd01104"><br clear="none">On Sun, Nov 22, 2015 at 10:46 AM, Geeta Geeta <<a shape="rect" ymailto="mailto:geetag54@yahoo.com" href="mailto:geetag54@yahoo.com">geetag54@yahoo.com</a>> wrote:<br clear="none">> thanks Dennis.<br clear="none">> I want to know if "join" will add the data???.<br clear="none">> Now I have kept the default option as "cat" only.<br clear="none">> But I am facing small problem.<br clear="none">> when I use "ls -l" below<br clear="none">><br clear="none">> trmm_files = systemfunc("ls -l 3B42_daily.20*.nc") ; with ls -l<br clear="none">> printVarSummary is not shown.<br clear="none">> printVarSummary(trmm_files)<br clear="none">><br clear="none">> I dont get the output.<br clear="none">><br clear="none">> Following are the data files.<br clear="none">> <a shape="rect" ymailto="mailto:aditya@agniilap" href="mailto:aditya@agniilap">aditya@agniilap</a>:~/geeta/ncl/TS_rain$ ls 3B42*<br clear="none">> 3B42_daily.2011.04.22.7.nc 3B42_daily.2014.06.05.7.nc<br clear="none">> 3B42_daily.2013.05.22.7.nc 3B42_daily.2015.04.23.7.nc<br clear="none">> 3B42_daily.2014.06.02.7.nc<br clear="none">><br clear="none">><br clear="none">> Can I also get the time info for each file printed for me so that I know<br clear="none">> that the variable trmm_rf2011 has ONLY 2011 data???<br clear="none">><br clear="none">> trmm_files = systemfunc("ls 3B42_daily.20*.nc")<br clear="none">> date_files = systemfunc("ncdump -h 3B42_daily.20*.nc")<br clear="none">> printVarSummary(trmm_files)<br clear="none">> printVarSummary(date_files)<br clear="none">><br clear="none">> trmm = addfiles(trmm_files,"r")<br clear="none">> printVarSummary(trmm)<br clear="none">><br clear="none">> nfiles = ListCount(trmm)<br clear="none">> print(nfiles)<br clear="none">> ListSetType(trmm,"cat")<br clear="none">><br clear="none">> trmm_rf2011 = trmm[0]->r<br clear="none">> printVarSummary(trmm_rf2011)<br clear="none">> trmm_rf2013 = trmm[1]->r<br clear="none">> printVarSummary(trmm_rf2013)<br clear="none">> trmm_rf2014a = trmm[2]->r<br clear="none">> printVarSummary(trmm_rf2014a)<br clear="none">> trmm_rf2014b = trmm[3]->r<br clear="none">> printVarSummary(trmm_rf2014b)<br clear="none">> trmm_rf2015 = trmm[4]->r<br clear="none">> printVarSummary(trmm_rf2015)<br clear="none">><br clear="none">><br clear="none">> In the printVarSummary, I dont get the time info of each file....<br clear="none">><br clear="none">><br clear="none">> Geeta.</div><br clear="none">><br clear="none">> _______________________________________________<br clear="none">> ncl-talk mailing list<br clear="none">> <a shape="rect" ymailto="mailto:ncl-talk@ucar.edu" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br clear="none">> List instructions, subscriber options, unsubscribe:<br clear="none">> <a shape="rect" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><div class="yqt3979912984" id="yqtfd15639"><br clear="none">><br clear="none"></div><br><br></div> </div> </div> </div></div></body></html>