Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPEI fitting parameters from historical run for use with projections #475

Open
rb4844 opened this issue Sep 1, 2022 · 1 comment
Open

Comments

@rb4844
Copy link

rb4844 commented Sep 1, 2022

Hi,

SPEI: I want to be able to use the same historical calibration period (1981-2010) and apply it to future data sets (but not as one continuous gridded time series) so that the future SPEI results can be compared to the historical SPEI.

From the documentation (https://climate-indices.readthedocs.io/en/latest/), in the table under ‘Indices Processing’,

save_params
Save distribution fitting variables to this file path. The fittings NetCDF is to be used as input when using the load_params option. [NOTE: only for use with the spi entrypoint for SPI.]

But I got, after trying to add save_params to the command line:

usage: process_climate_indices [-h] --index
                               {spi,spei,pnp,scaled,pet,palmers,all}
                               --periodicity {monthly,daily}
                               [--scales [SCALES [SCALES ...]]]
                               [--calibration_start_year CALIBRATION_START_YEAR]
                               [--calibration_end_year CALIBRATION_END_YEAR]
                               [--netcdf_precip NETCDF_PRECIP]
                               [--var_name_precip VAR_NAME_PRECIP]
                               [--netcdf_temp NETCDF_TEMP]
                               [--var_name_temp VAR_NAME_TEMP]
                               [--netcdf_pet NETCDF_PET]
                               [--var_name_pet VAR_NAME_PET]
                               [--netcdf_awc NETCDF_AWC]
                               [--var_name_awc VAR_NAME_AWC]
                               --output_file_base OUTPUT_FILE_BASE
                               [--multiprocessing {single,all_but_one,all}]
process_climate_indices: error: unrecognized arguments: --save_params

Which does not list save_params as an option.

Does save_params work with SPEI and if so how? It reads as though it may be only works for SPI? Otherwise, is there a way I can save the fitting parameters? I think these are the alphas and betas in indices.py. However, I don’t understand how to modify the code to save these.

This may be connected to issue #447 but it's not clear if this has been resolved or a solution found?
Many thanks.

@WeatherGod
Copy link
Contributor

I have a PR that extends the spi script to do this, but it was a bit of a hack and I never felt it was "correct". You can check it out at #458.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants