TopoPyScale icon indicating copy to clipboard operation
TopoPyScale copied to clipboard

Removal of SVF file (ds_param.nc) not desired when cleaning?

Open joelfiddes opened this issue 2 years ago • 4 comments

  • If we want to clean the sim it is normally to remove results and change some parameters eg cluster number.
  • The only reason to remove ds_param.nc it is because we have changed the dem.
  • On big domains, the SVF computation can take a long time (hrs) and therefore a pain to recompute when restarting a sim.
  • It is desirable to remove ds_param.nc from the cleaning routine I think - we could write it to the dem directory as it belongs together with the dem I think?

joelfiddes avatar Feb 23 '23 09:02 joelfiddes

good point Joel. I ran into this behavior that is frustrating, indeed. We could instead have an overwrite flag in the compute_dem_parameter(). Would that be a good alternative?

ArcticSnow avatar Feb 23 '23 09:02 ArcticSnow

yup - i think that would be a good solution. We still need write ds_param.nc to dem dir or else it is removed by:

if self.config.outputs.file.clean_outputs: # remove outputs directory because if results already exist this causes concat of netcdf files try: shutil.rmtree(self.config.project.directory + '/outputs/') print('---> Output directory cleaned') except: os.makedirs('/'.join((self.config.project.directory, 'outputs/')))

joelfiddes avatar Feb 23 '23 09:02 joelfiddes

Hi everyone. can anyone just give me a gist of what I need to do? then I can proceed with the work

ShawanDeba avatar May 24 '23 14:05 ShawanDeba

@ShawanDeba Welcome aboard! If you would like to get involved a first good step would be to try deploy the code on your laptop (linux is best) and run the examples https://github.com/ArcticSnow/TopoPyScale_examples then will be easier to get into the code. I can give some pointers once you have a first successful run of the code. Let me know if you get stuck anywhere. Thanks :)

joelfiddes avatar May 24 '23 14:05 joelfiddes