[Dart-dev] [6893] DART/trunk/models/cam: These are duplicates of what are already in the cam/matlab directory.

nancy at ucar.edu nancy at ucar.edu
Thu Apr 17 14:41:27 MDT 2014


Revision: 6893
Author:   thoar
Date:     2014-04-17 14:41:26 -0600 (Thu, 17 Apr 2014)
Log Message:
-----------
These are duplicates of what are already in the cam/matlab directory.

Removed Paths:
-------------
    DART/trunk/models/cam/cam_ens_err_spread.m
    DART/trunk/models/cam/cam_ens_error.m
    DART/trunk/models/cam/cam_ens_error_temp.m
    DART/trunk/models/cam/cam_ens_scatter.m
    DART/trunk/models/cam/cam_first_try.m

-------------- next part --------------
Deleted: DART/trunk/models/cam/cam_ens_err_spread.m
===================================================================
--- DART/trunk/models/cam/cam_ens_err_spread.m	2014-04-17 20:28:27 UTC (rev 6892)
+++ DART/trunk/models/cam/cam_ens_err_spread.m	2014-04-17 20:41:26 UTC (rev 6893)
@@ -1,216 +0,0 @@
-%% cam_ens_err_spread
-
-%% DART software - Copyright 2004 - 2013 UCAR. This open source software is
-% provided by UCAR, "as is", without charge, subject to all terms of use at
-% http://www.image.ucar.edu/DAReS/DART/DART_download
-%
-% DART $Id$
-
-% Assumes two copies are ensemble mean followed by ensemble spread
-% Should be automated and checked at some point
-
-% Input the working directory
-dir_name = input('Input directory; . for current directory')
-
-% Load the ensemble file
-tname = input('Input file name for True state');
-fname = [dir_name '/' tname];
-lon = getnc(fname, 'I');
-num_lon = size(lon, 1);
-lat = getnc(fname, 'J');
-num_lat = size(lat, 1);
-level = getnc(fname, 'level');
-num_level = size(level, 1);
-true_times = getnc(fname, 'time');
-num_true_times = size(true_times, 1);
-
-state_vec = getnc(fname, 'state');
-state_size = size(state_vec, 2);
-
-% Load the ensemble file
-ename = input('Input file name for ensemble');
-ens_fname = [dir_name '/' ename];
-ens_full_vec = getnc(ens_fname, 'state');
-
-% Ensemble size is
-ens_size = size(ens_full_vec, 2);
-
-% Num times in ensemble is
-ens_times = getnc(ens_fname, 'time');
-num_ens_times = size(ens_times, 1);
-% Times is min of truth and ensemble
-num_times = min(num_true_times, num_ens_times);
-
-% Initialize storage for error averaging
-red_num_level = 26;
-rms(1:num_times, 1:5, 1:red_num_level) = 0.0;
-sd_final(1:num_times, 1:5, 1:red_num_level) = 0.0;
-
-
-% Loop through all the time levels
-for time_ind = 1 : num_times
-
-% Extract state and ensemble for just this time
-single_state = state_vec(time_ind, :);
-
-% Get ensemble mean
-ens_mean = ens_full_vec(time_ind, 1, :);
-
-% Get ensemble spread (S.D.) too
-ens_sd = ens_full_vec(time_ind, 2, :);
-
-% Loop through each of the variable types 
-% Can skip the q for now but add in as 5 in loop later
-for field_num = 1:4
-
-% Get level for free atmosphere fields
-if field_num > 1
-   max_level = red_num_level;
-else
-   max_level = 1;
-end
-
-% Loop through all levels
-for field_level = 1 : max_level
-
-
-% Extract the fields
-   offset = (field_level - 1) * 4 + field_num;
-% Stride is number of fields in column
-   stride = num_level * 4 + 1;
-   field_vec = single_state(offset : stride : (stride) * (num_lon * num_lat));
-   ens_vec = ens_mean(offset : stride : (stride) * (num_lon * num_lat));
-   sd_vec = ens_sd(offset : stride : (stride) * (num_lon * num_lat));
-
-   field = reshape(field_vec, [num_lat, num_lon]);
-   ens = reshape(ens_vec, [num_lat, num_lon]);
-   sd = reshape(sd_vec, [num_lat, num_lon]);
-
-
-
-% Compute and plot the difference field
-ens_err = (ens - field);
-
-% Compute statistics of the error field
-max_err = max(max(ens_err));
-min_err = min(min(ens_err));
-rms_err = mean(mean(abs(ens_err)));
-sd_mean = mean(mean(sd));
-rms(time_ind, field_num, field_level) = rms(time_ind, field_num, field_level) + rms_err;
-sd_final(time_ind, field_num, field_level) = sd_final(time_ind, field_num, field_level) + sd_mean;
-
-
-% End of level loop
-end
-
-% End of variable type loop
-end
-
-% End of time for loop
-end
-
-
-%Open a file for output of summary statistics from second half of run
-fid = fopen([dir_name '/summary.ascii'], 'w');
-fprintf(fid, ['Summary data for  ', dir_name, '\n']);
-
-
-% Output some graphics of error as function of lead
-figure(1);
-subplot(2, 1, 1);
-hold on;
-plot(rms(:, 1, 1));
-plot(sd_final(:, 1, 1), '--');
-title ([dir_name ': Error for ps']);
-grid on;
-subplot(2, 1, 2);
-hold on;
-plot(rms(num_times / 2 : num_times, 1, 1));
-plot(sd_final(num_times / 2 : num_times, 1, 1), '--');
-grid on;
-% Compute the means over this time interval
-mean_rms = mean(rms(num_times / 2 : num_times, 1, 1))
-mean_sd = mean(sd_final(num_times / 2: num_times, 1, 1))
-legend(strcat('rms mean sd = ', num2str(mean_rms), ' :: ', num2str(mean_sd)));
-fprintf(fid, ['P ', num2str(mean_rms), '\n']);
-print_file = strcat(dir_name, '/ps_ts.eps')
-%print(gcf, '-depsc', print_file);
-
-
-plot_temp(1:num_times, 1:red_num_level) = 0.0;
-figure(2);
-subplot(2, 1, 1);
-hold on;
-plot_temp = reshape(rms(:, 2, :), [num_times red_num_level]);
-plot(1:num_times, plot_temp);
-plot_temp = reshape(sd_final(:, 2, :), [num_times red_num_level]);
-plot(1:num_times, plot_temp, '--');
-title ([dir_name ': Errors for temperature']);
-grid on;
-subplot(2, 1, 2);
-hold on;
-plot_temp = reshape(rms(:, 2, :), [num_times red_num_level]);
-mean_rms = mean(plot_temp(num_times / 2:num_times, :), 1)
-plot(num_times / 2:num_times, plot_temp(num_times / 2: num_times, :));
-plot_temp = reshape(sd_final(:, 2, :), [num_times red_num_level]);
-mean_sd = mean(plot_temp(num_times / 2:num_times, :), 1)
-plot(num_times / 2:num_times, plot_temp(num_times / 2: num_times, :), '--');
-grid on;
-legend(num2str(mean_rms), num2str(mean_sd));
-fprintf(fid, ['T ', num2str(mean_rms), '\n']);
-print_file = strcat(dir_name, '/t_ts.eps')
-%print(gcf, '-depsc', print_file);
-
-
-
-figure(3);
-subplot(2, 1, 1);
-hold on;
-plot_temp = reshape(rms(:, 3, :), [num_times red_num_level]);
-plot(1:num_times, plot_temp);
-plot_temp = reshape(sd_final(:, 3, :), [num_times red_num_level]);
-plot(1:num_times, plot_temp, '--');
-title ([dir_name ': Errors for U']);
-grid on;
-subplot(2, 1, 2);
-hold on;
-plot_temp = reshape(rms(:, 3, :), [num_times red_num_level]);
-mean_rms = mean(plot_temp(num_times / 2:num_times, :), 1)
-plot(num_times / 2:num_times, plot_temp(num_times/2: num_times, :));
-plot_temp = reshape(sd_final(:, 3, :), [num_times red_num_level]);
-mean_sd = mean(plot_temp(num_times / 2:num_times, :), 1)
-plot(num_times / 2:num_times, plot_temp(num_times/2:num_times, :), '--');
-grid on;
-legend(num2str(mean_rms), num2str(mean_sd));
-fprintf(fid, ['U ', num2str(mean_rms), '\n']);
-print_file = strcat(dir_name, '/u_ts.eps')
-%print(gcf, '-depsc', print_file);
-
-figure(4);
-subplot(2, 1, 1);
-hold on;
-plot_temp = reshape(rms(:, 4, :), [num_times red_num_level]);
-plot(1:num_times, plot_temp);
-plot_temp = reshape(sd_final(:, 4, :), [num_times red_num_level]);
-plot(1:num_times, plot_temp, '--');
-title ([dir_name ': Errors for V']);
-grid on;
-subplot(2, 1, 2);
-hold on;
-plot_temp = reshape(rms(:, 4, :), [num_times red_num_level]);
-mean_rms = mean(plot_temp(num_times / 2:num_times, :), 1)
-plot(num_times / 2:num_times, plot_temp(num_times/2:num_times, :));
-plot_temp = reshape(sd_final(:, 4, :), [num_times red_num_level]);
-mean_sd = mean(plot_temp(num_times / 2:num_times, :), 1)
-plot(num_times/2:num_times, plot_temp(num_times/2:num_times, :), '--');
-grid on;
-legend(num2str(mean_rms), num2str(mean_sd));
-fprintf(fid, ['V ', num2str(mean_rms), '\n']);
-print_file = strcat(dir_name, '/v_ts.eps')
-%print(gcf, '-depsc', print_file);
-
-% <next few lines under version control, do not edit>
-% $URL$
-% $Revision$
-% $Date$
-

