diff --git a/ProcessorComponents.py b/ProcessorComponents.py index 6af63c112c084c7f072937a1320622d195269e9d..1912e8a9223b3efb401bdb1a1a8178a45f515d20 100644 --- a/ProcessorComponents.py +++ b/ProcessorComponents.py @@ -1530,8 +1530,10 @@ def process_EWS_plotting_dep(jobPath,config): deposition_path = f"{jobPath}/{deposition_file_name}" - # TODO: get the filename format part from the config - name_file_wildcard = f"{deposition_path}/deposition_srcs_allregions_*.txt" + # get the file name from the config + # this file name can be a glob, as long as matches can all be loaded by iris + deposition_data_file_name = Template(config['Deposition']['DataFileTemplate']).substitute(**config) + name_file_wildcard = f"{deposition_path}/{deposition_data_file_name}" EWSPlottingOutputGlobs = [] diff --git a/configs/config_EastAfrica_an_ewsdev.json b/configs/config_EastAfrica_an_ewsdev.json index 2ff524745bc188231db0b263a3273d83f00270d7..7094604246a2f2507d0b1ce5c88e2f4979c39443 100644 --- a/configs/config_EastAfrica_an_ewsdev.json +++ b/configs/config_EastAfrica_an_ewsdev.json @@ -94,6 +94,7 @@ "Deposition" : { "ServerPathTemplate" : "/storage/sftp/metofficeupload/upload/Ethiopia/fromMO/daily_name/", "InputFileTemplate" : "WR_NAME_Ethiopia_${StartString}_fc", + "DataFileTemplate" : "deposition_srcs_allregions_${StartString}.nc", "TimeExpectedAvailable" : "0800", "ProcessPreJob" : "process_pre_job_server_download", "ProcessInJob" : "process_in_job_dep", diff --git a/configs/config_EastAfrica_an_live.json b/configs/config_EastAfrica_an_live.json index 400bdec2cbfd501c022276d0bd72fa85def6e8af..b1d86413fdc13e3a6ac96891f55d0810415a1443 100644 --- a/configs/config_EastAfrica_an_live.json +++ b/configs/config_EastAfrica_an_live.json @@ -94,6 +94,7 @@ "Deposition" : { "ServerPathTemplate" : "/storage/sftp/metofficeupload/upload/Ethiopia/fromMO/daily_name/", "InputFileTemplate" : "WR_NAME_Ethiopia_${StartString}_an", + "DataFileTemplate" : "deposition_srcs_allregions_${StartString}.nc", "TimeExpectedAvailable" : "1500", "ProcessPreJob" : "process_pre_job_server_download", "ProcessInJob" : "process_in_job_dep", diff --git a/configs/config_EastAfrica_fc_ewsdev.json b/configs/config_EastAfrica_fc_ewsdev.json index 06a54241f21bcc445a22bfa196465e62f5bab25d..ea6c0f47a293c2219a179bf112fc755a9d023346 100644 --- a/configs/config_EastAfrica_fc_ewsdev.json +++ b/configs/config_EastAfrica_fc_ewsdev.json @@ -114,6 +114,7 @@ "Deposition" : { "ServerPathTemplate" : "/storage/sftp/metofficeupload/upload/Ethiopia/fromMO/daily_name/", "InputFileTemplate" : "WR_NAME_Ethiopia_${StartString}_fc", + "DataFileTemplate" : "deposition_srcs_allregions_${StartString}.nc", "TimeExpectedAvailable" : "0800", "ProcessPreJob" : "process_pre_job_server_download", "ProcessInJob" : "process_in_job_dep", diff --git a/configs/config_EastAfrica_fc_live.json b/configs/config_EastAfrica_fc_live.json index cbd454f7073cade4b4ac7e2e3210ea847efdf8c2..c074788fae4da0dd57e86e4a392b4c021d2c55f9 100644 --- a/configs/config_EastAfrica_fc_live.json +++ b/configs/config_EastAfrica_fc_live.json @@ -94,6 +94,7 @@ "Deposition" : { "ServerPathTemplate" : "/storage/sftp/metofficeupload/upload/Ethiopia/fromMO/daily_name/", "InputFileTemplate" : "WR_NAME_Ethiopia_${StartString}_fc", + "DataFileTemplate" : "deposition_srcs_allregions_${StartString}.nc", "TimeExpectedAvailable" : "0800", "ProcessPreJob" : "process_pre_job_server_download", "ProcessInJob" : "process_in_job_dep", @@ -119,23 +120,28 @@ } }, "Epidemiology" : { + "DiseaseNames" : ["StemRust"], + "CalculationSpanDays" : ["20210715",5], + "TimeStep_hours": "3", "ProcessPreJob" : "process_pre_job_epi", "ProcessInJob" : "process_in_job_epi", "ProcessEWSPlotting" : "process_EWS_plotting_epi", "Host" : { - "MaxFieldsPerCell" : "1000", - "HostRaster" : "/storage/app/EWS/General/EWS-EpiModel/SAsiaInputs/HostData/WheatRaster.tif" + "MaxFieldsPerCell" : "1", + "HostRaster" : "/storage/app/EWS/General/EWS-EpiModel/input_EastAfrica/wheat_area_frac_MapSPAM2010_EastAfrica.tif" }, "Deposition" : { - "VariableName" : "P_RECONDITA_DEPOSITION", - "PathTemplate" : "${WorkspacePath}DEPOSITION_${StartString}/WR_NAME_SouthAsia_${StartString}/", - "SuccessFileTemplate" : "${WorkspacePath}DEPOSITION_${StartString}/DEPOSITION_SUCCESS.txt", + "VariableName" : "P_GRAMINIS_DEPOSITION", + "PathTemplate" : "${WorkspacePath}DEPOSITION_${DateString}/WR_NAME_Ethiopia_${DateString}_fc/", + "SuccessFileTemplate" : "${WorkspacePath}DEPOSITION_${StartString}/STATUS_SUCCESS", + "FileListerFunction" : "list_deposition_files_historical", "FileNameTemplate" : "deposition_srcs_allregions_C1_T${tIndexPlusOneString}_${iTimeString}.txt", "FileNamePrepared" : "?" }, "Environment" : { - "PathTemplate" : "${WorkspacePath}ENVIRONMENT_${StartString}/WR_EnvSuit_SouthAsia_${StartString}/${DiseaseName}Rust_${RegionName}/${StartString}0000/", - "SuccessFileTemplate" : "${WorkspacePath}ENVIRONMENT_${StartString}/ENVIRONMENT_SUCCESS.txt", + "PathTemplate" : "${WorkspacePath}ENVIRONMENT_2.0_${DateString}/processed/${RegionName}/${DiseaseName}/", + "SuccessFileTemplate" : "${WorkspacePath}ENVIRONMENT_2.0_${StartString}/STATUS_SUCCESS", + "FileListerFunction" : "list_env_suit_files_historical", "FileNameTemplate" : "RIE_value.csv", "FileNamePrepared" : "?" }, @@ -150,42 +156,37 @@ "vmax" : 1.5e+1, "subplot_position" : [0,0], "cmapString" : "CMRmap_r", - "bounds" : [87.9, 92.7, 20.5, 26.7], - "UTMprojection" : 45 + "bounds": [32.5,48.0,3.3,15.0], + "UTMprojection" : 37 + } },{ - "model" : "log10Dep", - "modelArguments" : {}, + "model" : "ps", + "modelArguments": { + "beta": 4.0e-3, + "gamma": 6.3e-4, + "alpha": 1.0, + "infection": "previous" + }, "infectionRasterFileName" : "?", - "description": "log(spore deposition)", + "description": "SE[beta*log10(alpha*D)+gamma*P]", "analysis" : { "vmin" : 0.0e+0, - "vmax" : 3.0e+2, + "vmax" : 1, "subplot_position" : [0,1], "cmapString" : "CMRmap_r", - "bounds" : [87.9, 92.7, 20.5, 26.7], - "UTMprojection" : 45 + "bounds": [32.5,48.0,3.3,15.0], + "UTMprojection" : 37 } - },{ - "model" : "log10DepEnv", - "modelArguments" : {}, - "infectionRasterFileName" : "?", - "description": "EPI: env.suit $\\times$ log(dep.)", - "analysis" : { - "vmin" : 0.0e+0, - "vmax" : 1.5e+1, - "subplot_position" : [0,2], - "cmapString" : "CMRmap_r", - "bounds" : [87.9, 92.7, 20.5, 26.7], - "UTMprojection" : 45 - } } ], "EWS-Plotting" : { "Path" : "/storage/app/EWS/General/EWS-Plotting/", - "RunConfig" : "/storage/app/EWS/General/EWS-Plotting/python/data/json_config/RUN_CONFIG_ETH_PINE.json", - "PythonScript" : "/storage/app/EWS/General/EWS-Plotting/python/bangladesh/ews_plotting_epi_ethiopia_main.py", - "EpiCase" : "log10DepEnv" + "PythonScript" : "/storage/app/EWS/General/EWS-Plotting/python/chart_areas/east_africa/ews_plotting_epi_east_africa_main.py", + "ChartConfig" : "/storage/app/EWS/General/EWS-Plotting/python/data/json_config/ews/chart/CHART_CONFIG_EAST_AFRICA_PINE.json", + "RunConfig_seasonsofar" : "/storage/home/jws52/projects/EWS-plotting/python/data/json_config/ews/epi/RUN_CONFIG_EPI_seasonaccum.json", + "RunConfig_weekahead" : "/storage/home/jws52/projects/EWS-plotting/python/data/json_config/ews/epi/RUN_CONFIG_EPI_weekahead.json", + "EpiCase" : "ps" } }, "Advisory" : @@ -252,4 +253,4 @@ }, "logos" : "/storage/app/EWS/Ethiopia/Documents/logos_Ethiopia_plotting.png" } -} +} \ No newline at end of file diff --git a/configs/config_SouthAsia_an_ewsdev.json b/configs/config_SouthAsia_an_ewsdev.json index 097c4c0a4674bbea06d73757c85e03176258ad2a..992e2835554702219bb305ef92210c70e2902998 100644 --- a/configs/config_SouthAsia_an_ewsdev.json +++ b/configs/config_SouthAsia_an_ewsdev.json @@ -93,6 +93,7 @@ "Deposition" : { "ServerPathTemplate" : "/storage/sftp/metofficeupload/upload/SouthAsia/fromMO/daily_name/", "InputFileTemplate" : "WR_NAME_SouthAsia_${StartString}_fc", + "DataFileTemplate" : "deposition_srcs_allregions_${StartString}.nc", "TimeExpectedAvailable" : "0800", "ProcessPreJob" : "process_pre_job_server_download", "ProcessInJob" : "process_in_job_dep", diff --git a/configs/config_SouthAsia_an_live.json b/configs/config_SouthAsia_an_live.json index 876f6143d25af50b08e951ec063de38de16cbdb6..07b9b402b6a92e54a277bfe3dee70e0c7a06dfde 100644 --- a/configs/config_SouthAsia_an_live.json +++ b/configs/config_SouthAsia_an_live.json @@ -93,6 +93,7 @@ "Deposition" : { "ServerPathTemplate" : "/storage/sftp/metofficeupload/upload/SouthAsia/fromMO/daily_name/", "InputFileTemplate" : "WR_NAME_SouthAsia_${StartString}_fc", + "DataFileTemplate" : "deposition_srcs_allregions_${StartString}.nc", "TimeExpectedAvailable" : "1500", "ProcessPreJob" : "process_pre_job_server_download", "ProcessInJob" : "process_in_job_dep", diff --git a/configs/config_SouthAsia_fc_ewsdev.json b/configs/config_SouthAsia_fc_ewsdev.json index 6bad040858f035b46b3c63b2db16826e6f3709c7..b384ecaa58e7e975f328569e87a8be01f0e0a90c 100644 --- a/configs/config_SouthAsia_fc_ewsdev.json +++ b/configs/config_SouthAsia_fc_ewsdev.json @@ -114,6 +114,7 @@ "Deposition" : { "ServerPathTemplate" : "/storage/sftp/metofficeupload/upload/SouthAsia/fromMO/daily_name/", "InputFileTemplate" : "WR_NAME_SouthAsia_${StartString}_fc", + "DataFileTemplate" : "deposition_srcs_allregions_${StartString}.nc", "TimeExpectedAvailable" : "0800", "ProcessPreJob" : "process_pre_job_server_download", "ProcessInJob" : "process_in_job_dep", diff --git a/configs/config_SouthAsia_fc_live.json b/configs/config_SouthAsia_fc_live.json index 8c471390cb6e02253d7b8595d5dad516e2e38c75..386aadee9269020cc39598b4dec00ec41a158206 100644 --- a/configs/config_SouthAsia_fc_live.json +++ b/configs/config_SouthAsia_fc_live.json @@ -93,6 +93,7 @@ "Deposition" : { "ServerPathTemplate" : "/storage/sftp/metofficeupload/upload/SouthAsia/fromMO/daily_name/", "InputFileTemplate" : "WR_NAME_SouthAsia_${StartString}_fc", + "DataFileTemplate" : "deposition_srcs_allregions_${StartString}.nc", "TimeExpectedAvailable" : "0800", "ProcessPreJob" : "process_pre_job_server_download", "ProcessInJob" : "process_in_job_dep",