I've had a bit of a look through the documentation, and I think something like this should work. Is this the best approach? def Load_Tool_Libraries(Verbose): ... if Verbose == True: print 'Python - Version ' + sys.version print saga_api.SAGA_API_Get_Version() saga_api.SG_OMP_Set_Max_Num_Threads(2) print 'number of maximum threads used: ' + str(saga_api.SG_OMP_Get_Max_Num_Threads()) print 'number of loaded libraries: ' + str(saga_api.SG_Get_Tool_Library_Manager().Get_Count()) print return saga_ap...
Hi, just wondering if there is a way to control the number of cores used by tools when called through the python saga_api? I'm working with a large python package that uses saga_api extensively, and I am trying to run some scripts in parallel - the problem being that by default saga uses all the available cores. This really bottlenecks my scripts, and I would like to limit the number of cores that are used by the tools. I can only use version 7.6 of saga_api. Python 2.7.15+ (default, Jul 9 2019,...
After reading the manual again and thinking about this more, I think this might need to be scripted? This is my first attempt. As before, any help/guidance is greatly appreciated. infile="foo.nc" outfile=${infile%%.*}_appended.nc for ((year = 1; year <= 10; year++)); do echo $year outyear=${infile%%.*}_$year.nc # subset to year ncks -F -v temp_mm_1_5m -d time,$year $infile $outyear # delete redundant year dimension ncwa -O -a time $outyear $outyear # Change "month" to record dimension, then rename...
Hi, I have a large netcdf file of a paleoclimate simulation which should contain 24000 layers/timesteps. Unfortunately the variable of interest (monthly mean temp) is stored as {time, mon, lat, lon} where mon is set-up as a level. This means I only have 2000 timesteps with 12 levels for each timestep. netcdf test_file { dimensions: depth = 1 ; lat = 181 ; lon = 720 ; time = 2000 ; month = 12 ; variables: float depth(depth) ; depth:positive = "up" ; depth:units = "m" ; float lat(lat) ; lat:units =...
Hi, I have a large netcdf file of a paleoclimate simulation which should contain 24000 layers/timesteps. Unfortunately the variable of interest (monthly mean temp) is stored as {time, mon, lat, lon} where mon is set-up as a level. This means I only have 2000 timesteps with 12 levels for each timestep. netcdf test_file { dimensions: depth = 1 ; lat = 181 ; lon = 720 ; time = 2000 ; month = 12 ; variables: float depth(depth) ; depth:positive = "up" ; depth:units = "m" ; float lat(lat) ; lat:units =...
Hi Charlie, I'm trying to do a similar thing but the steps are producing some strange output. I have 2 files, one for the NH (-180,180,0,90) and one for SH (-180,180,-90,0). Each file has 2399 timesteps (the example datasets posted here have 10 timesteps). I have tried following your advice above, expecting a continuous global output (expected.png), but unfortunately I am ending up with a file where the x-axis remains as longitude but the y-axis becomes time (see actual.png). ncpdq -O -a lat,time...
Hi Charlie, I'm trying to do a similar thing but the steps are producing some strange output. I have 2 files, one for the NH (-180,180,0,90) and one for SH (-180,180,-90,0). Each file has 2399 timesteps (the example datasets posted here have 10 timesteps). I have tried following your advice above, expecting a continuous global output (expected.png), but unfortunately I am ending up with a file where the x-axis remains as longitude but the y-axis becomes time (see actual.png). ncpdq -O -a lat,time...
Hi Charlie, I'm trying to do a similar thing but the steps are producing some strange output. I have 2 files, one for the NH (-180,180,0,90) and one for SH (-180,180,-90,0). Each file has 2399 timesteps (the example datasets posted here have 10 timesteps). I have tried following your advice above, expecting a continuous global output (expected.png), but unfortunately I am ending up with a file where the x-axis remains as longitude but the y-axis becomes time (see actual.png). ncpdq -O -a lat,time...