Closed pabloconrat closed 3 years ago
Hi, just a few comments to changes I added:
I leave the reading of tau profile in main function. I was thinking about the good way to define the composition of our atmosphere, but the only way I found is to define the number of gases first, then make one pointer which contains taus of needed gases (H2O and CO2 in my code) and another pointer which contains the gases ratio. After gases and their ratios were chosen, the program would calculate the sum of all taus using function optical_thickness and store it as 2D vector.
I make some changes at radiative transfer to use 2D vector tau and new wavelength array as pointer
So as I already wrote, seems that the code works, but it very slow (I checked only first few time steps). It seems to me, that prof. Mayer said something about it, that it would be slow and that next week he will give us an advice how to make it faster, but I'm not sure :)
Update: My friend helped me to parallelized loop over wavelength in the radiative transfer function. I tried run the code for 16 cores and it took 3.5 sec for one time step calculation. So it will be 30 min for 500 hours. I uploaded the new main.cpp on my branch. For compiling use: g++ -Wall -o output main.cpp cplkavg.cpp ./lbl.arts/ascii.cpp -lm -fopenmp -O3
The problem is that I'm not sure if we should use only COURSE option with one core or we can choose other options with more cores. We can talk about it with prof. Mayer on Monday. As alternative my friend said that it also should be possible modify the code and run it in parallel on GPU, so not in the waves to weather Jupyterhub.
We import several matrices containing tau values for different greenhouse gases. In my opinion we have two steps to do here: