<div dir="ltr"><div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px;text-decoration-style:initial;text-decoration-color:initial;margin-top:0px;margin-bottom:0px">Hi,</div><div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px;text-decoration-style:initial;text-decoration-color:initial;margin-top:0px;margin-bottom:0px"><br></div><div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px;text-decoration-style:initial;text-decoration-color:initial;margin-top:0px;margin-bottom:0px">I have 6 hrly ERA-Interim data stored in chunks of monthly files in short format (i.e., each file have their own scale and offset factor). When I read such multiple files in ncl (i.e., using v->f[:]) and convert to float (i.e., using short2flt), I do not get the correct result since the scale and offset of the first file is used for all the files.</div><div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px;text-decoration-style:initial;text-decoration-color:initial;margin-top:0px;margin-bottom:0px"><br></div><div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px;text-decoration-style:initial;text-decoration-color:initial;margin-top:0px;margin-bottom:0px">Solution : I can unpack and repack the files in a single file, but that is against the purpose of storing the data in optimal compact format. I am looking for a solution to read every file, convert to float and then concatenate the data. Can this be done? Or any other more effcient solution. Any help is appreciated.</div><div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px;text-decoration-style:initial;text-decoration-color:initial;margin-top:0px;margin-bottom:0px"><br></div><div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px;text-decoration-style:initial;text-decoration-color:initial;margin-top:0px;margin-bottom:0px">Present Code is as follows:</div><div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px;text-decoration-style:initial;text-decoration-color:initial;margin-top:0px;margin-bottom:0px"><br></div><div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px;text-decoration-style:initial;text-decoration-color:initial;margin-top:0px;margin-bottom:0px"><span style="font-size:12pt">files</span><span style="font-size:12pt"> </span><span style="font-size:12pt">= systemfunc("ls " + dir + "ERA_Interim/ERA_Interim_v_"+year+"*.nc")</span><br></div><div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px;text-decoration-style:initial;text-decoration-color:initial"><font size="3"><span style="font-size:12pt">fil</span></font><font size="3"><span style="font-size:12pt"><span> </span></span></font><font size="3"><span style="font-size:12pt">= addfiles(files,"r")</span></font><br></div><div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px;text-decoration-style:initial;text-decoration-color:initial"><font size="3"><span style="font-size:12pt">ListSetType (fil, "cat")</span></font><br></div><div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px;text-decoration-style:initial;text-decoration-color:initial"><font size="3"><span style="font-size:12pt">v6hrly</span></font><font size="3"><span style="font-size:12pt"><span> </span></span></font><font size="3"><span style="font-size:12pt">= short2flt(fil[:]->v(iStrt:iLast,{lev1:lev2},:,:))</span></font><br></div><div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px;text-decoration-style:initial;text-decoration-color:initial"><font size="3"><span style="font-size:12pt"><br></span></font></div><div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px;text-decoration-style:initial;text-decoration-color:initial"><font size="3"><span style="font-size:12pt">Also attached is a figure generated from the code.</span></font></div><div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px;text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px;text-decoration-style:initial;text-decoration-color:initial">Warm Regards,</div><div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px;text-decoration-style:initial;text-decoration-color:initial">Bappaditya Nag</div><div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px;text-decoration-style:initial;text-decoration-color:initial">Post-doctoral Scholar</div><div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px;text-decoration-style:initial;text-decoration-color:initial">Florida State University</div><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div>