Create variable date

Process Step

Description Compute target variable ‘date’ based on variable ‘time’ and ‘region’ to convert from UTC to local time zones

This step uses a script written in Python3.


Diagram of the Process Step

digraph Diagram { graph [ stylesheet="../_static/custom.css" fontnames = "svg" # "... rock solid standards compliant SVG", see: https://graphviz.org/faq/font/#what-about-svg-fonts rankdir="LR" nodesep="0.15" tooltip=" " ]; node [ fontname="sans-serif" ]; Step [ shape="rect" style="filled, rounded" width="3" height="0.8" fontcolor="white" fillcolor="#4363d8" fontsize="13pt" label="Create variable date\n(current process step)" tooltip=" " ]; # input parameter parameter_fa27c73e_7e8c_4b9a_b2cd_2de28f8352b2 [ shape="rect" style="filled" width="2" height="0.1" fontcolor="blue" fontsize="10pt" URL="https://ess-search.nsd.no/en/variable/1ccbcbf9-588f-46bd-b233-914a59db32aa" target="_blank" label=<<i>Variable time:</i><br/>hours since 'offset time (in<br/>UTC)'> tooltip="Input parameter for current process step" fillcolor="#ffe119" ]; parameter_fa27c73e_7e8c_4b9a_b2cd_2de28f8352b2:e -> Step:w [ minlen="2" ]; parameter_30f06f3d_2e0b_4066_8e89_618be51244ce [ shape="rect" style="filled" width="2" height="0.1" fontcolor="blue" fontsize="10pt" URL="https://ess-search.nsd.no/en/variable/812c4035-6886-43aa-a18c-8d797390a8b4" target="_blank" label=<<i>Variable region_id:</i><br/>Nuts 2016 region code> tooltip="Input parameter for current process step" fillcolor="#ffe119" ]; parameter_30f06f3d_2e0b_4066_8e89_618be51244ce:e -> Step:w [ minlen="2" ]; # output parameter parameter_a4c5a88e_5f12_4bb1_9be7_3f54c54ff4f6 [ shape="rect" style="filled" width="2" height="0.1" fontcolor="blue" fontsize="10pt" URL="https://ess-search.nsd.no/en/variable/0cae5306-79bf-4976-b25a-3f790aa312be" target="_blank" label=<<i>Variable date:</i><br/>Date> tooltip="Output parameter for current process step" fillcolor="#dcbeff" ]; Step:e -> parameter_a4c5a88e_5f12_4bb1_9be7_3f54c54ff4f6:w [ minlen="2" ]; # following step step_506c2de5_97d2_4bea_9c8e_dc014ae0e5a2 [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable tmpdca" URL="../step_506c2de5-97d2-4bea-9c8e-dc014ae0e5a2.html" target="_parent" tooltip="Following process step:\nCompute target variable 'tmpdca' based on variable 'tmpdc', 'region_id', 'date' and 'pop. Calculate average temperature by date for each grid cell to be included in the data. Temperature measured in Kelvin is converted to degrees Celsius (°C) by subtracting 273.15. Calculate temperature averages for each region, weighted by variable 'pop' that is based on global human settlements statistics." ]; parameter_a4c5a88e_5f12_4bb1_9be7_3f54c54ff4f6:e -> step_506c2de5_97d2_4bea_9c8e_dc014ae0e5a2:w [ minlen="2" ]; # following step step_9de7f212_44d3_4f68_a938_55fbb50d5b7c [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable tmpdcmx" URL="../step_9de7f212-44d3-4f68-a938-55fbb50d5b7c.html" target="_parent" tooltip="Following process step:\nCompute target variable 'tmpdcmx' based on variable 'tmpdc', 'region_id', 'date' and 'pop'. Calculate maximum temperature by date for each grid cell to be included in the data. Temperature measured in Kelvin is converted to degrees Celsius (°C) by subtracting 273.15. Calculate average maximums for each region, weighted by variable 'pop' that is based on global human settlements statistics." ]; parameter_a4c5a88e_5f12_4bb1_9be7_3f54c54ff4f6:e -> step_9de7f212_44d3_4f68_a938_55fbb50d5b7c:w [ minlen="2" ]; # following step step_056a33e2_0c73_4e1e_9e38_6ac1554f0062 [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable tmpdcmn" URL="../step_056a33e2-0c73-4e1e-9e38-6ac1554f0062.html" target="_parent" tooltip="Following process step:\nCompute target variable 'tmpdcmn' based on variable 'tmpdc', 'region_id', 'date' and 'pop'. Calculate minimum temperature by date for each grid cell to be included in the data. Temperature measured in Kelvin converted to degrees Celsius (°C) by subtracting 273.15. Calculate average minimums for each region, weighted by variable 'pop' that is based on global human settlements statistics." ]; parameter_a4c5a88e_5f12_4bb1_9be7_3f54c54ff4f6:e -> step_056a33e2_0c73_4e1e_9e38_6ac1554f0062:w [ minlen="2" ]; # following step step_e06e5202_2b1d_4f9b_9d3e_3e864f717ee4 [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable tmpdcaw" URL="../step_e06e5202-2b1d-4f9b-9d3e-3e864f717ee4.html" target="_parent" tooltip="Following process step:\nCalculate average temperature week (seven days) before the date, date included for each region, based on variables 'tmpdca', 'date' and 'region_id'." ]; parameter_a4c5a88e_5f12_4bb1_9be7_3f54c54ff4f6:e -> step_e06e5202_2b1d_4f9b_9d3e_3e864f717ee4:w [ minlen="2" ]; # following step step_5e9724c6_6205_4846_920c_881fe01ae6d0 [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable tmpdcam" URL="../step_5e9724c6-6205-4846-920c-881fe01ae6d0.html" target="_parent" tooltip="Following process step:\nCalculate average temperature month (thirty days) before the date, date included for each region, date included, based on variables 'tmpdca', 'date' and 'region_id'." ]; parameter_a4c5a88e_5f12_4bb1_9be7_3f54c54ff4f6:e -> step_5e9724c6_6205_4846_920c_881fe01ae6d0:w [ minlen="2" ]; # following step step_770f6e63_8f45_4e8f_a086_c2d2dd774b26 [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable tmpdca3m" URL="../step_770f6e63-8f45-4e8f-a086-c2d2dd774b26.html" target="_parent" tooltip="Following process step:\nCalculate average temperature three months (ninty days) before the date, date included for each region, date included, based on variables 'tmpdca', 'date' and 'region_id'." ]; parameter_a4c5a88e_5f12_4bb1_9be7_3f54c54ff4f6:e -> step_770f6e63_8f45_4e8f_a086_c2d2dd774b26:w [ minlen="2" ]; # following step step_13fb673d_08a1_4ad3_b7c5_282fdd6030df [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable tmpdcay" URL="../step_13fb673d-08a1-4ad3-b7c5-282fdd6030df.html" target="_parent" tooltip="Following process step:\nCalculate average temperature year (three hundred and sixty five days) before the date, date included for each region, based on variables 'tmpdca', 'date' and 'region_id'." ]; parameter_a4c5a88e_5f12_4bb1_9be7_3f54c54ff4f6:e -> step_13fb673d_08a1_4ad3_b7c5_282fdd6030df:w [ minlen="2" ]; # following step step_51b90bb6_30b0_4e1c_8c0b_19b2a56e49c4 [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable tmpdcacm" URL="../step_51b90bb6-30b0-4e1c-8c0b-19b2a56e49c4.html" target="_parent" tooltip="Following process step:\nCompute target variable 'tmpdcacm' based on variables 'tmpdca', 'region_id' and 'date'. Calculate average temperature for each calendar month for each region." ]; parameter_a4c5a88e_5f12_4bb1_9be7_3f54c54ff4f6:e -> step_51b90bb6_30b0_4e1c_8c0b_19b2a56e49c4:w [ minlen="2" ]; # following step step_63d9f86f_b32b_4687_b753_662e9f56747f [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable tmpdcamb" URL="../step_63d9f86f-b32b-4687-b753-662e9f56747f.html" target="_parent" tooltip="Following process step:\nCompute target variable 'tmpdcamb' based on variables 'tmpdca', 'region_id' and 'date'. Calculate average temperature for each calendar month for each region, across the baseline period 1991 - 2020." ]; parameter_a4c5a88e_5f12_4bb1_9be7_3f54c54ff4f6:e -> step_63d9f86f_b32b_4687_b753_662e9f56747f:w [ minlen="2" ]; # following step step_d25d0d69_51d7_4e18_8eef_d7dc124a2a63 [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable tmp95pacmb" URL="../step_d25d0d69-51d7-4e18-8eef-d7dc124a2a63.html" target="_parent" tooltip="Following process step:\nCompute target variable 'tmp95pacmb' based on variable 'tmpdc', 'date', 'region_id'.and 'pop' Calculate 95 percentile values for each calendar month for each grid cell as an average of the 1991 - 2020 baseline period values. Temperature measured in Kelvin converted to degrees Celsius (°C) by subtracting 273.15. Calculate calendar month averages for each region as an average of 95 the percentil values for each calendar month for each grid for the baseline period 1991 - 2020, weighted by variable 'pop' that is based on global human settlements statistics." ]; parameter_a4c5a88e_5f12_4bb1_9be7_3f54c54ff4f6:e -> step_d25d0d69_51d7_4e18_8eef_d7dc124a2a63:w [ minlen="2" ]; # following step step_a56e71e4_f9e9_47d7_8c49_6625de7c6804 [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable tmpanod" URL="../step_a56e71e4-f9e9-47d7-8c49-6625de7c6804.html" target="_parent" tooltip="Following process step:\nCompute target variable 'tmpanod' based on variables 'tmpdca', 'tmpdcamb', 'region_id' and 'date'. Calculate 'tmpanod' as day average for each region, minus calendar month average base value 1991 - 2020 (tmpdca - tmpdcamb)." ]; parameter_a4c5a88e_5f12_4bb1_9be7_3f54c54ff4f6:e -> step_a56e71e4_f9e9_47d7_8c49_6625de7c6804:w [ minlen="2" ]; # following step step_2c3f42b4_1ed3_4b19_9799_f2e228a66c07 [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable tmpanocm" URL="../step_2c3f42b4-1ed3-4b19-9799-f2e228a66c07.html" target="_parent" tooltip="Following process step:\nCompute target variable 'tmpanocm' based on variables 'tmpdcacm', 'tmpdcamb', 'region_id' and 'date'. Calculate 'tmpanocm' as calendar month average for each region, minus calendar month average base value 1991 - 2020 (tmpdcacm - tmpdcamb)." ]; parameter_a4c5a88e_5f12_4bb1_9be7_3f54c54ff4f6:e -> step_2c3f42b4_1ed3_4b19_9799_f2e228a66c07:w [ minlen="2" ]; # following step step_5cfa2f2b_9b94_4e34_b64e_3b808f39e4c7 [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable paccta" URL="../step_5cfa2f2b-9b94-4e34-b64e-3b808f39e4c7.html" target="_parent" tooltip="Following process step:\nCompute target variable 'paccta' based on variable 'pac', 'region_id','date' and 'pop'. Calculate total precipitation by date in mm for each grid cell to be included in the data. The total precipitation over 24 hours is the sum of the individual total precipitation values for each hour. Precipitation measured in m converted to mm. Calculate total precipitation by date for each region as an average of the grid cell value, weighted by variable 'pop' that is based on global human settlements statistics." ]; parameter_a4c5a88e_5f12_4bb1_9be7_3f54c54ff4f6:e -> step_5cfa2f2b_9b94_4e34_b64e_3b808f39e4c7:w [ minlen="2" ]; # following step step_6a68be34_64d3_4a72_8847_4e0645f474c0 [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable pacctaw" URL="../step_6a68be34-64d3-4a72-8847-4e0645f474c0.html" target="_parent" tooltip="Following process step:\nCompute target variable 'pacctaw' based on variables 'paccta', 'date' and 'region_id'. Calculate average total precipitation for the week (seven days) before the date, date included, for each region." ]; parameter_a4c5a88e_5f12_4bb1_9be7_3f54c54ff4f6:e -> step_6a68be34_64d3_4a72_8847_4e0645f474c0:w [ minlen="2" ]; # following step step_b779a530_0e55_4b61_9c2d_7c9dc2017fb2 [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable pacctam" URL="../step_b779a530-0e55-4b61-9c2d-7c9dc2017fb2.html" target="_parent" tooltip="Following process step:\nCompute target variable 'pacctam' based on variables 'paccta', 'date' and 'region_id'. Calculate average total precipitation for the month (thirty days) before the date, date included, for each region." ]; parameter_a4c5a88e_5f12_4bb1_9be7_3f54c54ff4f6:e -> step_b779a530_0e55_4b61_9c2d_7c9dc2017fb2:w [ minlen="2" ]; # following step step_7f344be0_8be6_4c1b_91d2_c689bde5f31f [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable paccta3m" URL="../step_7f344be0-8be6-4c1b-91d2-c689bde5f31f.html" target="_parent" tooltip="Following process step:\nCompute target variable 'paccta3m' based on variables 'paccta', 'date' and 'region_id'. Calculate average total precipitation for the three months (ninty days) before the date, date included, for each region." ]; parameter_a4c5a88e_5f12_4bb1_9be7_3f54c54ff4f6:e -> step_7f344be0_8be6_4c1b_91d2_c689bde5f31f:w [ minlen="2" ]; # following step step_2d3eb36e_15b7_45e6_8f42_824956c550c2 [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable pacctay" URL="../step_2d3eb36e-15b7-45e6-8f42-824956c550c2.html" target="_parent" tooltip="Following process step:\nCompute target variable 'pacctay' based on variables 'paccta', 'date' and 'region_id'. Calculate average total precipitation for the year (three hundred and sixty five days) before the date, date included, for each region." ]; parameter_a4c5a88e_5f12_4bb1_9be7_3f54c54ff4f6:e -> step_2d3eb36e_15b7_45e6_8f42_824956c550c2:w [ minlen="2" ]; # following step step_f047699d_0c01_4289_89fd_bf8d01efb9b0 [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable pacctcm" URL="../step_f047699d-0c01-4289-89fd-bf8d01efb9b0.html" target="_parent" tooltip="Following process step:\nCompute target variable 'pacctcm' based on variables 'paccta', 'date' and 'region_id'. Calculate 'pacctcm' as an average of total precipitation date values for the calendar month." ]; parameter_a4c5a88e_5f12_4bb1_9be7_3f54c54ff4f6:e -> step_f047699d_0c01_4289_89fd_bf8d01efb9b0:w [ minlen="2" ]; # following step step_51b3843d_4f7b_4f2d_b2be_9e9a50c3e7b2 [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable pacctmb" URL="../step_51b3843d-4f7b-4f2d-b2be-9e9a50c3e7b2.html" target="_parent" tooltip="Following process step:\nCompute target variable 'pacctmb' based on variables 'pacctm', 'region_id' and 'date'.Calculate accumulated precipitation averages for each calendar month for each region over the baseline period 1991 to 2020." ]; parameter_a4c5a88e_5f12_4bb1_9be7_3f54c54ff4f6:e -> step_51b3843d_4f7b_4f2d_b2be_9e9a50c3e7b2:w [ minlen="2" ]; # following step step_e2decc61_8a29_49eb_96fc_c255b48598b0 [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable paccdcm" URL="../step_e2decc61-8a29-49eb-96fc-c255b48598b0.html" target="_parent" tooltip="Following process step:\nCompute target variable 'paccdcm' based on variables 'pacctcm', 'pacctmb', 'region_id' and 'date'.Compute variable for calendar month precipitation anomaly for each region as (current month/norml)*100. Using variables: (pacctcm/pacctmb)* 100" ]; parameter_a4c5a88e_5f12_4bb1_9be7_3f54c54ff4f6:e -> step_e2decc61_8a29_49eb_96fc_c255b48598b0:w [ minlen="2" ]; # following step step_032365cc_6b7f_49df_a8c6_2207f9475032 [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable iwg10mx" URL="../step_032365cc-6b7f-49df-a8c6-2207f9475032.html" target="_parent" tooltip="Following process step:\nCompute target variable 'iwg10mx' based on variables 'iwg10', 'region_id' and 'date'. Calculate maximum wind gust value pr. date for each grid cell. The maximum wind gust value pr. date for a grid cell within the region becomes the value of the target variable." ]; parameter_a4c5a88e_5f12_4bb1_9be7_3f54c54ff4f6:e -> step_032365cc_6b7f_49df_a8c6_2207f9475032:w [ minlen="2" ]; # following step step_c06776b1_81ea_4e7a_bc3b_b168a98b4984 [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable iwg10mxaw" URL="../step_c06776b1-81ea-4e7a-bc3b-b168a98b4984.html" target="_parent" tooltip="Following process step:\nCompute target variable 'iwg10mxaw' based on variables 'iwg10mx', 'region_id' and 'date'. Calculate the average maximum wind gust value for the week (seven days) before the date, date included, for each region." ]; parameter_a4c5a88e_5f12_4bb1_9be7_3f54c54ff4f6:e -> step_c06776b1_81ea_4e7a_bc3b_b168a98b4984:w [ minlen="2" ]; # following step step_0c31e2ac_b408_4b4f_80e5_8e2e813ce25c [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable iwg10mxam" URL="../step_0c31e2ac-b408-4b4f-80e5-8e2e813ce25c.html" target="_parent" tooltip="Following process step:\nCompute target variable 'iwg10mxam' based on variables 'iwg10mx', 'region_id' and 'date'. Calculate the average maximum wind gust value for the month (thirty days) before the date, date included, for each region." ]; parameter_a4c5a88e_5f12_4bb1_9be7_3f54c54ff4f6:e -> step_0c31e2ac_b408_4b4f_80e5_8e2e813ce25c:w [ minlen="2" ]; # following step step_52dcbefa_0633_44da_8cc2_ee42b535f3fd [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable iwg10mxa3m" URL="../step_52dcbefa-0633-44da-8cc2-ee42b535f3fd.html" target="_parent" tooltip="Following process step:\nCompute target variable 'iwg10mxa3m' based on variables 'iwg10mx', 'region_id' and 'date'. Calculate the average maximum wind gust value for the three months (ninty days) before the date, date included, for each region." ]; parameter_a4c5a88e_5f12_4bb1_9be7_3f54c54ff4f6:e -> step_52dcbefa_0633_44da_8cc2_ee42b535f3fd:w [ minlen="2" ]; # following step step_91e18b23_0e5e_42f5_9231_238c22f40274 [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable iwg10mxay" URL="../step_91e18b23-0e5e-42f5-9231-238c22f40274.html" target="_parent" tooltip="Following process step:\nCompute target variable 'iwg10mxay' based on variables 'iwg10mx', 'region_id' and 'date'. Calculate the average maximum wind gust value for the year (three hundred and sixty five days) before the date, date included, for each region." ]; parameter_a4c5a88e_5f12_4bb1_9be7_3f54c54ff4f6:e -> step_91e18b23_0e5e_42f5_9231_238c22f40274:w [ minlen="2" ]; # following step step_7b9e29e4_4a25_496d_9f28_8dca7c3e94d2 [ shape="rect" style="filled, rounded" width="2" height="0.075" fontcolor="white" fillcolor="#4363d8" fontsize="10pt" label="Create variable iwg10mxamb" URL="../step_7b9e29e4-4a25-496d-9f28-8dca7c3e94d2.html" target="_parent" tooltip="Following process step:\nCompute target variable 'iwg10mxamb' based on variables 'iwg10mx', 'region_id' and 'date'. Calculate the average maximum wind gust for each calendar month for each region, across the baseline period 1991 - 2020." ]; parameter_a4c5a88e_5f12_4bb1_9be7_3f54c54ff4f6:e -> step_7b9e29e4_4a25_496d_9f28_8dca7c3e94d2:w [ minlen="2" ]; }


Hint

Move the mouse cursor over a parameter to see more information. Click on a parameter or a related step to go to the corresponding page.

Legend:

digraph Diagram { graph [ stylesheet="../_static/custom.css" fontnames = "svg" # "... rock solid standards compliant SVG", see: https://graphviz.org/faq/font/#what-about-svg-fonts rankdir="LR" bgcolor="#eeeeee" size="5,10!" nodesep=0.15 tooltip=" " ]; node [ fontname="sans-serif" ]; Step [ width="3" label="Process step" tooltip=" " shape="rect" style="filled, rounded" fontcolor="white" fillcolor="#4363d8" ]; # input parameter InputParameter [ shape="rect" width="2" height="0.1" style="filled" label="Input parameter" tooltip=" " fillcolor="#ffe119" ]; InputParameter -> Step [ label="used by" ]; OutputParameter [ shape="rect" width="2" height="0.1" style="filled" label="Output parameter" tooltip=" " fillcolor="#dcbeff" ]; Step -> OutputParameter [ label="produces" ]; }