qq1990 commited on
Commit
4df22b4
1 Parent(s): 772ef44
Files changed (2) hide show
  1. app.py +10 -1
  2. aurora_utils.py +68 -3
app.py CHANGED
@@ -56,7 +56,7 @@ with header_col2:
56
  st.markdown("### Select a Model")
57
  selected_model = st.selectbox(
58
  "",
59
- options=["Pangu-Weather", "FengWu", "Aurora", "Climax", "Prithvi", "LSTM"],
60
  index=0,
61
  key="model_selector",
62
  help="Select the model you want to use."
@@ -74,6 +74,15 @@ with left_col:
74
  if selected_model == "Prithvi":
75
  (config, uploaded_surface_files, uploaded_vertical_files,
76
  clim_surf_path, clim_vert_path, config_path, weights_path) = prithvi_config_ui()
 
 
 
 
 
 
 
 
 
77
  elif selected_model == "Aurora":
78
  uploaded_files = aurora_config_ui()
79
  elif selected_model == "Pangu-Weather":
 
56
  st.markdown("### Select a Model")
57
  selected_model = st.selectbox(
58
  "",
59
+ options=["Pangu-Weather", "FengWu", "Aurora", "Climax", "Prithvi", "GEOS-Specific-LSTM", "GEOS-Finetuned-Climax"],
60
  index=0,
61
  key="model_selector",
62
  help="Select the model you want to use."
 
74
  if selected_model == "Prithvi":
75
  (config, uploaded_surface_files, uploaded_vertical_files,
76
  clim_surf_path, clim_vert_path, config_path, weights_path) = prithvi_config_ui()
77
+ elif selected_model == "Climax":
78
+ st.info("Climax model is not yet available.")
79
+ st.stop()
80
+ elif selected_model == "GEOS-Specific-LSTM":
81
+ st.info("GEOS-Specific-LSTM model is not yet available.")
82
+ st.stop()
83
+ elif selected_model == "GEOS-Finetuned-Climax":
84
+ st.info("GEOS-Finetuned-Climax model is not yet available.")
85
+ st.stop()
86
  elif selected_model == "Aurora":
87
  uploaded_files = aurora_config_ui()
88
  elif selected_model == "Pangu-Weather":
aurora_utils.py CHANGED
@@ -5,14 +5,79 @@ import numpy as np
5
  from datetime import datetime
6
 
7
  def aurora_config_ui():
8
- st.subheader("Aurora Model Data Upload")
9
- st.markdown("### Drag and Drop Your Data Files Here")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  uploaded_files = st.file_uploader(
11
- "Upload Data Files for Aurora",
12
  accept_multiple_files=True,
13
  key="aurora_uploader",
14
  type=["nc", "netcdf", "nc4"]
15
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  return uploaded_files
17
 
18
  def prepare_aurora_batch(ds):
 
5
  from datetime import datetime
6
 
7
  def aurora_config_ui():
8
+ st.subheader("Aurora Model Data Input")
9
+
10
+ # Detailed data description section
11
+ st.markdown("""
12
+ **Available Models & Usage:**
13
+
14
+ Aurora provides several pretrained and fine-tuned models at 0.25° and 0.1° resolutions.
15
+ Models and weights are available through the HuggingFace repository: [microsoft/aurora](https://huggingface.co/microsoft/aurora).
16
+
17
+ **Aurora 0.25° Pretrained**
18
+ - Trained on a variety of data.
19
+ - Suitable if no fine-tuned version exists for your dataset or to fine-tune Aurora yourself.
20
+ - Use if your dataset is ERA5 at 0.25° resolution (721x1440).
21
+
22
+ **Aurora 0.25° Pretrained Small**
23
+ - A smaller version of the pretrained model for debugging purposes.
24
+
25
+ **Aurora 0.25° Fine-Tuned**
26
+ - Fine-tuned on IFS HRES T0.
27
+ - Best performance at 0.25° but should only be used for IFS HRES T0 data.
28
+ - May not give optimal results for other datasets.
29
+
30
+ **Aurora 0.1° Fine-Tuned**
31
+ - For IFS HRES T0 at 0.1° resolution (1801x3600).
32
+ - Best performing at 0.1° resolution.
33
+ - Data must match IFS HRES T0 conditions.
34
+
35
+ **Required Variables & Pressure Levels:**
36
+
37
+ For all Aurora models at these resolutions, the following inputs are required:
38
+
39
+ - **Surface-level variables:** 2t, 10u, 10v, msl
40
+ - **Static variables:** lsm, slt, z
41
+ - **Atmospheric variables:** t, u, v, q, z
42
+ - **Pressure levels (hPa):** 50, 100, 150, 200, 250, 300, 400, 500, 600, 700, 850, 925, 1000
43
+
44
+ Latitude range should decrease from 90°N to -90°S, and longitude range from 0° to 360° (excluding 360°). Data should be in single precision float32.
45
+
46
+
47
+ **Data Format (Batch):**
48
+ Data should be provided as a `aurora.Batch` object:
49
+ - `surf_vars` dict with shape (b, t, h, w)
50
+ - `static_vars` dict with shape (h, w)
51
+ - `atmos_vars` dict with shape (b, t, c, h, w)
52
+ - `metadata` containing lat, lon, time, and atmos_levels.
53
+
54
+ For detailed instructions and examples, refer to the official Aurora documentation and code repository.
55
+ """)
56
+
57
+ # File uploader for Aurora data
58
+ st.markdown("### Upload Your Input Data Files for Aurora")
59
+ st.markdown("Upload the NetCDF files (e.g., `.nc`, `.netcdf`, `.nc4`) containing the required variables.")
60
  uploaded_files = st.file_uploader(
61
+ "Drag and drop or select multiple .nc files",
62
  accept_multiple_files=True,
63
  key="aurora_uploader",
64
  type=["nc", "netcdf", "nc4"]
65
  )
66
+
67
+ st.markdown("---")
68
+ st.markdown("### References & Resources")
69
+ st.markdown("""
70
+ - **HuggingFace Repository:** [microsoft/aurora](https://huggingface.co/microsoft/aurora)
71
+ - **Model Usage Examples:**
72
+ ```python
73
+ from aurora import Aurora
74
+
75
+ model = Aurora()
76
+ model.load_checkpoint("microsoft/aurora", "aurora-0.25-pretrained.ckpt")
77
+ ```
78
+ - **API & Documentation:** Refer to the Aurora official GitHub and HuggingFace pages for detailed instructions.
79
+ """)
80
+
81
  return uploaded_files
82
 
83
  def prepare_aurora_batch(ds):