Deleted: DART/trunk/models/cam/cam_ens_error.m
===================================================================
--- DART/trunk/models/cam/cam_ens_error.m	2014-04-17 20:28:27 UTC (rev 6892)
+++ DART/trunk/models/cam/cam_ens_error.m	2014-04-17 20:41:26 UTC (rev 6893)
@@ -1,109 +0,0 @@
-%% cam_ens_error
-
-%% DART software - Copyright 2004 - 2013 UCAR. This open source software is
-% provided by UCAR, "as is", without charge, subject to all terms of use at
-% http://www.image.ucar.edu/DAReS/DART/DART_download
-%
-% DART $Id$
-
-% Assumes 2 copies of data are ensemble mean and spread
-% Should be checked and automated
-
-
-%fname = 'True_State.nc';
-fname = input('Input true state name');
-lon = getnc(fname, 'I');
-num_lon = size(lon, 1);
-lat = getnc(fname, 'J');
-num_lat = size(lat, 1);
-level = getnc(fname, 'level');
-num_level = size(level, 1);
-
-state_vec = getnc(fname, 'state');
-
-% Load the ensemble file
-ens_fname = input('Input file name for ensemble');
-%ens_fname = 'Prior_Diag.nc'
-ens_vec = getnc(ens_fname, 'state');
-
-% Ensemble size is
-ens_size = size(ens_vec, 2);
-
-% Get a time level from the user
-time_ind = input('Input time level');
-
-% Extract state and ensemble for just this time
-single_state = state_vec(time_ind, :);
-clear state_vec;
-
-% Get ensemble mean and spread
-ens_mean = ens_vec(time_ind, 1, :);
-ens_spread = ens_vec(time_ind, 2, :);
-clear ens_vec
-
-% Select field to plot (ps, t, u, v)
-field_num = input('Input field type, 1=ps, 2=t, 3=u, or 4=v')
-
-% Get level for free atmosphere fields
-if field_num > 1
-   field_level = input('Input level');
-else
-   field_level = 1;
-end
-
-
-% Extract one of the fields
-   offset = (field_level - 1) * 4 + field_num
-% Stride is number of fields in column
-   stride = num_level * 4 + 1
-   field_vec = single_state(offset : stride : (stride) * (num_lon * num_lat));
-   ens_vec = ens_mean(offset : stride : (stride) * (num_lon * num_lat));
-   spread_vec = ens_spread(offset : stride : (stride) * (num_lon * num_lat));
-
-   field = reshape(field_vec, [num_lat, num_lon]);
-   ens = reshape(ens_vec, [num_lat, num_lon]);
-   spread = reshape(spread_vec, [num_lat, num_lon]);
-
-
-figure(1);
-[C, h] = contourf(field, 10);
-clabel(C, h);
-
-figure(2);
-[C, h] = contourf(ens, 10);
-clabel(C, h);
-
-% Compute and plot the difference field
-ens_err = (ens - field);
-figure(3);
-[C, h] = contourf(ens_err, 10);
-clabel(C, h);
-
-% Compute statistics of the error field
-max_err = max(max(ens_err));
-min_err = min(min(ens_err));
-rms_err = mean(mean(abs(ens_err)));
-
-% Label figure 3 with these statistics
-title_string = ['Min = ', num2str(min_err), ' Max =  ', num2str(max_err), '   RMS ERROR = ', num2str(rms_err)];
-title (title_string)
-
-% Output the spread plot, too
-figure(4);
-[C, h] = contourf(spread, 10);
-clabel(C, h);
-
-% Compute statistics of the spread field
-max_spread = max(max(ens_spread));
-min_spread = min(min(ens_spread));
-rms_spread = mean(mean(ens_spread));
-
-% Label figure 4 with these statistics
-title_string = ['Min = ', num2str(min_spread), ' Max =  ', num2str(max_spread), '   RMS ERROR = ', num2str(rms_spread)];
-title (title_string)
-
-% <next few lines under version control, do not edit>
-% $URL$
-% $Revision$
-% $Date$
-

