dtcenter / MET

Model Evaluation Tools
https://dtcenter.org/community-code/model-evaluation-tools-met
Apache License 2.0
78 stars 24 forks source link

Support new "shift_data" config file option and cleanup ConfigConstants structs. #914

Open dwfncar opened 6 years ago

dwfncar commented 6 years ago

As of met-6.1, the config_constants.h file contains 4 structs which include interpolation options: InterpInfo, RegridInfo, NbrhdInfo, and HiRAInfo.


First, create a new struct named InterpOpts which includes all the interpolation options, as show in the attached version of config_constants.h. Factor the interpolation options out of the 4 structs listed above and just include an instance of InterpOpts.


Add a parse_conf_interp_opts() utility function and update the parsing functions for the other structs to call it.


Next, add a new ShiftDataInfo struct which includes an instance of InterpOpts as well. In the MET config files, let the user define:


shift_data = {
  fr_lat_lon[] = { 30, -100 };
  to_lat_lon[] = { 35, -110 };
  method = NEAREST;
  width = 1;
}


After reading gridded data, we'd apply a rigid shift of the data as defined by fr_lat_lon and to_lat_lon. We could also support this for point observations by updating the observation lat/lon locations.


This is all useful for doing feature-relative verification where we're tracking a feature, like a hurricane.


Need to do some more brainstorming here. Could also consider reading the TCST output from TC-Pairs to define what the lat/lon shift should be. Could also read the ascii output from MTD for the same reason.


Think about how this should work for grid_stat and point_stat, but also for series_analysis where the times differ. [MET-914] created by johnhg

lisagoodrich commented 5 years ago

Original JIRA attachment location: https://sdg.rap.ucar.edu/jira/browse/MET-914?filter=12903

Remove .txt from file once it's downloaded. github can't save files with the.h extension. config_constants.h.txt