<p><b>ringler@lanl.gov</b> 2012-03-15 13:57:40 -0600 (Thu, 15 Mar 2012)</p><p><br>
making directory tree for different visualization tools used for this test case<br>
</p><hr noshade><pre><font color="gray">Deleted: branches/ocean_projects/ocean_test_cases_staging/ocean/baroclinic_channel/plot_baroclinic_channel.m
===================================================================
--- branches/ocean_projects/ocean_test_cases_staging/ocean/baroclinic_channel/plot_baroclinic_channel.m        2012-03-15 19:43:17 UTC (rev 1650)
+++ branches/ocean_projects/ocean_test_cases_staging/ocean/baroclinic_channel/plot_baroclinic_channel.m        2012-03-15 19:57:40 UTC (rev 1651)
@@ -1,97 +0,0 @@
-clear all
-
-% A simple plotting program to visualize the evolution of the baroclinic
-% channel simulation. The field is read in, reshaped to be (nx,ny) and
-% plotted for all times.
-%
-% USERS need to specify the following:
-%   nVertLevels: the number of vertical levels in simulation
-%   nx: the number of cells along the x-direction
-%   ny: the number of cells along the y-direction
-%   iLevel: the vertical level that you wish to visualize
-%   var: the variable that you wish to visualize
-%   file: the path to the output (or other file)
-%
-%   NOTE: nx * ny == nCells
-%
-% the default is to plot all data from 1 to Time from the netCDF file
-% subsectioning is allowed by specifying nTimeMin (i.e. when to start)
-% and nTimeMax (i.e. when to end). The actual start and end times are 
-% determined via min/max comparisons to the netCDF file.
-
-% 10km: nx=16, nx=50, 4km: nx=40, ny=125, 1km: nx=160, ny=500
-%-------------------------------------------------------------------------
-
-nVertLevels = 20
-nx = 40
-ny = 125
-iLevel = 1
-var = 'Vor_cell'
-file = '4000m_20levs/se20_160_4procs/output.0000-01-01_00:00:00.nc'
-
-%optional
-nTimeMin = -1;
-nTimeMax = 9e10;
-%-------------------------------------------------------------------------
-
-%open file
-ncid_hex = netcdf.open(file,'nc_nowrite');
-
-%get dimensions
-[dimname, dimlen] = netcdf.inqDim(ncid_hex,0);
-
-%get handle to var
-ID_hex = netcdf.inqVarID(ncid_hex,var);
-
-%read var and see how big it is
-work = netcdf.getVar(ncid_hex,ID_hex);
-a=size(work)
-
-iTimeMin = max(1,nTimeMin)
-iTimeMax = min(a(3),nTimeMax)
-nTime = iTimeMax - iTimeMin + 1
-
-%make workspace for reduced arrays
-workq = zeros(a(2),nTime);
-tmp=zeros(nx*ny,1);
-workavg = zeros(nx,ny);
-
-%put all data for iLevel into work array
-workq(:,1:nTime) = work(iLevel,:,iTimeMin:iTimeMax);
-clear work
-
-%find min/max of var to set a single colorbar for entire movie
-r = min(workq);
-zmin = min(r)
-r = max(workq);
-zmax = max(r)
-
-%build increments based on zmax and zmin
-inc = (zmax - zmin) / 20;
-zlevs = zmin:inc:zmax
-
-%loop over time
-for iTime=1:nTime
-    
-    %copy data for iTime into work array and reshape
-    tmp(:)=workq(:,iTime);
-    workavg=reshape(tmp,nx,ny);
-    hex = workavg;
-
-    % average data on every other row so it can be plotted as Cartesian
-    for j=2:2:ny
-     for i=2:nx-1
-         hex(i,j) = (workavg(i+1,j)+workavg(i,j))/2.0;
-     end
-    end
-
-    % plot the data
-    b=hex;
-    figure(1)
-    b = transpose(b);
-    contourf(b,zlevs)
-    caxis([zmin zmax])
-    colormap(jet)
-    colorbar
-
-end
\ No newline at end of file

