Changeset 122 for altifloat/src/floater.h
- Timestamp:
- 06/23/14 17:55:10 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
altifloat/src/floater.h
r120 r122 69 69 pjobs[i][j]=0; 70 70 piret[i][j]=0; 71 pjret[i][j]=0; 71 pjret[i][j]=0; 72 72 pmask[i][j]=0; 73 73 } … … 248 248 249 249 void save_uv(int iti, int itn) { 250 /* save u,v fields in umod,vmod */ 250 /* save u,v fields in umod,vmod 251 and save piret,pjret*/ 251 252 int j,k,it; 252 for (it=iti;it<itn;it++) 253 int Yifloat=0; 254 for (it=iti;it<itn;it++) { 255 Yifloat=0; 253 256 for (j=0;j<nlon;j++) 254 257 for (k=0;k<nlat;k++) { … … 260 263 #endif 261 264 } 262 } 265 for (j=0;j<jpnfl;j++) 266 if (pmask[iti][j]==1 && is_activ(j,iti)>0 && it>iti) { 267 pjret[it][j]=YS1_r_float(Yifloat,it-iti); 268 piret[it][j]=YS2_r_float(Yifloat,it-iti); 269 Yifloat++; 270 } 271 } 272 } 273 274 void save_output_rfloat (int argc, char *argv[]) { 275 FILE *fid; 276 fid=fopen(argv[1],"w"); 277 if (fid==NULL) { 278 printf("\nfailed to open %s",argv[1]); 279 exit(3); 280 } 281 int j,it; 282 for (j=0;j<jpnfl;j++) 283 for (it=0;it<jptfl;it++) 284 285 fprintf(fid,"%d %d %f %f\n",it,j,piret[it][j],pjret[it][j]); 286 287 288 fclose(fid); 289 290 } 291 263 292 void save_output_uv (int argc, char *argv[]) { 264 293 FILE *fid;
Note: See TracChangeset
for help on using the changeset viewer.