Re: [arts-users] A (newbie) question about Pyarts
Hi Richard, I am running version 2.5.4, therefore I will install version 2.5.8 so the memory leak will be fixed. Thanks, M Il 09/01/2023 15:20, Richard Larsson ha scritto: Dear Mattia, What version are you running? We found a memory leak in 2.5.6 that we fixed in 2.5.8. Just do "pyarts.version" in a python interpreter to see your version string. //Richard Den mån 9 jan. 2023 kl 15:12 skrev Mattia Sabatini : Dear all, I wrote a Python script that uses Pyarts for executing batch calculations with ARTS. My task is to simulate top of atmosphere monochromatic radiance together with Jacobians of temperature, water vapour and surface temperature in the thermal infrared range using the Garand atmospheric profiles. Essentially the script consists of two nested loops: - from pyarts import workspace ws = workspace.Workspace() * for loop #1 o for loop #2 + ws.ybatchCalc() + ws.WriteXML(ybatch filename) + subprocess.run (gzip ybatch xml file) + ws.WriteXML(ybatch_jacobians filename) + subprocess.run (gzip ybatch_jacobians xml file) - The two for loops are used for calculations of spectral reflectivities, given that there are not emissivity models in ARTS suitable for the spectral range in exam. As the python execution goes on, the memory usage keeps increasing slowly but constantly, and eventually the process is killed. Even if I select only 4-5 profiles instead of the whole batch. The only way to make things work seems to be deactivating the Jacobians calculations for most of the variables (or all of them), or perhaps reducing the number of pressure levels onto which these calculations are performed. I was wondering why this is happening, given that both ybatch and ybatch_jacobians workspace variables are overwritten every time ybatchCalc is executed. Thanks, Mattia
Re: [arts-users] A (newbie) question about Pyarts
Dear Mattia, What version are you running? We found a memory leak in 2.5.6 that we fixed in 2.5.8. Just do "pyarts.version" in a python interpreter to see your version string. //Richard Den mån 9 jan. 2023 kl 15:12 skrev Mattia Sabatini < mattia.sabat...@artov.ismar.cnr.it>: > Dear all, > > I wrote a Python script that uses Pyarts for executing batch calculations > with ARTS. > > My task is to simulate top of atmosphere monochromatic radiance together > with Jacobians of temperature, water vapour and surface temperature in the > thermal infrared range using the Garand atmospheric profiles. > > Essentially the script consists of two nested loops: > > - > > from pyarts import workspace > > ws = workspace.Workspace() > >- for loop #1 > - for loop #2 > - ws.ybatchCalc() > - ws.WriteXML(ybatch filename) > - subprocess.run (gzip ybatch xml file) > - ws.WriteXML(ybatch_jacobians filename) > - subprocess.run (gzip ybatch_jacobians xml file) > > - > > The two for loops are used for calculations of spectral reflectivities, > given that there are not emissivity models in ARTS suitable for the > spectral range in exam. > > As the python execution goes on, the memory usage keeps increasing slowly > but constantly, and eventually the process is killed. Even if I select only > 4-5 profiles instead of the whole batch. The only way to make things work > seems to be deactivating the Jacobians calculations for most of the > variables (or all of them), or perhaps reducing the number of pressure > levels onto which these calculations are performed. > > I was wondering why this is happening, given that both ybatch and > ybatch_jacobians workspace variables are overwritten every time ybatchCalc > is executed. > > Thanks, > > Mattia > > >
[arts-users] A (newbie) question about Pyarts
Dear all, I wrote a Python script that uses Pyarts for executing batch calculations with ARTS. My task is to simulate top of atmosphere monochromatic radiance together with Jacobians of temperature, water vapour and surface temperature in the thermal infrared range using the Garand atmospheric profiles. Essentially the script consists of two nested loops: - from pyarts import workspace ws = workspace.Workspace() * for loop #1 o for loop #2 + ws.ybatchCalc() + ws.WriteXML(ybatch filename) + subprocess.run (gzip ybatch xml file) + ws.WriteXML(ybatch_jacobians filename) + subprocess.run (gzip ybatch_jacobians xml file) - The two for loops are used for calculations of spectral reflectivities, given that there are not emissivity models in ARTS suitable for the spectral range in exam. As the python execution goes on, the memory usage keeps increasing slowly but constantly, and eventually the process is killed. Even if I select only 4-5 profiles instead of the whole batch. The only way to make things work seems to be deactivating the Jacobians calculations for most of the variables (or all of them), or perhaps reducing the number of pressure levels onto which these calculations are performed. I was wondering why this is happening, given that both ybatch and ybatch_jacobians workspace variables are overwritten every time ybatchCalc is executed. Thanks, Mattia