Spaces:
Runtime error
Runtime error
roll back
Browse filesFiles changed (2)
- app.py+10-1
- aurora_utils.py+68-3
55 unmodified lines5657585960616211 unmodified lines74757677787955 unmodified linesst.markdown("### Select a Model")selected_model = st.selectbox("",options=["Pangu-Weather", "FengWu", "Aurora", "Climax", "Prithvi", "LSTM"],index=0,key="model_selector",help="Select the model you want to use."11 unmodified linesif selected_model == "Prithvi":(config, uploaded_surface_files, uploaded_vertical_files,clim_surf_path, clim_vert_path, config_path, weights_path) = prithvi_config_ui()elif selected_model == "Aurora":uploaded_files = aurora_config_ui()elif selected_model == "Pangu-Weather":55 unmodified lines5657585960616211 unmodified lines74757677787980818283848586878855 unmodified linesst.markdown("### Select a Model")selected_model = st.selectbox("",options=["Pangu-Weather", "FengWu", "Aurora", "Climax", "Prithvi", "GEOS-Specific-LSTM", "GEOS-Finetuned-Climax"],index=0,key="model_selector",help="Select the model you want to use."11 unmodified linesif selected_model == "Prithvi":(config, uploaded_surface_files, uploaded_vertical_files,clim_surf_path, clim_vert_path, config_path, weights_path) = prithvi_config_ui()elif selected_model == "Climax":st.info("Climax model is not yet available.")st.stop()elif selected_model == "GEOS-Specific-LSTM":st.info("GEOS-Specific-LSTM model is not yet available.")st.stop()elif selected_model == "GEOS-Finetuned-Climax":st.info("GEOS-Finetuned-Climax model is not yet available.")st.stop()elif selected_model == "Aurora":uploaded_files = aurora_config_ui()elif selected_model == "Pangu-Weather":
4 unmodified lines567891011121314151617184 unmodified linesfrom datetime import datetimedef aurora_config_ui():st.subheader("Aurora Model Data Upload")st.markdown("### Drag and Drop Your Data Files Here")uploaded_files = st.file_uploader("Upload Data Files for Aurora",accept_multiple_files=True,key="aurora_uploader",type=["nc", "netcdf", "nc4"])return uploaded_filesdef prepare_aurora_batch(ds):4 unmodified lines5678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182834 unmodified linesfrom datetime import datetimedef aurora_config_ui():st.subheader("Aurora Model Data Input")# Detailed data description sectionst.markdown("""**Available Models & Usage:**Aurora provides several pretrained and fine-tuned models at 0.25° and 0.1° resolutions.Models and weights are available through the HuggingFace repository: [microsoft/aurora](https://huggingface.co/microsoft/aurora).**Aurora 0.25° Pretrained**- Trained on a variety of data.- Suitable if no fine-tuned version exists for your dataset or to fine-tune Aurora yourself.- Use if your dataset is ERA5 at 0.25° resolution (721x1440).**Aurora 0.25° Pretrained Small**- A smaller version of the pretrained model for debugging purposes.**Aurora 0.25° Fine-Tuned**- Fine-tuned on IFS HRES T0.- Best performance at 0.25° but should only be used for IFS HRES T0 data.- May not give optimal results for other datasets.**Aurora 0.1° Fine-Tuned**- For IFS HRES T0 at 0.1° resolution (1801x3600).- Best performing at 0.1° resolution.- Data must match IFS HRES T0 conditions.**Required Variables & Pressure Levels:**For all Aurora models at these resolutions, the following inputs are required:- **Surface-level variables:** 2t, 10u, 10v, msl- **Static variables:** lsm, slt, z- **Atmospheric variables:** t, u, v, q, z- **Pressure levels (hPa):** 50, 100, 150, 200, 250, 300, 400, 500, 600, 700, 850, 925, 1000Latitude 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.**Data Format (Batch):**Data should be provided as a `aurora.Batch` object:- `surf_vars` dict with shape (b, t, h, w)- `static_vars` dict with shape (h, w)- `atmos_vars` dict with shape (b, t, c, h, w)- `metadata` containing lat, lon, time, and atmos_levels.For detailed instructions and examples, refer to the official Aurora documentation and code repository.""")# File uploader for Aurora datast.markdown("### Upload Your Input Data Files for Aurora")st.markdown("Upload the NetCDF files (e.g., `.nc`, `.netcdf`, `.nc4`) containing the required variables.")uploaded_files = st.file_uploader("Drag and drop or select multiple .nc files",accept_multiple_files=True,key="aurora_uploader",type=["nc", "netcdf", "nc4"])st.markdown("---")st.markdown("### References & Resources")st.markdown("""- **HuggingFace Repository:** [microsoft/aurora](https://huggingface.co/microsoft/aurora)- **Model Usage Examples:**```pythonfrom aurora import Auroramodel = Aurora()model.load_checkpoint("microsoft/aurora", "aurora-0.25-pretrained.ckpt")```- **API & Documentation:** Refer to the Aurora official GitHub and HuggingFace pages for detailed instructions.""")return uploaded_filesdef prepare_aurora_batch(ds):
app.py+10-1
aurora_utils.py+68-3