oggm icon indicating copy to clipboard operation
oggm copied to clipboard

problem passing a reference t_star list to find_inversion_calving()

Open bearecinos opened this issue 5 years ago • 3 comments

I just realise that if I want to use a reference t_star list in the calving module. I wont be able to pass that to the find_inversion_calving() function. I need to pass the argument ref_df to local_t_star() in order to instruct oggm to dont use the default list.

am I wrong here or we need to add a few things to the calving function?

bearecinos avatar Dec 05 '19 16:12 bearecinos

If you run compute_ref_tstar on your reference glaciers it will write a 'ref_tstars.csv' to your working directory. This will then be used within local_t_star to derive the t_stars for your none-reference glaciers.

You have to set cfg.PARAMS['run_mb_calibration'] = True though

matthiasdusch avatar Dec 05 '19 16:12 matthiasdusch

After some off-github discussion I'll extent my previous statement:

If you run the t_star calibration for the reference glaciers in the same instance with the calving simulations it should be fine to use the ref_tstars.csv from the working directory.

If you want to reuse the ref_tstars.csv in later runs without doing the calibration again, you could copy the file to the working directory. But the cleaner solution would be to load the csv-file as DataFrame and pass it to the local_t_star function within your calving function. Therefore you either need to load the file within the calving function or pass it as argument. Either way you are right, this would need a small addition to your function.

matthiasdusch avatar Dec 05 '19 17:12 matthiasdusch

Thanks @matthiasdusch .. I am already running things by copying ref_tstars.csv to the working directory ... this ref_tstars.csv that I copy during every job are the result of the calibration using the ArcticDEM. For now the solution is fine, but I think that if in the future someone wants to use the calving function and needs to make a calibration they should be able to pass the result of such calibration to the module... I will modify things and make a pull request ... see what @fmaussion thinks...

bearecinos avatar Dec 10 '19 14:12 bearecinos