Hi Sulagna, Two things:
On 1/25/2011 8:17 AM, sray@xxxxxxxxxxxxxx wrote: Hi Ferreters, I have been trying to work with 8 ensemble outputs, which I have only at the surface level. I added a z-axis to the data using a pseudo-dataset which has existing vertical levels. Now my problem is though the vertical axis is created andI couldi write at k=1, but I could not write data from k=2:8. I am attaching my script. Does any of you have some suggestions? use Ensemble_1.cdf ! Ensemble run 1 use test.cdf ! A dataset which has z-axis (znum) ! Now add the z-axis (znum) to the existing grid def grid/x=I/y=J263_289/z=znum/t=TIME tgrid ! I, J263_289,TIME are axes names in Ensemble_1.cdf !Create a new variable having a zaxis let sst = temp[d=1,g=tgrid]+0*z[gz=znum,z=1] set var/title="Ensembles"/units=ensemble sst !save the new variable as k=1 in a file having 8 vertical levels save/file=Outfile.cdf/KLIMITS=1:8/k=1/clobber sst cancel data/all ! Similarly with the 2nd ensemble member use Ensemble_2.cdf let sst = temp[g=tgrid]+0*z[gz=znum,z=2] save/append/file=Outfile.cdf/k=2 sst !Though the Outfile.cdf has 8 vertical levels yet it has data only in k=1, !but do not write the data of Ensemble_2.cdf in k=2 Thanking you, Sulagna Graduate student Department of Oceanography Physical Oceanography Texas A&M University |