/[MITgcm]/MITgcm/utils/matlab/test_nc_add.m
ViewVC logotype

Contents of /MITgcm/utils/matlab/test_nc_add.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Fri Jun 4 15:50:52 2004 UTC (20 years, 1 month ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint57t_post, checkpoint57o_post, checkpoint58e_post, checkpoint57v_post, checkpoint53d_post, checkpoint58u_post, checkpoint54a_pre, checkpoint57m_post, checkpoint55c_post, checkpoint54e_post, checkpoint57s_post, checkpoint54a_post, checkpoint57k_post, checkpoint55d_pre, checkpoint57d_post, checkpoint57g_post, checkpoint57b_post, checkpoint57c_pre, checkpoint58r_post, checkpoint55j_post, checkpoint56b_post, checkpoint57i_post, checkpoint57y_post, checkpoint57e_post, checkpoint55h_post, checkpoint58n_post, checkpoint57g_pre, checkpoint54b_post, checkpoint55b_post, checkpoint58t_post, checkpoint58h_post, checkpoint54d_post, checkpoint56c_post, checkpoint57y_pre, checkpoint55, checkpoint57f_pre, checkpoint57a_post, checkpoint54, checkpoint58q_post, checkpoint54f_post, checkpoint55g_post, checkpoint58j_post, checkpoint55f_post, checkpoint57r_post, checkpoint58, checkpoint57a_pre, checkpoint55i_post, checkpoint57, checkpoint56, eckpoint57e_pre, checkpoint57h_done, checkpoint58f_post, checkpoint53g_post, checkpoint57x_post, checkpoint57n_post, checkpoint58d_post, checkpoint58c_post, checkpoint57w_post, checkpoint57p_post, checkpint57u_post, checkpoint57f_post, checkpoint58a_post, checkpoint58i_post, checkpoint57q_post, checkpoint58g_post, checkpoint58o_post, checkpoint57z_post, checkpoint57c_post, checkpoint55e_post, checkpoint58k_post, checkpoint58v_post, checkpoint53f_post, checkpoint55a_post, checkpoint54c_post, checkpoint58s_post, checkpoint58p_post, checkpoint57j_post, checkpoint58b_post, checkpoint57h_pre, checkpoint58m_post, checkpoint57l_post, checkpoint57h_post, checkpoint56a_post, checkpoint55d_post
New scripts to help use cube and netcdf

1 xi=-180:4:180;
2 yi=-90:4:90;
3 [X,Y]=ndgrid(xi,yi);
4 q=sin(X*pi/180).*cos(Y*pi/180);
5
6 nc=netcdf('test.nc','clobber');
7
8 nc_add(nc,'lon','Longitude','degrees east',{'lon'},xi)
9 nc_add(nc,'lat','Latitude','degrees north',{'lat'},yi)
10 nc_add(nc,'time','Time','Years',{'time'},[])
11 nc_add(nc,'q','Random','nothing',{'lat' 'lon'},q)
12
13 nc_add(nc,'time','Time','Years',{'time'},1977,1)
14 nc_add(nc,'time','Time','Years',{'time'},1979,2)
15 nc_add(nc,'w','Random','nothing',{'time' 'lat' 'lon'},q+1,1)
16 nc_add(nc,'w','Random','nothing',{'time' 'lat' 'lon'},q+2,2)
17
18 nc=close(nc);

  ViewVC Help
Powered by ViewVC 1.1.22