{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/latent-diffusion-models-for-generative","title":"Latent diffusion models for generative precipitation nowcasting with accurate uncertainty quantification","arxiv_id":"2304.12891","date":"2023-04-25","proceeding":null,"authors":["Jussi Leinonen","Ulrich Hamann","Daniele Nerini","Urs Germann","Gabriele Franch"],"abstract":"Diffusion models have been widely adopted in image generation, producing higher-quality and more diverse samples than generative adversarial networks (GANs). We introduce a latent diffusion model (LDM) for precipitation nowcasting - short-term forecasting based on the latest observational data. The LDM is more stable and requires less computation to train than GANs, albeit with more computationally expensive generation. We benchmark it against the GAN-based Deep Generative Models of Rainfall (DGMR) and a statistical model, PySTEPS. The LDM produces more accurate precipitation predictions, while the comparisons are more mixed when predicting whether the precipitation exceeds predefined thresholds. The clearest advantage of the LDM is that it generates more diverse predictions than DGMR or PySTEPS. Rank distribution tests indicate that the distribution of samples from the LDM accurately reflects the uncertainty of the predictions. Thus, LDMs are promising for any applications where uncertainty quantification is important, such as weather and climate.","url_abs":"https://arxiv.org/abs/2304.12891v1","url_pdf":"https://arxiv.org/pdf/2304.12891v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"latent-diffusion-models-for-generative","repo_url":"https://github.com/meteoswiss/ldcast","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"image-generation","task_name":"Image Generation"},{"task_slug":"uncertainty-quantification","task_name":"Uncertainty Quantification"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"},{"method_slug":"latent-diffusion-model","method_name":"Latent Diffusion Model"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2304.12891","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2304.12891"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/meteoswiss/ldcast","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"unverified":23},"by_repo_kind":{"official":{"samples":23,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"db1e29d0f75ef2ae","entry":"activation","repo":"meteoswiss/ldcast","repo_kind":"official","path":"ldcast/models/utils.py","file_url":"https://github.com/meteoswiss/ldcast/blob/HEAD/ldcast/models/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"db1e29d0f75ef2ae"}},{"code_sha256_prefix":"ebcc8aa2f3792088","entry":"bin_classify_patches","repo":"meteoswiss/ldcast","repo_kind":"official","path":"ldcast/features/sampling.py","file_url":"https://github.com/meteoswiss/ldcast/blob/HEAD/ldcast/features/sampling.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ebcc8aa2f3792088"}},{"code_sha256_prefix":"f2263dfddca0d1e7","entry":"confusion_matrix","repo":"meteoswiss/ldcast","repo_kind":"official","path":"ldcast/analysis/confmatrix.py","file_url":"https://github.com/meteoswiss/ldcast/blob/HEAD/ldcast/analysis/confmatrix.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f2263dfddca0d1e7"}},{"code_sha256_prefix":"cbfb31bff0aefba5","entry":"confusion_matrix_thresholds","repo":"meteoswiss/ldcast","repo_kind":"official","path":"ldcast/analysis/confmatrix.py","file_url":"https://github.com/meteoswiss/ldcast/blob/HEAD/ldcast/analysis/confmatrix.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"cbfb31bff0aefba5"}},{"code_sha256_prefix":"76b21856146ac180","entry":"confusion_matrix_thresholds_leadtime","repo":"meteoswiss/ldcast","repo_kind":"official","path":"ldcast/analysis/confmatrix.py","file_url":"https://github.com/meteoswiss/ldcast/blob/HEAD/ldcast/analysis/confmatrix.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"76b21856146ac180"}},{"code_sha256_prefix":"cf2cd534394d8503","entry":"convert_var_for_saving","repo":"meteoswiss/ldcast","repo_kind":"official","path":"ldcast/features/io.py","file_url":"https://github.com/meteoswiss/ldcast/blob/HEAD/ldcast/features/io.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"cf2cd534394d8503"}},{"code_sha256_prefix":"75943c22120aebe7","entry":"crps_ensemble","repo":"meteoswiss/ldcast","repo_kind":"official","path":"ldcast/analysis/crps.py","file_url":"https://github.com/meteoswiss/ldcast/blob/HEAD/ldcast/analysis/crps.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"75943c22120aebe7"}},{"code_sha256_prefix":"aa6dea747c932747","entry":"crps_ensemble_multiscale","repo":"meteoswiss/ldcast","repo_kind":"official","path":"ldcast/analysis/crps.py","file_url":"https://github.com/meteoswiss/ldcast/blob/HEAD/ldcast/analysis/crps.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"aa6dea747c932747"}},{"code_sha256_prefix":"7f03dc080c1b06b0","entry":"decode_saved_var_to_rainrate","repo":"meteoswiss/ldcast","repo_kind":"official","path":"ldcast/features/io.py","file_url":"https://github.com/meteoswiss/ldcast/blob/HEAD/ldcast/features/io.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7f03dc080c1b06b0"}},{"code_sha256_prefix":"174a827fede88455","entry":"ensemble_nll_normal","repo":"meteoswiss/ldcast","repo_kind":"official","path":"ldcast/models/distributions.py","file_url":"https://github.com/meteoswiss/ldcast/blob/HEAD/ldcast/models/distributions.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"174a827fede88455"}},{"code_sha256_prefix":"c566b4fa04d9a567","entry":"frac_from_file","repo":"meteoswiss/ldcast","repo_kind":"official","path":"ldcast/analysis/fss.py","file_url":"https://github.com/meteoswiss/ldcast/blob/HEAD/ldcast/analysis/fss.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c566b4fa04d9a567"}},{"code_sha256_prefix":"ccc9d5748608a1a1","entry":"fractions_ensemble","repo":"meteoswiss/ldcast","repo_kind":"official","path":"ldcast/analysis/fss.py","file_url":"https://github.com/meteoswiss/ldcast/blob/HEAD/ldcast/analysis/fss.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ccc9d5748608a1a1"}},{"code_sha256_prefix":"78380992e5f30b16","entry":"get_patches","repo":"meteoswiss/ldcast","repo_kind":"official","path":"ldcast/features/patches.py","file_url":"https://github.com/meteoswiss/ldcast/blob/HEAD/ldcast/features/patches.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"78380992e5f30b16"}},{"code_sha256_prefix":"42439dd27eea6c3b","entry":"hist_from_file","repo":"meteoswiss/ldcast","repo_kind":"official","path":"ldcast/analysis/histogram.py","file_url":"https://github.com/meteoswiss/ldcast/blob/HEAD/ldcast/analysis/histogram.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"42439dd27eea6c3b"}},{"code_sha256_prefix":"ac175e372929cf52","entry":"histogram","repo":"meteoswiss/ldcast","repo_kind":"official","path":"ldcast/analysis/histogram.py","file_url":"https://github.com/meteoswiss/ldcast/blob/HEAD/ldcast/analysis/histogram.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ac175e372929cf52"}},{"code_sha256_prefix":"9bc4f280671d3d7d","entry":"indices_with_complete_sample","repo":"meteoswiss/ldcast","repo_kind":"official","path":"ldcast/features/sampling.py","file_url":"https://github.com/meteoswiss/ldcast/blob/HEAD/ldcast/features/sampling.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9bc4f280671d3d7d"}},{"code_sha256_prefix":"f2494184413c3b19","entry":"kl_from_standard_normal","repo":"meteoswiss/ldcast","repo_kind":"official","path":"ldcast/models/distributions.py","file_url":"https://github.com/meteoswiss/ldcast/blob/HEAD/ldcast/models/distributions.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f2494184413c3b19"}},{"code_sha256_prefix":"9c2597fbddd2688d","entry":"normalization","repo":"meteoswiss/ldcast","repo_kind":"official","path":"ldcast/models/utils.py","file_url":"https://github.com/meteoswiss/ldcast/blob/HEAD/ldcast/models/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9c2597fbddd2688d"}},{"code_sha256_prefix":"339d89795e411b17","entry":"patch_locations","repo":"meteoswiss/ldcast","repo_kind":"official","path":"ldcast/features/patches.py","file_url":"https://github.com/meteoswiss/ldcast/blob/HEAD/ldcast/features/patches.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"339d89795e411b17"}},{"code_sha256_prefix":"0fdb75e5730ec729","entry":"rank_distribution","repo":"meteoswiss/ldcast","repo_kind":"official","path":"ldcast/analysis/rank.py","file_url":"https://github.com/meteoswiss/ldcast/blob/HEAD/ldcast/analysis/rank.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0fdb75e5730ec729"}},{"code_sha256_prefix":"2501a7f14e03e0b6","entry":"ranks_ensemble","repo":"meteoswiss/ldcast","repo_kind":"official","path":"ldcast/analysis/rank.py","file_url":"https://github.com/meteoswiss/ldcast/blob/HEAD/ldcast/analysis/rank.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2501a7f14e03e0b6"}},{"code_sha256_prefix":"11e52746c9a0795a","entry":"ranks_multiscale","repo":"meteoswiss/ldcast","repo_kind":"official","path":"ldcast/analysis/rank.py","file_url":"https://github.com/meteoswiss/ldcast/blob/HEAD/ldcast/analysis/rank.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"11e52746c9a0795a"}},{"code_sha256_prefix":"baeb617f027ac19c","entry":"sample_from_standard_normal","repo":"meteoswiss/ldcast","repo_kind":"official","path":"ldcast/models/distributions.py","file_url":"https://github.com/meteoswiss/ldcast/blob/HEAD/ldcast/models/distributions.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"baeb617f027ac19c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}