Added: branches/ocean_projects/ocean_test_cases_staging/ocean/baroclinic_channel/viz_tools/matlab/dump_frames_for_OpenDX.m
===================================================================
--- branches/ocean_projects/ocean_test_cases_staging/ocean/baroclinic_channel/viz_tools/matlab/dump_frames_for_OpenDX.m                                (rev 0)
+++ branches/ocean_projects/ocean_test_cases_staging/ocean/baroclinic_channel/viz_tools/matlab/dump_frames_for_OpenDX.m        2012-03-15 19:57:40 UTC (rev 1651)
@@ -0,0 +1,151 @@
+
+% This script open a output.nc file and writes out the output
+% in ascii format to be read in by OpenDX
+
+clear all
+
+%-------------------------------------------------------------------------
+
+nVertLevels = 20
+iLevel = 1
+var = 'Vor_cell'
+file = '../../1000m_20levs/se20_160_4procs/output.0000-01-01_00:00:00.nc'
+
+%optional
+nTimeMin = -1;
+nTimeMax = 9e10;
+nTimeShift = 0;
+
+%-------------------------------------------------------------------------
+
+
+eps = 1.0e-12
+
+ncid = netcdf.open(file,'nc_nowrite')
+
+
+[nCellsName, nCellsLength] = netcdf.inqDim(ncid,1);
+[nEdgesName, nEdgesLength] = netcdf.inqDim(ncid,2);
+[nVerticesName, nVerticesLength] = netcdf.inqDim(ncid,5);
+[nVertLevelsName, nVertLevelsLength] = netcdf.inqDim(ncid,8);
+[nTracersName, nTracersLength] = netcdf.inqDim(ncid,9);
+[TimeName, TimeLength] = netcdf.inqDim(ncid,0);
+
+iTimeMin = max(1,nTimeMin)
+iTimeMax = min(TimeLength,nTimeMax)
+nTime = iTimeMax - iTimeMin + 1
+
+varID = netcdf.inqVarID(ncid,var);
+[varName,xtype,dimids,natts] = netcdf.inqVar(ncid,varID);
+[numdims, numvars, numglobalatts, unlimdimID] = netcdf.inq(ncid);
+
+size(dimids)
+dimids
+
+var =  netcdf.getVar(ncid,varID);
+size(var)
+a=size(var)
+
+iTimeMin = max(1,nTimeMin)
+iTimeMax = min(a(3),nTimeMax)
+nTime = iTimeMax - iTimeMin + 1
+
+
+system('rm -f ../OpenDX/movie/list.dx')
+system('rm -f ../OpenDX/movie/data/scalar.*')
+f1 = '../OpenDX/movie/list.dx'
+fid = fopen(f1, 'w');
+
+
+fprintf(fid, 'object &quot;positions list&quot; class array type float rank 1 shape 3 items 480000</font>
<font color="blue">')
+fprintf(fid, 'ascii data file ocean.position.data</font>
<font color="blue">')
+fprintf(fid, '</font>
<font color="blue">')
+
+fprintf(fid, 'object &quot;edge list&quot; class array type int rank 0 items 480000</font>
<font color="blue">')
+fprintf(fid, 'ascii data file ocean.edge.data</font>
<font color="blue">')
+fprintf(fid, 'attribute &quot;ref&quot; string &quot;positions&quot;</font>
<font color="blue">')
+fprintf(fid, '</font>
<font color="blue">')
+
+fprintf(fid, 'object &quot;loops list&quot; class array type int rank 0 items 80000</font>
<font color="blue">')
+fprintf(fid, 'ascii data file ocean.loop.data</font>
<font color="blue">')
+fprintf(fid, 'attribute &quot;ref&quot; string &quot;edges&quot;</font>
<font color="blue">')
+fprintf(fid, '</font>
<font color="blue">')
+
+fprintf(fid, 'object &quot;face list&quot; class array type int rank 0 items 80000</font>
<font color="blue">')
+fprintf(fid, 'ascii data file ocean.face.data</font>
<font color="blue">')
+fprintf(fid, 'attribute &quot;ref&quot; string &quot;loops&quot;</font>
<font color="blue">')
+fprintf(fid, '</font>
<font color="blue">')
+
+varName = 'scalar'
+for iTime=iTimeMin:iTimeMax
+    
+    if(iTime &gt; 1000); quit; end;
+     if(iTime &lt; 1000) 
+        stringTime =  strcat('0000', int2str(iTime));
+     end;
+     if(iTime &lt; 100) 
+        stringTime = strcat('00000', int2str(iTime));
+     end;
+     if(iTime &lt; 10) 
+        stringTime = strcat('000000', int2str(iTime));
+     end;
+    
+    FileName = strcat('../OpenDX/movie/data/', varName, '.', stringTime)
+    F1 =  strcat('./data/', varName, '.', stringTime)
+    
+    x = var(iLevel,:,iTime+nTimeShift);
+    
+    dlmwrite(FileName, x, 'delimiter', '\t');
+    
+    fprintf(fid,'object %i  class array type float rank 0 items 80000</font>
<font color="blue">', iTime)
+    fprintf(fid,'data file %s</font>
<font color="blue">', F1)
+    fprintf(fid, 'attribute &quot;dep&quot; string &quot;faces&quot;</font>
<font color="blue">')
+    fprintf(fid, '</font>
<font color="blue">')
+
+end
+
+
+for iTime=iTimeMin:iTimeMax
+     if(iTime &gt; 1000); quit; end;
+     if(iTime &lt; 1000) 
+        stringTime =  strcat('0000', int2str(iTime));
+     end;
+     if(iTime &lt; 100) 
+        stringTime = strcat('00000', int2str(iTime));
+     end;
+     if(iTime &lt; 10) 
+        stringTime = strcat('000000', int2str(iTime));
+     end;
+
+     VarName = strcat('&quot;',varName, stringTime, '&quot;')
+     fprintf(fid, 'object %s class field</font>
<font color="blue">',VarName)
+     fprintf(fid, 'component &quot;positions&quot;     &quot;positions list&quot;</font>
<font color="blue">')
+     fprintf(fid, 'component &quot;edges&quot;         &quot;edge list&quot;</font>
<font color="blue">')
+     fprintf(fid, 'component &quot;loops&quot;         &quot;loops list&quot;</font>
<font color="blue">')
+     fprintf(fid, 'component &quot;faces&quot;         &quot;face list&quot;</font>
<font color="blue">')
+     fprintf(fid, 'component &quot;data&quot;          %i</font>
<font color="blue">', iTime)
+    fprintf(fid, '</font>
<font color="blue">')
+
+end
+
+fprintf(fid, 'object &quot;smovie&quot; class series</font>
<font color="blue">')
+for iTime=iTimeMin:iTimeMax
+     if(iTime &gt; 1000); quit; end;
+     if(iTime &lt; 1000) 
+        stringTime =  strcat('0000', int2str(iTime));
+     end;
+     if(iTime &lt; 100) 
+        stringTime = strcat('00000', int2str(iTime));
+     end;
+     if(iTime &lt; 10) 
+        stringTime = strcat('000000', int2str(iTime));
+     end;
+
+     VarName = strcat('&quot;',varName, stringTime, '&quot;')
+     fprintf(fid, 'member %i value %s position %i</font>
<font color="gray">',iTime, VarName, iTime)
+
+end
+
+
+
+fclose(fid);

Added: branches/ocean_projects/ocean_test_cases_staging/ocean/baroclinic_channel/viz_tools/matlab/plot_baroclinic_channel.m
===================================================================
--- branches/ocean_projects/ocean_test_cases_staging/ocean/baroclinic_channel/viz_tools/matlab/plot_baroclinic_channel.m                                (rev 0)
+++ branches/ocean_projects/ocean_test_cases_staging/ocean/baroclinic_channel/viz_tools/matlab/plot_baroclinic_channel.m        2012-03-15 19:57:40 UTC (rev 1651)
@@ -0,0 +1,97 @@
+clear all
+
+% A simple plotting program to visualize the evolution of the baroclinic
+% channel simulation. The field is read in, reshaped to be (nx,ny) and
+% plotted for all times.
+%
+% USERS need to specify the following:
+%   nVertLevels: the number of vertical levels in simulation
+%   nx: the number of cells along the x-direction
+%   ny: the number of cells along the y-direction
+%   iLevel: the vertical level that you wish to visualize
+%   var: the variable that you wish to visualize
+%   file: the path to the output (or other file)
+%
+%   NOTE: nx * ny == nCells
+%
+% the default is to plot all data from 1 to Time from the netCDF file
+% subsectioning is allowed by specifying nTimeMin (i.e. when to start)
+% and nTimeMax (i.e. when to end). The actual start and end times are 
+% determined via min/max comparisons to the netCDF file.
+
+% 10km: nx=16, nx=50, 4km: nx=40, ny=125, 1km: nx=160, ny=500
+%-------------------------------------------------------------------------
+
+nVertLevels = 20
+nx = 160
+ny = 500
+iLevel = 1
+var = 'Vor_cell'
+file = '../../1000m_20levs/se20_160_4procs/output.0000-01-01_00:00:00.nc'
+
+%optional
+nTimeMin = 10;
+nTimeMax = 9e10;
+%-------------------------------------------------------------------------
+
+%open file
+ncid_hex = netcdf.open(file,'nc_nowrite');
+
+%get dimensions
+[dimname, dimlen] = netcdf.inqDim(ncid_hex,0);
+
+%get handle to var
+ID_hex = netcdf.inqVarID(ncid_hex,var);
+
+%read var and see how big it is
+work = netcdf.getVar(ncid_hex,ID_hex);
+a=size(work)
+
+iTimeMin = max(1,nTimeMin)
+iTimeMax = min(a(3),nTimeMax)
+nTime = iTimeMax - iTimeMin + 1
+
+%make workspace for reduced arrays
+workq = zeros(a(2),nTime);
+tmp=zeros(nx*ny,1);
+workavg = zeros(nx,ny);
+
+%put all data for iLevel into work array
+workq(:,1:nTime) = work(iLevel,:,iTimeMin:iTimeMax);
+clear work
+
+%find min/max of var to set a single colorbar for entire movie
+r = min(workq);
+zmin = min(r)
+r = max(workq);
+zmax = max(r)
+
+%build increments based on zmax and zmin
+inc = (zmax - zmin) / 20;
+zlevs = zmin:inc:zmax
+
+%loop over time
+for iTime=1:nTime
+    
+    %copy data for iTime into work array and reshape
+    tmp(:)=workq(:,iTime);
+    workavg=reshape(tmp,nx,ny);
+    hex = workavg;
+
+    % average data on every other row so it can be plotted as Cartesian
+    for j=2:2:ny
+     for i=2:nx-1
+         hex(i,j) = (workavg(i+1,j)+workavg(i,j))/2.0;
+     end
+    end
+
+    % plot the data
+    b=hex;
+    figure(1)
+    b = transpose(b);
+    contourf(b,zlevs)
+    caxis([zmin zmax])
+    colormap(jet)
+    colorbar
+
+end
\ No newline at end of file

</font>
</pre>