Comments (4)
Creating the out
dir separately would be totally reasonable!
It would only apply to temporary copies, right?
I think it would be good if Readme/License files were copied as well, but they could be moved into run
if necessary.
from pymagicc.
It would only apply to temporary copies, right?
I would have thought that it applies to every call to create_temp_copy
It would be great to keep the current structure of having the run directory as a subdir mimicking the MAGICC folder structure. It should be noted that eventually, the magicc binary will be distributed in a bin
subdirectory instead of in the run
dir. So for MAGICC7 the 'bin' and 'run' dir will need copied.
temp_dir
+-- run
| MAGCFG_USER.CFG
| MAGTUNE_XXX.CFG
| ...
+-- bin
| magicc
| magicc.exe
+-- out ( Empty)
| Installation_and_Use_Instructions.txt
| License_MAGICC6Executable.txt
from pymagicc.
As a baseline, I have timed the time take to setup and teardown copies using the following snippet:
import time
import numpy as np
from pymagicc import MAGICC7
NUM_TRIALS = 100
times = []
for i in range(NUM_TRIALS):
t0 = time.time()
with MAGICC7() as magicc:
pass
times.append(time.time() - t0)
print('MEAN: {:.5f}s'.format(np.mean(times)))
print('MIN: {:.5f}s'.format(np.min(times)))
print('MAX: {:.5f}s'.format(np.max(times)))
MAGICC7 (only 10 iterations):
MEAN: 4.44909s
MIN: 2.11318s
MAX: 6.34478s
MAGICC6:
MEAN: 0.01886s
MIN: 0.01594s
MAX: 0.05642s
from pymagicc.
With the new implementation
MAGICC7 (only 10 iterations):
MEAN: 0.36197s
MIN: 0.33411s
MAX: 0.54252s
MAGICC6:
MEAN: 0.02210s
MIN: 0.01646s
MAX: 0.03500s
Order of magnitude reduction for MAGICC7. MAGICC7 is still an order of magnitude slower than MAGICC6 due to more and larger configuration files
from pymagicc.
Related Issues (20)
- Move e.g. `diagnose_tcr_ecs_tcre` method out of core
- Update URLs
- Fix Windows CI HOT 9
- Switch to ScmRun
- Raise exception for certain log message level
- Use ScmRun's metadata handling
- Switch to RCMIP names
- Document MAGICC's input and output formats more carefully
- Install broken with Pandas 1.2 HOT 4
- License change HOT 7
- increase GHG response outside of scen HOT 21
- f90nml 1.3 HOT 6
- Fix citation.cff file
- README contradicts itself regarding licensing HOT 1
- pymagicc.run of MAGICC7 isn't generating dat_*.out HOT 3
- How to get the probabilistic distrubution of 600 runs?
- Adapt the mapping for DAT_SURFACE_TEMP towards 'Surface Air Temperature Change' HOT 2
- Unable to run on up-to-date Mac HOT 3
- error in pymagicc.run using magicc7 HOT 2
- Upgrade to pandas 2.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pymagicc.