pcmdi_metrics icon indicating copy to clipboard operation
pcmdi_metrics copied to clipboard

[Feature]: Shape file capablity for mean climate

Open lee1043 opened this issue 10 months ago • 3 comments

Is your feature request related to a problem?

Capability to apply shape file for mean climate metrics calculation.

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

lee1043 avatar Apr 25 '24 19:04 lee1043

@acordonez I recall you have implemented the shape file capability, could you point how this task could be initiated?

lee1043 avatar Apr 25 '24 19:04 lee1043

@lee1043 The function is here: https://github.com/PCMDI/pcmdi_metrics/blob/main/pcmdi_metrics/io/region_from_file.py

It's a good idea to apply the shape file to all data files used, including things like the land/sea mask.

For an example of how to apply it, you can look at my edits to the precip variability code: Parameters needed: https://github.com/PCMDI/pcmdi_metrics/blob/9d35ceb5e2df1b5a566fc6bd638dab306edf69c6/pcmdi_metrics/precip_variability/lib/argparse_functions.py#L92-L106 Function call: https://github.com/PCMDI/pcmdi_metrics/blob/9d35ceb5e2df1b5a566fc6bd638dab306edf69c6/pcmdi_metrics/precip_variability/lib/lib_variability_across_timescales.py#L76

acordonez avatar Apr 25 '24 19:04 acordonez

@acordonez thank you for the information!

lee1043 avatar Apr 25 '24 21:04 lee1043