<div dir="ltr">Hello,<div><br></div><div>For some CMIP5 models, they use different time units for different files of the same parameter (say &quot;days since 1950-1-1&quot; for the first file; &quot;days since 1960-1-1&quot; for the second file, and so on). For data analysis, it is convenient to use addfiles to read the parameter at different files (say, read all summer months using one simple line). </div><div><br></div><div>The function addfiles works perfectly for the datasets when their files have the same time unit. However, when I apply the same method for reading the files have different time units, segmentation fault always occurs when the program neither (i) read all files nor (ii) read one file.</div><div><br></div><div>I checked the program, and I think the following is main points: </div><div><br></div><div>First, when addfiles is used for reading all files, it works perfectly even if the files have different time units. The time unit of these files would be the same as the first file. </div><div><br></div><div>Example: </div><div>if the positions 10 and 11 are from two separate files, and<br></div><div><div><div>time(10) = 10  ; unit: days since 1950-1-1</div><div>time(11) = 0    ; unit: days since 1951-1-1</div></div></div><div><br></div><div>f = addfiles(filesIN,&quot;r&quot;)</div><div>t = f[:]-&gt;time</div><div><br></div><div>Then, if the program prints time(10:11), then the output is</div><div>[0] 10</div><div>[1] 365</div><div><br></div><div>Second, when addfiles is used for reading more than one file but not all files, the time unit would not be changed:</div><div><br></div><div>Same as the above example, but I use the following line to read time</div><div><br></div><div>t = f[:]-&gt;time(10:11)</div><div><br></div><div>Then, if the program prints time, then the output is:</div><div><div>[0] 10</div><div>[1] 0</div></div><div><br></div><div>Segmentation fault occurs when the program reads more time</div><div><br></div><div>I have attached two programs for simply checking how it works for reading files with different time units. For the first program (&quot;<a href="http://d01_create_file.nc">d01_create_file.nc</a>&quot;), it generates 20 files with different time units. For the second program, it reads the files generated from the first program. I have commented the part that leads to segmentation fault.</div><div><br></div><div>Definitely, I can solve this problem by first changing the time units of these files. Or I can use alternative methods to carry out my analyses (I think I encountered the same problem several years ago, but I did not report the problem). However, it will be great if this issue can be solved.</div><div><br></div><div>Thank you for the reply!</div><div><br></div><div>Best Regards,</div><div>Hoffman</div><div><br></div><div><br></div></div>