Deleted: DART/trunk/models/cam/cam_ens_error_temp.m
===================================================================
--- DART/trunk/models/cam/cam_ens_error_temp.m	2014-04-17 20:28:27 UTC (rev 6892)
+++ DART/trunk/models/cam/cam_ens_error_temp.m	2014-04-17 20:41:26 UTC (rev 6893)
@@ -1,118 +0,0 @@
-%% cam_ens_err_temp
-
-%% DART software - Copyright 2004 - 2013 UCAR. This open source software is
-% provided by UCAR, "as is", without charge, subject to all terms of use at
-% http://www.image.ucar.edu/DAReS/DART/DART_download
-%
-% DART $Id$
-
-% Assumes 2 copies of data are ensemble mean and spread
-% Should be checked and automated
-
-
-%fname = 'True_State.nc';
-fname = input('Input true state name');
-lon = getnc(fname, 'I');
-num_lon = size(lon, 1);
-lat = getnc(fname, 'J');
-num_lat = size(lat, 1);
-level = getnc(fname, 'level');
-num_level = size(level, 1);
-
-state_vec = getnc(fname, 'state');
-
-% Load the ensemble file
-ens_fname = input('Input file name for ensemble');
-%ens_fname = 'Prior_Diag.nc'
-ens_vec = getnc(ens_fname, 'state');
-
-% Ensemble size is
-ens_size = size(ens_vec, 2);
-
-% Get a time level from the user
-time_ind = input('Input time level');
-
-% Extract state and ensemble for just this time
-single_state = state_vec(time_ind, :);
-clear state_vec;
-
-% Get ensemble mean and spread
-ens_mean = ens_vec(time_ind, 1, :);
-ens_spread = ens_vec(time_ind, 2, :);
-clear ens_vec
-
-% Select field to plot (ps, t, u, v)
-field_num = input('Input field type, 1=ps, 2=t, 3=u, or 4=v')
-
-% Get level for free atmosphere fields
-if field_num > 1
-   field_level = input('Input level');
-else
-   field_level = 1;
-end
-
-
-% Extract one of the fields
-   offset = (field_level - 1) * 4 + field_num
-% Stride is number of fields in column
-   stride = num_level * 4 + 1
-   field_vec = single_state(offset : stride : (stride) * (num_lon * num_lat));
-   ens_vec = ens_mean(offset : stride : (stride) * (num_lon * num_lat));
-   spread_vec = ens_spread(offset : stride : (stride) * (num_lon * num_lat));
-
-   field = reshape(field_vec, [num_lat, num_lon]);
-   ens = reshape(ens_vec, [num_lat, num_lon]);
-   spread = reshape(spread_vec, [num_lat, num_lon]);
-
-
-figure(1);
-subplot(2, 2, 1);
-[C, h] = contourf(field, 10);
-%clabel(C, h);
-h = colorbar
-set(h, 'Fontsize', 16);
-title('Truth', 'fontsize', 16);
-
-subplot(2, 2, 2);
-[C, h] = contourf(ens, 10);
-%clabel(C, h);
-h = colorbar
-set(h, 'Fontsize', 16);
-title('Ensemble Mean Analysis', 'fontsize', 16);
-
-% Compute and plot the difference field
-ens_err = (ens - field);
-subplot(2, 2, 3);
-[C, h] = contourf(ens_err, 10);
-%clabel(C, h);
-h = colorbar
-set(h, 'Fontsize', 16);
-
-% Compute statistics of the error field
-max_err = max(max(ens_err));
-min_err = min(min(ens_err));
-rms_err = mean(mean(abs(ens_err)));
-
-% Label figure 3 with these statistics
-title_string = ['RMS ERROR = ', num2str(rms_err)];
-title (title_string, 'Fontsize', 16)
-
-% Output the spread plot, too
-figure(2);
-[C, h] = contourf(spread, 10);
-clabel(C, h);
-
-% Compute statistics of the spread field
-max_spread = max(max(ens_spread));
-min_spread = min(min(ens_spread));
-rms_spread = mean(mean(ens_spread));
-
-% Label figure 4 with these statistics
-title_string = ['Min = ', num2str(min_spread), ' Max =  ', num2str(max_spread), '   RMS ERROR = ', num2str(rms_spread)];
-title (title_string)
-
-% <next few lines under version control, do not edit>
-% $URL$
-% $Revision$
-% $Date$
-

