program calcmfil c c Calculate reasonable values for mfil -- number of secondary c histories that will fill a mss volume. This is dependent on c the acceptable maximum size of a mss file (mxf), and the number c of fields on the secondary history (nf, set in timesgcm lex c reads fields option SECFLDS) c c parameter (mxf=200000000) c parameter (mxf=180000000) parameter (mxf=170000000) c parameter (mxf=175000000) parameter (ibytes_fld=959040) parameter (ibytes_hdrsum=4896) c write(6,"(' ')") write(6,"('mxf=',i12)") mxf write(6,"(' ')") write(6,"('NF BYTES/HIST RMFIL MFILa BYTES/VOL MFILb', + ' BYTES/VOL MFILc BYTES/VOL')") nf = 0 do i=1,30 nf = nf+1 ibytes_hist = ibytes_fld*nf + ibytes_hdrsum rmfil = float(mxf)/float(ibytes_hist) mfil = ifix(rmfil+.5) ibytes_vol = ibytes_hist * mfil 100 continue if (ibytes_vol.gt.mxf) then mfil = mfil-1 ibytes_vol = ibytes_hist * mfil endif if (ibytes_vol.gt.mxf) goto 100 mfilp1 = mfil+1 ibytes_volp1 = ibytes_hist * mfilp1 mfilm1 = mfil-1 ibytes_volm1 = ibytes_hist * mfilm1 write(6,"(i2,i12,f6.2,3(i6,i10))") + nf,ibytes_hist,rmfil,mfilm1,ibytes_volm1,mfil,ibytes_vol, + mfilp1,ibytes_volp1 enddo stop end