Changeset 27591


Ignore:
Timestamp:
02/17/23 14:02:58 (2 years ago)
Author:
seroussi
Message:

CHG: use size in code_remesh directly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/test/NightlyRun/test4005.m

    r27588 r27591  
    88!rm -rf ${ISSM_DIR}/test/MITgcm/install
    99!rm -rf ${ISSM_DIR}/test/MITgcm/build/*
    10 !rm -f ${ISSM_DIR}/test/MITgcm/code/SIZE.h
    1110!rm -rf Models
    1211
     
    2221    Ny=40; %number of latitude cells
    2322    Nz=30; %number of MITgcm vertical cells
    24     nPx=2; %number of MITgcm processes to use in x direction
    25     nPy=4; %number of MITgcm processes to use in y direction
     23    nPx=1; %number of MITgcm processes to use in x direction
     24    nPy=2; %number of MITgcm processes to use in y direction
    2625    xgOrigin=0; %origin of longitude
    2726    ygOrigin=-80; %origin of latitude
     
    140139    loaddata(org,'Parameters');
    141140
    142     %specify computational grid in SIZE.h
    143     if ~exist('../MITgcm/code/SIZE.h')
    144         fidi=fopen('../MITgcm/code/SIZE.h.bak','r');
    145         fido=fopen('../MITgcm/code/SIZE.h','w');
    146         tline = fgetl(fidi);
    147         fprintf(fido,'%s\n',tline);
    148         while 1
    149             tline = fgetl(fidi);
    150             if ~ischar(tline), break, end
    151             %do the change here:
    152             if strcmpi(tline,'     &           sNx =  20,'),
    153                 fprintf(fido,'%s%i%s\n','     &           sNx =  ',round(Nx/nPx),',');
    154                 continue;
    155             end
    156             if strcmpi(tline,'     &           sNy =  20,'),
    157                 fprintf(fido,'%s%i%s\n','     &           sNy =  ',round(Ny/nPy),',');
    158                 continue;
    159             end
    160             if strcmpi(tline,'     &           nPx =   1,'),
    161                 fprintf(fido,'%s%i%s\n','     &           nPx = ',nPx,',');
    162                 continue;
    163             end
    164             if strcmpi(tline,'     &           nPy =   2,'),
    165                 fprintf(fido,'%s%i%s\n','     &           nPy = ',nPy,',');
    166                 continue;
    167             end
    168             fprintf(fido,'%s\n',tline);
    169         end
    170         %close  files
    171         fclose(fidi);
    172         fclose(fido);
    173     end
    174 
    175     system(['../MITgcm/build.sh amundsen ' pwd '/../MITgcm']);
     141    system(['../MITgcm/build_remesh.sh amundsen ' pwd '/../MITgcm']);
    176142end
    177143% }}}
     
    197163    !\mkdir run
    198164    !\cp ../MITgcm/build/mitgcmuv run
    199     !\cp ../MITgcm/input/* run
    200     !\cp ../MITgcm/input/eedata_uncoupled run/eedata
     165    !\cp ../MITgcm/input_remesh/* run
     166    !\cp ../MITgcm/input_remesh/eedata_uncoupled run/eedata
    201167
    202168    %load data:
     
    242208
    243209    % build parameter file data.obcs
    244     fidi=fopen('../MITgcm/input/data.obcs','r');
     210    fidi=fopen('../MITgcm/input_remesh/data.obcs','r');
    245211    fido=fopen('run/data.obcs','w');
    246212    tline = fgetl(fidi);
     
    277243        disp(['Year: ' num2str(t)])
    278244        % {{{ generate MITgcm parameter file data
    279         fidi=fopen('../MITgcm/input/data','r');
     245        fidi=fopen('../MITgcm/input_remesh/data','r');
    280246        fido=fopen('run/data','w');
    281247        tline = fgetl(fidi);
     
    588554        !\mkdir run
    589555        !\cp ../MITgcm/build/mitgcmuv run
    590         !\cp ../MITgcm/input/* run
    591         !\cp ../MITgcm/input/eedata_uncoupled run/eedata
     556        !\cp ../MITgcm/input_remesh/* run
     557        !\cp ../MITgcm/input_remesh/eedata_uncoupled run/eedata
    592558
    593559        %load data:
     
    633599
    634600        % build parameter file data.obcs
    635         fidi=fopen('../MITgcm/input/data.obcs','r');
     601        fidi=fopen('../MITgcm/input_remesh/data.obcs','r');
    636602        fido=fopen('run/data.obcs','w');
    637603        tline = fgetl(fidi);
Note: See TracChangeset for help on using the changeset viewer.