Deleted: DART/trunk/models/cam/cam_ens_scatter.m
===================================================================
--- DART/trunk/models/cam/cam_ens_scatter.m	2014-04-17 20:28:27 UTC (rev 6892)
+++ DART/trunk/models/cam/cam_ens_scatter.m	2014-04-17 20:41:26 UTC (rev 6893)
@@ -1,75 +0,0 @@
-%% cam_ens_scatter
-
-%% DART software - Copyright 2004 - 2013 UCAR. This open source software is
-% provided by UCAR, "as is", without charge, subject to all terms of use at
-% http://www.image.ucar.edu/DAReS/DART/DART_download
-%
-% DART $Id$
-
-fname = input('Input file name for truth');
-%fname = 'True_State.nc';
-lon = getnc(fname, 'I');
-num_lon = size(lon, 1);
-lat = getnc(fname, 'J');
-num_lat = size(lat, 1);
-level = getnc(fname, 'level');
-num_level = size(level, 1);
-times = getnc(fname, 'time');
-num_times = size(times, 1);
-
-
-state_vec = getnc(fname, 'state');
-
-% Load the ensemble file
-ens_fname = input('Input file name for ensemble');
-%ens_fname = 'Prior_Diag.nc'
-ens_vec = getnc(ens_fname, 'state');
-
-% Ensemble size is
-ens_size = size(ens_vec, 2);
-
-% Get ensemble mean
-%ens_mean = mean(ens_vec(time_ind, :, :), 2);
-
-% Select field to plot (ps, t, u, v)
-field_num = input('Input field type, 1=ps, 2=t, 3=u, or 4=v')
-
-% Get level for free atmosphere fields
-if field_num > 1
-   field_level = input('Input level');
-else
-   field_level = 1;
-end
-
-% Select x and y coordinates
-x_coord = input('Select x coordinate');
-y_coord = input('Select y coordinate');
-
-
-figure(1);
-close;
-figure(1);
-hold on;
-
-% Extract one of the fields
-   offset = (field_level - 1) * 4 + field_num
-% Stride is number of fields in column
-   stride = num_level * 4 + 1
-   field_vec = state_vec(:, offset : stride : (stride) * (num_lon * num_lat));
-
-% WARNING: MAKE SURE THAT DOING Y THEN X IN RESHAPE IS OKAY
-   field = reshape(field_vec, [num_times, num_lat num_lon]);
-   plot(field(:, y_coord, x_coord), 'r');
-   
-% Loop through the ensemble members
-   for i = 1 : ens_size
-      ens_member = ens_vec(:, i, offset : stride : (stride) * (num_lon * num_lat));
-      ens = reshape(ens_member, [num_times num_lat num_lon]);
-      plot(ens(:, y_coord, x_coord));
-   end
-
-% <next few lines under version control, do not edit>
-% $URL$
-% $Revision$
-% $Date$
-

