mattritchey commited on
Commit
1c139f7
·
1 Parent(s): 65544f7

Update pages/Hail.py

Browse files
Files changed (1) hide show
  1. pages/Hail.py +4 -4
pages/Hail.py CHANGED
@@ -29,7 +29,7 @@ import rioxarray
29
  import numpy as np
30
 
31
 
32
- @st.cache
33
  def geocode(address, buffer_size):
34
  try:
35
  address2 = address.replace(' ', '+').replace(',', '%2C')
@@ -51,7 +51,7 @@ def geocode(address, buffer_size):
51
  return gdf
52
 
53
 
54
- @st.cache
55
  def get_pngs(date):
56
  year, month, day = date[:4], date[4:6], date[6:]
57
  url = f'https://mrms.nssl.noaa.gov/qvs/product_viewer/local/render_multi_domain_product_layer.php?mode=run&cpp_exec_dir=/home/metop/web/specific/opv/&web_resources_dir=/var/www/html/qvs/product_viewer/resources/&prod_root={prod_root}&qperate_pal_option=0&qpe_pal_option=0&year={year}&month={month}&day={day}&hour={hour}&minute={minute}&clon={lon}&clat={lat}&zoom={zoom}&width=920&height=630'
@@ -64,14 +64,14 @@ def get_pngs(date):
64
  return data2_df2.reset_index()
65
 
66
 
67
- @st.cache
68
  def get_pngs_parallel(dates):
69
  results1 = Parallel(n_jobs=32, prefer="threads")(
70
  delayed(get_pngs)(i) for i in dates)
71
  return results1
72
 
73
 
74
- @st.cache
75
  def png_data(date):
76
  year, month, day = date[:4], date[4:6], date[6:]
77
  url = f'https://mrms.nssl.noaa.gov/qvs/product_viewer/local/render_multi_domain_product_layer.php?mode=run&cpp_exec_dir=/home/metop/web/specific/opv/&web_resources_dir=/var/www/html/qvs/product_viewer/resources/&prod_root={prod_root}&qperate_pal_option=0&qpe_pal_option=0&year={year}&month={month}&day={day}&hour={hour}&minute={minute}&clon={lon}&clat={lat}&zoom={zoom}&width=920&height=630'
 
29
  import numpy as np
30
 
31
 
32
+ @st.cache(allow_output_mutation=True)
33
  def geocode(address, buffer_size):
34
  try:
35
  address2 = address.replace(' ', '+').replace(',', '%2C')
 
51
  return gdf
52
 
53
 
54
+ @st.cache(allow_output_mutation=True)
55
  def get_pngs(date):
56
  year, month, day = date[:4], date[4:6], date[6:]
57
  url = f'https://mrms.nssl.noaa.gov/qvs/product_viewer/local/render_multi_domain_product_layer.php?mode=run&cpp_exec_dir=/home/metop/web/specific/opv/&web_resources_dir=/var/www/html/qvs/product_viewer/resources/&prod_root={prod_root}&qperate_pal_option=0&qpe_pal_option=0&year={year}&month={month}&day={day}&hour={hour}&minute={minute}&clon={lon}&clat={lat}&zoom={zoom}&width=920&height=630'
 
64
  return data2_df2.reset_index()
65
 
66
 
67
+ @st.cache(allow_output_mutation=True)
68
  def get_pngs_parallel(dates):
69
  results1 = Parallel(n_jobs=32, prefer="threads")(
70
  delayed(get_pngs)(i) for i in dates)
71
  return results1
72
 
73
 
74
+ @st.cache(allow_output_mutation=True)
75
  def png_data(date):
76
  year, month, day = date[:4], date[4:6], date[6:]
77
  url = f'https://mrms.nssl.noaa.gov/qvs/product_viewer/local/render_multi_domain_product_layer.php?mode=run&cpp_exec_dir=/home/metop/web/specific/opv/&web_resources_dir=/var/www/html/qvs/product_viewer/resources/&prod_root={prod_root}&qperate_pal_option=0&qpe_pal_option=0&year={year}&month={month}&day={day}&hour={hour}&minute={minute}&clon={lon}&clat={lat}&zoom={zoom}&width=920&height=630'