[Dart-dev] [3946] DART/trunk/models/POP: removing unused namelist namelist options

nancy at ucar.edu nancy at ucar.edu
Fri Jun 26 10:07:47 MDT 2009


An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/dart-dev/attachments/20090626/8ff2ee37/attachment.html 
-------------- next part --------------
Modified: DART/trunk/models/POP/matlab/Check_pop_to_dart.m
===================================================================
--- DART/trunk/models/POP/matlab/Check_pop_to_dart.m	2009-06-25 23:06:31 UTC (rev 3945)
+++ DART/trunk/models/POP/matlab/Check_pop_to_dart.m	2009-06-26 16:07:47 UTC (rev 3946)
@@ -79,5 +79,88 @@
 d      = mySSH - SSH;
 disp(sprintf('SSH diffs are %f %f',min(d(:)),max(d(:))))
 
-clear fid fname iyear imonth iday ihour iminute isecond
-clear trec1 trecN rec1 recN offset ind1 ind2 days seconds
+clear datmat myS myT myU myV mySSH d
+
+%----------------------------------------------------------------------
+% This part creates an assim_model_state_ic file for use with
+% dart_to_pop ... assim_model_state_ic has the extra 'advance-to-time'
+%----------------------------------------------------------------------
+% The perfect_ics file contains precisely two records.
+% record 1 is two integers defining the valid time of the state vector.
+% record 2 is the state vector.
+% This is exactly the same as the 'assim_model_state_ud' file.
+% (except they normally are for different times ...)
+%----------------------------------------------------------------------
+
+tbase = datenum(1601,1,1,0,0,0);  % this is zero in the DART(gregorian) world
+t_one = datenum(1996,1,1,0,0,0);  % valid time of the 'gom' files.
+
+toffset = t_one - tbase;
+days    = floor(toffset);
+seconds = round(toffset - days)*86400;
+
+disp(sprintf('Creating a ''perfect_ics'' file with elements of shape %d %d %d',nx,ny,nz))
+
+disp(sprintf('prod(size(S)) is %d',  prod(size(S))))
+disp(sprintf('prod(size(T)) is %d',  prod(size(T))))
+disp(sprintf('prod(size(U)) is %d',  prod(size(U))))
+disp(sprintf('prod(size(V)) is %d',  prod(size(V))))
+disp(sprintf('prod(size(SSH)) is %d',prod(size(SSH))))
+
+nitems = prod(size(S))+ prod(size(T)) + prod(size(U)) + prod(size(V)) + prod(size(SSH));
+disp(sprintf('total restart size should %d',nitems*8 + 8 + 16))
+
+fid     = fopen('gom_S_199601.bin','rb','ieee-be');
+[Sics,count] = fread(fid,prod(size(S)),'float32');
+fclose(fid);
+if (count ~= prod(size(S)))
+   error(sprintf('S record length wrong %d %d',count,prod(size(S))))
+end
+
+fid     = fopen('gom_T_199601.bin','rb','ieee-be');
+[Tics,count]    = fread(fid,prod(size(T)),'float32');
+fclose(fid);
+if (count ~= prod(size(T)))
+   error(sprintf('T record length wrong %d %d',count,prod(size(T))))
+end
+
+fid     = fopen('gom_U_199601.bin','rb','ieee-be');
+[Uics,count]    = fread(fid,prod(size(U)),'float32');
+fclose(fid);
+if (count ~= prod(size(U)))
+   error(sprintf('U record length wrong %d %d',count,prod(size(U))))
+end
+
+fid     = fopen('gom_V_199601.bin','rb','ieee-be');
+[Vics,count]    = fread(fid,prod(size(V)),'float32');
+fclose(fid);
+if (count ~= prod(size(V)))
+   error(sprintf('V record length wrong %d %d',count,prod(size(V))))
+end
+
+fid     = fopen('gom_H_199601.bin','rb','ieee-be');
+[SSHics,count]  = fread(fid,prod(size(SSH)),'float32');
+fclose(fid);
+if (count ~= prod(size(SSH)))
+   error(sprintf('SSH record length wrong %d %d',count,prod(size(SSH))))
+end
+
+datvec = [Sics; Tics; Uics; Vics; SSHics];
+disp(sprintf('total model size is %d',length(datvec)*8))
+
+fid     = fopen('perfect_ics','wb','ieee-be');
+fwrite(fid,  trec1,'int32');
+fwrite(fid,seconds,'int32');
+fwrite(fid,   days,'int32');
+fwrite(fid,  trecN,'int32');
+
+fwrite(fid,   rec1,'int32');
+fwrite(fid, datvec,'float64');
+fwrite(fid,   recN,'int32');
+fclose(fid);
+
+fid     = fopen('perfect_ics.txt','wt');
+fprintf(fid,'%d %d\n',seconds,days);
+fprintf(fid,'%.15e\n',datvec);
+fclose(fid);
+

Modified: DART/trunk/models/POP/model_mod.f90
===================================================================
--- DART/trunk/models/POP/model_mod.f90	2009-06-25 23:06:31 UTC (rev 3945)
+++ DART/trunk/models/POP/model_mod.f90	2009-06-26 16:07:47 UTC (rev 3946)
@@ -91,8 +91,6 @@
 character(len=128) :: horiz_grid_input_file = 'no_horiz_grid_input_file'
 character(len=128) :: topography_input_file = 'no_topography_input_file'
 character(len=128) :: vert_grid_input_file  = 'no_vert_grid_input_file'
-character(len=128) :: dart_restart_file     = 'no_dart_restart_file'
-character(len=128) :: pop_data_file         = 'no_pop_data_file'
 logical            :: longitude_wrap        = .true.
 
 !integer :: nblocks   - model_mod doesn't need this
@@ -132,8 +130,6 @@
    horiz_grid_input_file,       &
    topography_input_file,       &
    vert_grid_input_file,        &
-   dart_restart_file,           &
-   pop_data_file,               &
    longitude_wrap,              &
    output_state_vector,         &
    assimilation_period_days,    &  ! for now, this is the timestep

Modified: DART/trunk/models/POP/work/input.nml
===================================================================
--- DART/trunk/models/POP/work/input.nml	2009-06-25 23:06:31 UTC (rev 3945)
+++ DART/trunk/models/POP/work/input.nml	2009-06-26 16:07:47 UTC (rev 3946)
@@ -143,14 +143,12 @@
    horiz_grid_input_file        = 'horiz_grid.x1.nc',
    topography_input_file        = 'topography.x1.nc',
    vert_grid_input_file         = 'vert_grid.x1',
-   pop_data_file                =  'pop.r.x1A.00000102',
-   dart_restart_file            = 'dart.r.x1A.00000102'
    model_perturbation_amplitude = 0.2, 
    output_state_vector          = .false.,
  /
 
 &pop_to_dart_nml
-   pop_to_dart_restart_file =  'pop.r.x1A.00000102',
+   pop_to_dart_restart_file =  'pop.r.x1A.19000102',
    pop_to_dart_output_file  = 'assim_model_state_ud',
  /
 


More information about the Dart-dev mailing list