13.11.2014 Views

Abrir - RDU

Abrir - RDU

Abrir - RDU

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Apéndices 294<br />

.3. Programa Fortran utilizado con el Método de<br />

Downhill<br />

Por razones de espacio, presentamos solamente los modulos más importantes del<br />

programa. Tampoco mostramos las subrutinas utilizadas del libro Numerical Recipes<br />

(Press et al. 1990).<br />

program prog<br />

common /comunes/ spec2,lam13,vrot,points,ndesder13,nhastar13,<br />

,np1,wspec,file<br />

real*8 spec2(2e5),lam13(2e5),vrot,vrad<br />

integer points<br />

integer ndesder13,nhastar13,np1,wspec<br />

character file*80<br />

save /comunes/<br />

call cls<br />

write(*,*) ”***** Downhill Simplex Method *****”<br />

write(*,*)<br />

open(49, file=”datain/filenames.txt”,status=. o ld”)<br />

open(50, file=”dataout/Solution.txt”)<br />

open(52, file=”dataout/Logfile.txt”)<br />

write(50,*) ”Final solution:”<br />

write(50,*) ”Name Teff logg [Fe/H] xita vrot vrad (and initial guess)”<br />

do<br />

read(49,’(a80)’,end=120) file<br />

call downhill<br />

enddo<br />

120continue<br />

write(*,*)<br />

write(*,*) ”Downhill finished.”<br />

write(*,*)<br />

write(52,*)<br />

write(52,*) ”Downhill finished.”<br />

write(52,*)<br />

close(49)<br />

close(50)<br />

close(52)<br />

end

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!