pabloconrat / our_first_climate_model

A Coupled Radiation-Convection 1D Climate Model under development for the Master level class in meteorology in advanced atmospheric physics
1 stars 0 forks source link

Implement 2D tau #37

Closed pabloconrat closed 3 years ago

pabloconrat commented 3 years ago

We import several matrices containing tau values for different greenhouse gases. In my opinion we have two steps to do here:

TBardachova commented 3 years ago

Hi, just a few comments to changes I added:

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 :)

TBardachova commented 3 years ago

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.