GeoscienceAustralia / eqrm

Automatically exported from code.google.com/p/eqrm
Other
5 stars 4 forks source link

File_Store class - add the option to store temporary files in a specified directory #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
As seen in issue 9, /tmp/ (the default temporary directory python uses on 
linux) can fill up pretty fast. File_Store uses the tempfile library to create 
paths for the transient .npy files.

This can be alleviated by allowing File_Store to use a parameter that specifies 
where the temporary file location is.

Original issue reported on code.google.com by b...@girorosso.com on 21 Feb 2012 at 2:00

GoogleCodeExporter commented 9 years ago
Added new parameter - 'data_array_storage'. This defaults to output_dir. As an 
example of this in use, for scenario TS_risk56:

output_dir = ./implementation_tests/current/TS_risk56

While scenario running:
ben/eqrm/trunk/implementation_tests/current/TS_risk56$ ls
current_event_set              event_set.rupture_centroid_x.zGfndl.npy
eqrm_flags.py                  event_set.rupture_centroid_y.mvm81q.npy
event_activity.event_activity.mh2XiX.npy   event_set.source_zone_id.427vzW.npy
event_set.area.EAE62g.npy          event_set.trace_end_lat.9NLWCB.npy
event_set.azimuth.Lj3BIg.npy           event_set.trace_end_lon.pYy25r.npy
event_set.depth.pVyBVR.npy         event_set.trace_start_lat.8TVTBX.npy
event_set.depth_to_top.i53oUr.npy      event_set.trace_start_lon.v0bR_A.npy
event_set.dip.HVIQbk.npy           event_set.width.DCFTnB.npy
event_set.event_id.yH7Qu1.npy          log-0.txt
event_set.fault_type.lByYok.npy        newc_bval.txt
event_set.fault_width.z22LW2.npy       newc_distance_rjb.txt
event_set.length.VMWe2h.npy        newc_distance_rup.txt
event_set.ML.gcngKE.npy            newc_event_set.txt
event_set.Mw.mpSZ7A.npy            newc_structures.txt
event_set.rupture_centroid_lat.TWx9_0.npy  newc_total_building_loss.txt
event_set.rupture_centroid_lon.XFbx7D.npy

When complete:
ben/eqrm/trunk/implementation_tests/current/TS_risk56$ ls
current_event_set  newc_bval.txt      newc_event_set.txt
eqrm_flags.py      newc_distance_rjb.txt  newc_structures.txt
log-0.txt      newc_distance_rup.txt  newc_total_building_loss.txt

Original comment by b...@girorosso.com on 21 Feb 2012 at 4:42

GoogleCodeExporter commented 9 years ago
This is implemented in revision 952.

Unit tests added and updated, a new implementation test, and documentation 
updated.

Original comment by b...@girorosso.com on 21 Feb 2012 at 10:59