[Dart-dev] [3971] DART/trunk/models/POP/work: Add the matlab plotting routines that plot the output of the test

nancy at ucar.edu nancy at ucar.edu
Tue Jul 21 15:58:47 MDT 2009


An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/dart-dev/attachments/20090721/92385533/attachment.html 
-------------- next part --------------
Modified: DART/trunk/models/POP/work/mkmf_test_dipole_interp
===================================================================
--- DART/trunk/models/POP/work/mkmf_test_dipole_interp	2009-07-21 21:53:38 UTC (rev 3970)
+++ DART/trunk/models/POP/work/mkmf_test_dipole_interp	2009-07-21 21:58:46 UTC (rev 3971)
@@ -6,56 +6,10 @@
 # Licensed under the GPL -- www.gpl.org/licenses/gpl.html
 #
 # <next few lines under version control, do not edit>
-# $URL: http://subversion.ucar.edu/DAReS/DART/trunk/models/MITgcm_ocean/work/mkmf_filter $
-# $Id: mkmf_filter 3796 2009-03-31 15:32:06Z nancy $
-# $Revision: 3796 $
-# $Date: 2009-03-31 09:32:06 -0600 (Tue, 31 Mar 2009) $
-
-# usage: mkmf_test_dipole_interp[ -mpi | -nompi ]
-#  without any args, builds test_dipole_interp without mpi libraries, and it will run
-#  as a normal executable. if -mpi is given, it will be compiled with the mpi
-#  libraries and can run with multiple cooperating processes.
-
-if ( $#argv > 0 ) then
-  if ("$argv[1]" == "-mpi") then
-    setenv usingmpi 1
-  else if ("$argv[1]" == "-nompi") then
-    setenv usingmpi 0
-  else
-    echo "Unrecognized argument to mkmf_test_dipole_interp: $argv[1]"
-    echo "Usage: mkmf_test_dipole_interp [ -mpi | -nompi ]"
-    echo " default is to generate a Makefile without MPI support."
-    exit -1
-  endif
-else
-  setenv usingmpi 0
-endif
-
-
-# make a backup copy of the path_names file, and then use
-# sed to make sure it includes either the non-mpi subroutines,
-# or the subroutines which really call mpi.
-cp -f path_names_test_dipole_interp path_names_test_dipole_interp.back
-
-if ( $usingmpi ) then
-
-  echo "Making Makefile with MPI"
-  touch using_mpi_for_test_dipole_interp
-  sed -e 's;/null_mpi_util;/mpi_util;' path_names_test_dipole_interp.back >! path_names_test_dipole_interp
-  setenv wrapper_arg -w
-
-else
-
-  echo "Making Makefile without MPI"
-  rm -f using_mpi_for_test_dipole_interp
-  sed -e 's;/mpi_util;/null_mpi_util;' path_names_test_dipole_interp.back >! path_names_test_dipole_interp
-  setenv wrapper_arg ""
-
-endif
-
-# remove temp file and now really call mkmf to generate makefile
-rm -f path_names_test_dipole_interp.back
-
+# $URL: http://subversion.ucar.edu/DAReS/DART/trunk/models/MITgcm_ocean/work/mkmf_restart_file_tool $
+# $Id: mkmf_restart_file_tool 3716 2008-12-15 18:57:29Z nancy $
+# $Revision: 3716 $
+# $Date: 2008-12-15 11:57:29 -0700 (Mon, 15 Dec 2008) $
+#
 ../../../mkmf/mkmf -p test_dipole_interp -t ../../../mkmf/mkmf.template -c"-Duse_netCDF" \
-        -a "../../.." ${wrapper_arg} path_names_test_dipole_interp
-
+ -a "../../.." path_names_test_dipole_interp

Modified: DART/trunk/models/POP/work/path_names_test_dipole_interp
===================================================================
--- DART/trunk/models/POP/work/path_names_test_dipole_interp	2009-07-21 21:53:38 UTC (rev 3970)
+++ DART/trunk/models/POP/work/path_names_test_dipole_interp	2009-07-21 21:58:46 UTC (rev 3971)
@@ -1,9 +1,12 @@
 common/types_mod.f90
 models/POP/test_dipole_interp.f90
 models/POP/model_mod.f90
+obs_def/obs_def_mod.f90
+obs_kind/obs_kind_mod.f90
 utilities/utilities_mod.f90
 time_manager/time_manager_mod.f90
 location/threed_sphere/location_mod.f90
+assim_model/assim_model_mod.f90
 random_nr/random_nr_mod.f90
 random_seq/random_seq_mod.f90
 mpi_utilities/null_mpi_utilities_mod.f90

Added: DART/trunk/models/POP/work/plot_global_grid.m
===================================================================
--- DART/trunk/models/POP/work/plot_global_grid.m	                        (rev 0)
+++ DART/trunk/models/POP/work/plot_global_grid.m	2009-07-21 21:58:46 UTC (rev 3971)
@@ -0,0 +1,49 @@
+clear; close all
+
+n = input(['Input 1 to plot regular grid output.\n' ...
+          'Input 2 to plot dipole x3 grid output. \n' ...
+          'Input 3 to plot regular grid with same grid as x3 in SH\n'])
+
+
+if n == 1
+   load regular_grid_u_out;
+   u_out = regular_grid_u_out;
+   load regular_grid_t_out;
+   t_out = regular_grid_t_out;
+   nx = 111;
+   ny = 317;
+elseif n == 2
+   load dipole_x3_u_out;
+   u_out = dipole_x3_u_out;
+   load dipole_x3_t_out;
+   t_out = dipole_x3_t_out;
+   nx = 100;
+   ny = 116;
+elseif n == 3
+   load regular_griddi_u_out;
+   u_out = regular_griddi_u_out;
+   load regular_griddi_t_out;
+   t_out = regular_griddi_t_out;
+   nx = 100;
+   ny = 97;
+end
+
+index = 0;
+for i = 1:nx
+   for j = 1:ny
+      index = index + 1;
+      u(i, j) = u_out(index, 3);
+      t(i, j) = t_out(index, 3);
+   end
+end 
+
+figure(1)
+contour(u')
+title 'U Grid'
+
+figure(2)
+contour(t')
+title 'T Grid'
+      
+
+


Property changes on: DART/trunk/models/POP/work/plot_global_grid.m
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + text/x-matlab
Name: svn:keywords
   + Date Revision Author HeadURL Id

Added: DART/trunk/models/POP/work/plot_globe_dif.m
===================================================================
--- DART/trunk/models/POP/work/plot_globe_dif.m	                        (rev 0)
+++ DART/trunk/models/POP/work/plot_globe_dif.m	2009-07-21 21:58:46 UTC (rev 3971)
@@ -0,0 +1,69 @@
+clear; close all
+
+n = input(['Input 1 to difference regular grids .\n' ...
+          'Input 2 to difference dipole x3 grids . \n' ...
+          'Input 3 to diffference regular grids with same grid as x3 in SH\n'])
+
+
+if n == 1
+   load regular_grid_u_data;
+   u_data = regular_grid_u_data;
+   load regular_grid_t_data;
+   t_data = regular_grid_t_data;
+   load regular_grid_u_out;
+   u_out = regular_grid_u_out;
+   load regular_grid_t_out;
+   t_out = regular_grid_t_out;
+   nx = 111;
+   ny = 317;
+elseif n == 2
+   load dipole_x3_u_data;
+   u_data = dipole_x3_u_data;
+   load dipole_x3_t_data;
+   t_data = dipole_x3_t_data;
+   load dipole_x3_u_out;
+   u_out = dipole_x3_u_out;
+   load dipole_x3_t_out;
+   t_out = dipole_x3_t_out;
+   nx = 100;
+   ny = 116;
+elseif n == 3
+   load regular_griddi_u_data;
+   u_data = regular_griddi_u_data;
+   load regular_griddi_t_data;
+   t_data = regular_griddi_t_data;
+   load regular_griddi_u_out;
+   u_out = regular_griddi_u_out;
+   load regular_griddi_t_out;
+   t_out = regular_griddi_t_out;
+   nx = 100;
+   ny = 97;
+end
+
+
+index = 0;
+for i = 1:nx
+   for j = 1:ny
+      index = index + 1;
+      u(i, j) = u_out(index, 3);
+      ub(i, j) = u_data(index, 3);
+      dif(i, j) = u(i, j) - ub(i, j);
+      t(i, j) = t_out(index, 3);
+      tb(i, j) = t_data(index, 3);
+      tdif(i, j) = t(i, j) - tb(i, j);
+   end
+end 
+
+figure(1)
+contour(dif', 20)
+colorbar 
+title 'U Difference'
+
+figure(2)
+contour(tdif', 20)
+colorbar
+title 'T Difference'
+
+ 
+
+


Property changes on: DART/trunk/models/POP/work/plot_globe_dif.m
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + text/x-matlab
Name: svn:keywords
   + Date Revision Author HeadURL Id


More information about the Dart-dev mailing list