Back to home page

MITgcm

 
 

    


Warning, /utils/matlab/test_nc_add.m is written in an unsupported language. File is not indexed.

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
7f0effbc3a Jean*0001 
a33039f58e Alis*0002 xi=-180:4:180;
                0003 yi=-90:4:90;
                0004 [X,Y]=ndgrid(xi,yi);
                0005 q=sin(X*pi/180).*cos(Y*pi/180);
                0006 
                0007 nc=netcdf('test.nc','clobber');
                0008 
                0009 nc_add(nc,'lon','Longitude','degrees east',{'lon'},xi)
                0010 nc_add(nc,'lat','Latitude','degrees north',{'lat'},yi)
                0011 nc_add(nc,'time','Time','Years',{'time'},[])
                0012 nc_add(nc,'q','Random','nothing',{'lat' 'lon'},q)
                0013 
                0014 nc_add(nc,'time','Time','Years',{'time'},1977,1)
                0015 nc_add(nc,'time','Time','Years',{'time'},1979,2)
                0016 nc_add(nc,'w','Random','nothing',{'time' 'lat' 'lon'},q+1,1)
                0017 nc_add(nc,'w','Random','nothing',{'time' 'lat' 'lon'},q+2,2)
                0018 
                0019 nc=close(nc);