Changeset 23074
- Timestamp:
- 08/07/18 20:02:12 (7 years ago)
- Location:
- issm/trunk-jpl/test
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/test/MITgcm/build.sh
r22669 r23074 6 6 modelpath="$2" 7 7 8 if [ -e ~/.bashrc ]; then 9 source ~/.bashrc 8 #if [ -e ~/.bashrc ]; then 9 # source ~/.bashrc 10 #fi 11 12 # Get MITgcm code, if needed 13 if [ ! -d "$modelpath/../MITgcm/install" ]; then 14 cd $modelpath/../MITgcm 15 source install.sh 16 cd $modelpath 10 17 fi 11 18 12 # C lean up build directory19 # Create build directory, if needed 13 20 cd $modelpath 14 21 if [ ! -d "build" ]; then mkdir build; fi 15 rm -f build/* 22 cd build 16 23 17 # Get MITgcm code, if needed 18 if [ ! -d "$SLR_DIR/components/mitgcm/install" ]; then 19 cd $modelpath/../MITgcm 20 source install.sh 21 cd $modelpath 24 #create MITgcm makefile for this run, if needed 25 if [ ! -f Makefile ]; then 26 if [ $hostname == "pleiades" ]; then 27 $modelpath/../MITgcm/install/tools/genmake2 -of $SLR_DIR/models/ice-ocean/configs/linux_amd64_gfortran+mpi_ice_nas -mo ../code -rd $modelpath/../MITgcm/install 28 else 29 $modelpath/../MITgcm/install/tools/genmake2 -mpi -mo $modelpath/../MITgcm/code -rd $modelpath/../MITgcm/install 30 fi 22 31 fi 23 32 24 #create MITgcm makefile and code links for this run 25 cd build 26 if [ ! -f Makefile ]; then 27 28 if [ $hostname == "pleiades" ]; then 29 $SLR_DIR/components/mitgcm/install/tools/genmake2 -of $SLR_DIR/models/ice-ocean/configs/linux_amd64_gfortran+mpi_ice_nas -mo ../code -rd $SLR_DIR/components/mitgcm/install 30 else 31 $modelpath/../MITgcm/install/tools/genmake2 -mpi -mo $modelpath/../MITgcm/code -rd $modelpath/../MITgcm/install 32 fi 33 #create MITgcm code links for this run, if needed 34 if [ ! -f BUILD_INFO.h ]; then 33 35 make depend 34 36 fi 37 35 38 make -j 4 -
issm/trunk-jpl/test/NightlyRun/test4001.m
r23018 r23074 136 136 137 137 %specify computational grid in SIZE.h 138 fidi=fopen('../MITgcm/code/SIZE.h.bak','r'); 139 fido=fopen('../MITgcm/code/SIZE.h','w'); 140 tline = fgetl(fidi); 141 fprintf(fido,'%s\n',tline); 142 while 1 138 if ~exist('../MITgcm/code/SIZE.h') 139 fidi=fopen('../MITgcm/code/SIZE.h.bak','r'); 140 fido=fopen('../MITgcm/code/SIZE.h','w'); 143 141 tline = fgetl(fidi); 144 if ~ischar(tline), break, end 145 %do the change here: 146 if strcmpi(tline,' & sNx = 20,'), 147 fprintf(fido,'%s%i%s\n',' & sNx = ',round(Nx/nPx),','); 148 continue; 142 fprintf(fido,'%s\n',tline); 143 while 1 144 tline = fgetl(fidi); 145 if ~ischar(tline), break, end 146 %do the change here: 147 if strcmpi(tline,' & sNx = 20,'), 148 fprintf(fido,'%s%i%s\n',' & sNx = ',round(Nx/nPx),','); 149 continue; 150 end 151 if strcmpi(tline,' & sNy = 20,'), 152 fprintf(fido,'%s%i%s\n',' & sNy = ',round(Ny/nPy),','); 153 continue; 154 end 155 if strcmpi(tline,' & nPx = 1,'), 156 fprintf(fido,'%s%i%s\n',' & nPx = ',nPx,','); 157 continue; 158 end 159 if strcmpi(tline,' & nPy = 2,'), 160 fprintf(fido,'%s%i%s\n',' & nPy = ',nPy,','); 161 continue; 162 end 163 fprintf(fido,'%s\n',tline); 149 164 end 150 if strcmpi(tline,' & sNy = 20,'), 151 fprintf(fido,'%s%i%s\n',' & sNy = ',round(Ny/nPy),','); 152 continue; 153 end 154 if strcmpi(tline,' & nPx = 1,'), 155 fprintf(fido,'%s%i%s\n',' & nPx = ',nPx,','); 156 continue; 157 end 158 if strcmpi(tline,' & nPy = 2,'), 159 fprintf(fido,'%s%i%s\n',' & nPy = ',nPy,','); 160 continue; 161 end 162 fprintf(fido,'%s\n',tline); 165 %close files 166 fclose(fidi); 167 fclose(fido); 163 168 end 164 %close files 165 fclose(fidi); 166 fclose(fido); 167 168 system(['../MITgcm/build.sh generic ' pwd '/../MITgcm']); 169 170 system(['../MITgcm/build.sh generic ' pwd '/../MITgcm']); 169 171 end 170 172 % }}} -
issm/trunk-jpl/test/NightlyRun/test4002.m
r23068 r23074 4 4 %Script control parameters 5 5 steps=[1 2 3 4 5 6 7 8 9 10 11 12]; 6 steps=[1 2 3 4 5]; 6 7 final_time=1/365; 7 8 … … 136 137 137 138 %specify computational grid in SIZE.h 138 fidi=fopen('../MITgcm/code/SIZE.h.bak','r'); 139 fido=fopen('../MITgcm/code/SIZE.h','w'); 140 tline = fgetl(fidi); 141 fprintf(fido,'%s\n',tline); 142 while 1 139 if ~exist('../MITgcm/code/SIZE.h') 140 fidi=fopen('../MITgcm/code/SIZE.h.bak','r'); 141 fido=fopen('../MITgcm/code/SIZE.h','w'); 143 142 tline = fgetl(fidi); 144 if ~ischar(tline), break, end145 %do the change here:146 if strcmpi(tline,' & sNx = 20,'),147 fprintf(fido,'%s%i%s\n',' & sNx = ',round(Nx/nPx),',');148 continue;149 end150 if strcmpi(tline,' & sNy = 20,'),151 fprintf(fido,'%s%i%s\n',' & sNy = ',round(Ny/nPy),',');152 continue;153 end154 if strcmpi(tline,' & nPx = 1,'),155 fprintf(fido,'%s%i%s\n',' & nPx = ',nPx,',');156 continue;157 end158 if strcmpi(tline,' & nPy = 2,'),159 fprintf(fido,'%s%i%s\n',' & nPy = ',nPy,',');160 continue;161 end162 143 fprintf(fido,'%s\n',tline); 144 while 1 145 tline = fgetl(fidi); 146 if ~ischar(tline), break, end 147 %do the change here: 148 if strcmpi(tline,' & sNx = 20,'), 149 fprintf(fido,'%s%i%s\n',' & sNx = ',round(Nx/nPx),','); 150 continue; 151 end 152 if strcmpi(tline,' & sNy = 20,'), 153 fprintf(fido,'%s%i%s\n',' & sNy = ',round(Ny/nPy),','); 154 continue; 155 end 156 if strcmpi(tline,' & nPx = 1,'), 157 fprintf(fido,'%s%i%s\n',' & nPx = ',nPx,','); 158 continue; 159 end 160 if strcmpi(tline,' & nPy = 2,'), 161 fprintf(fido,'%s%i%s\n',' & nPy = ',nPy,','); 162 continue; 163 end 164 fprintf(fido,'%s\n',tline); 165 end 166 %close files 167 fclose(fidi); 168 fclose(fido); 163 169 end 164 %close files 165 fclose(fidi); 166 fclose(fido); 167 168 system(['../MITgcm/build.sh generic ' pwd '/../MITgcm']); 170 171 system(['../MITgcm/build.sh generic ' pwd '/../MITgcm']); 169 172 end 170 173 % }}}
Note:
See TracChangeset
for help on using the changeset viewer.