[Dart-dev] [3846] DART/trunk/models/cam/matlab: Ensures that we are only using ensemble members 1-80

nancy at ucar.edu nancy at ucar.edu
Mon May 4 17:13:20 MDT 2009


An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/dart-dev/attachments/20090504/f048b968/attachment.html 
-------------- next part --------------
Modified: DART/trunk/models/cam/matlab/CAM_DART_correl.m
===================================================================
--- DART/trunk/models/cam/matlab/CAM_DART_correl.m	2009-05-04 23:00:13 UTC (rev 3845)
+++ DART/trunk/models/cam/matlab/CAM_DART_correl.m	2009-05-04 23:13:20 UTC (rev 3846)
@@ -6,7 +6,7 @@
 % DARTvarname = 'T';
 % DARTlevel   = 600;
 % CAMvarname  = 'EVAPPREC';
-% CAMlocation = [260, 8.5, 600];  % lon/lat/level
+% CAMlocation = [170, 31, 600];  % lon/lat/level
 %
 % CAM_DART_correl(datadir,DARTfile,DARTvarname,DARTlevel,CAMvarname,CAMlocation)
 
@@ -86,8 +86,12 @@
 [dartlevel,dartlevind] = min(diffs);
 dartlevel = DARTlevels(dartlevind);
 
-start = [ 0  0  0  0 dartlevind-1];
-count = [-1 -1 -1 -1      1];
+copyind1 = get_copy_index(prfname,'ensemble member 1');
+copyindN = get_copy_index(prfname,'ensemble member 80');
+copyN = copyindN - copyind1 + 1;
+
+start = [ 0  copyind1-1  0  0 dartlevind-1];
+count = [-1  copyN      -1 -1      1];
 y     = nc_varget(prfname,DARTvarname,start,count);
 
 [Nmem, Nlat, Nlon] = size(y);

Modified: DART/trunk/models/cam/matlab/DART_xcorrel.m
===================================================================
--- DART/trunk/models/cam/matlab/DART_xcorrel.m	2009-05-04 23:00:13 UTC (rev 3845)
+++ DART/trunk/models/cam/matlab/DART_xcorrel.m	2009-05-04 23:13:20 UTC (rev 3846)
@@ -53,9 +53,13 @@
 %                T:long_name = "Temperature" ;
 %                T:units = "K" ;
 
-start = [ 0   0   0   0   camlevind-1];
-count = [ 1   -1  -1  -1        1];
+copyind1 = get_copy_index(camname,'ensemble member 1');
+copyindN = get_copy_index(camname,'ensemble member 80');
+copyN = copyindN - copyind1 + 1;
 
+start = [ 0  copyind1-1   0   0   camlevind-1];
+count = [ 1  copyN       -1  -1        1     ];
+
 bob = nc_varget(camname,varname1,start,count);
 x   = bob(:,camlatind,camlonind); 
 
@@ -75,8 +79,8 @@
 [dartlevel,dartlevind] = min(diffs);
 dartlevel = DARTlevels(dartlevind);
 
-start = [ 0  0  0  0 dartlevind-1];
-count = [-1 -1 -1 -1      1];
+start = [ 0  copyind1-1  0  0 dartlevind-1];
+count = [ 1  copyN      -1 -1      1      ];
 y     = nc_varget(prfname,varname2,start,count);
 
 [Nmem, Nlat, Nlon] = size(y);


More information about the Dart-dev mailing list