QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: kaypu on December 25, 2012, 02:22

Title: Question on combining nc
Post by: kaypu on December 25, 2012, 02:22
Dear QuantumWise staff:

     i want to combine four separate NC into one NC, how to do it?

Merry Christmas

Title: Re: Question on combining nc
Post by: Nordland on December 25, 2012, 18:32
There is many way to do it - but it would in end be something like.
Code
nc1 = nlread("file_1.nc")
nc2 = nlread("file_2.nc")
nc3 = nlread("file_3.nc")
nc4 = nlread("file_4.nc")

for obj in nc1 + nc2 + nc3 + nc4:
   nlsave("new_file.nc", obj)

Title: Re: Question on combining nc
Post by: kaypu on December 26, 2012, 00:52
Thank you professor Nordland