Wednesday, February 20, 2008

Fortran and Fluxes Problems

In the last few weeks I have been working in this "Flux" code non-stop. I have been solving problems trying to make that code work with the output of my modified CV code for a little more than two months, and I still was not able to make it work properly.

Last week I found a problem, that I first thought was an interpolation problem, but it turned out to be something else. Actually, the problem was something that I have done wrong. When I tested the points through each of the rays to find if they were inside the wind region, I made a mistake. The wind has some geometric parameters, but to use those parameters I first have to made a change of variables, and I was not doing that, so my wind region was being calculated with wrong boundaries. And these wrong boundaries were the reason I had problems with the interpolation.

I recalculated the correct boundaries, the interpolation problems were solved, but still the code did not work properly.

After a while I noticed other thing wrong. My grid that should be a circular grid, was instead an elliptical grid. I solved that today. The grid is circular, but the results are far from the expected yet.

I am running out of ideas to solve the problems with this code... I have the feeling that my stellar flux is far too low compared with the magnetosphere and diskwind fluxes, but I don't know why, and that does not make much sense to me. The optical depths in the magnetospheric funnel seems to be right this time. But there is a weird red-shifted absorption feature in my profiles that does not match what I was expecting for the inclination I am using.

May the Radiative Tranfer and Fortran 77 Gods have mercy on my mind, and give me some inspiration to solve this... :P