Deleted: DART/trunk/models/cam/cam_first_try.m
===================================================================
--- DART/trunk/models/cam/cam_first_try.m	2014-04-17 20:28:27 UTC (rev 6892)
+++ DART/trunk/models/cam/cam_first_try.m	2014-04-17 20:41:26 UTC (rev 6893)
@@ -1,54 +0,0 @@
-%% cam_first_try
-
-%% DART software - Copyright 2004 - 2013 UCAR. This open source software is
-% provided by UCAR, "as is", without charge, subject to all terms of use at
-% http://www.image.ucar.edu/DAReS/DART/DART_download
-%
-% DART $Id$
-
-% Get file name of true state fileS
-fname = input('Input true state name');
-%fname = 'True_State.nc';
-lon = getnc(fname, 'I');
-num_lon = size(lon, 1);
-lat = getnc(fname, 'J');
-num_lat = size(lat, 1);
-level = getnc(fname, 'level');
-num_level = size(level, 1);
-
-state_vec = getnc(fname, 'state');
-
-% Get a time level from the user
-time_ind = input('Input time level');
-
-single_state = state_vec(time_ind, :);
-
-% Select field to plot (ps, t, u, v)
-field_num = input('Input field type, 1=ps, 2=t, 3=u, or 4=v, 5=q')
-
-% Get level for free atmosphere fields
-if field_num > 1
-   field_level = input('Input level');
-else
-   field_level = 1;
-end
-
-% Extract one of the fields
-   offset = (field_level - 1) * 4 + field_num
-% Stride is number of fields in column
-   stride = num_level * 4 + 1
-   field_vec = single_state(offset : stride : (stride) * (num_lon * num_lat));
-   field = reshape(field_vec, [num_lat, num_lon]); 
-
-
-[C, h] = contourf(field);
-clabel(C, h);
-
-% Loop for another try
-cam_first_try;
-
-% <next few lines under version control, do not edit>
-% $URL$
-% $Revision$
-% $Date$
-


More information about the Dart-dev mailing list