bbp icon indicating copy to clipboard operation
bbp copied to clipboard

FAS module no longer works as a standalone module (without comparing to observations)

Open kevinmilner opened this issue 3 years ago • 3 comments

@fabiolsilva, I had been using the FAS module to compute FAS for simulations where I was not comparing with any observations. This commit to the FAS module now breaks it if observations aren't supplied:

646b247492212ade3f6a59210fcfd90cd050c29f

I get this stack trace at first:

Traceback (most recent call last):
  File "/project/scec_608/kmilner/bbp/dev/bbp/comps/run_bbp.py", line 304, in <module>
    obj = item.instantiate(sim_id)
  File "/project/scec_608/kmilner/bbp/dev/bbp/comps/module.py", line 134, in instantiate
    return globals()[self.module_name](*self.module_args, **self.kw_args)
TypeError: __init__() missing 1 required positional argument: 'i_comparison_label'

I then tried changing the init method to default i_comparison_label to None, but get a new one:

Traceback (most recent call last):
  File "/project/scec_608/kmilner/bbp/dev/bbp/comps/run_bbp.py", line 305, in <module>
    obj.run()
  File "/project/scec_608/kmilner/bbp/dev/bbp/comps/fas.py", line 836, in run
    obs_dt = read_bbp_dt(input_obs_acc_file)
  File "/project/scec_608/kmilner/bbp/dev/bbp/comps/fas.py", line 339, in read_bbp_dt
    input_file = open(bbp_file)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/SLURM_3430421/tmpdata/11127002307386261/obs_seis_USC/USC.bbp'

I need this working soon, so I'll start throwing a bunch of if statements in there to isolate the observation code, but thought I would give you the chance to do it if you would prefer and can get to it in the next day or so. Thanks!

Kevin

kevinmilner avatar Jan 25 '22 00:01 kevinmilner