{"id":17985445,"url":"https://github.com/jleinonen/geogan","last_synced_at":"2025-06-19T10:34:42.929Z","repository":{"id":73875722,"uuid":"194667511","full_name":"jleinonen/geogan","owner":"jleinonen","description":"Style-based GAN for geophysical fields","archived":false,"fork":false,"pushed_at":"2020-05-07T23:42:36.000Z","size":25,"stargazers_count":13,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T10:11:56.226Z","etag":null,"topics":["atmospheric-science","climate-science","deep-learning","generative-adversarial-network","machine-learning"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jleinonen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-07-01T12:21:27.000Z","updated_at":"2024-10-13T15:34:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"205de587-5cd9-4f47-b81f-bc5c409efa66","html_url":"https://github.com/jleinonen/geogan","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"00bb4561a5371a9c0d2d83478027e6985e462ce3"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jleinonen/geogan","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jleinonen%2Fgeogan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jleinonen%2Fgeogan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jleinonen%2Fgeogan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jleinonen%2Fgeogan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jleinonen","download_url":"https://codeload.github.com/jleinonen/geogan/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jleinonen%2Fgeogan/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260733135,"owners_count":23054203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["atmospheric-science","climate-science","deep-learning","generative-adversarial-network","machine-learning"],"created_at":"2024-10-29T18:25:10.760Z","updated_at":"2025-06-19T10:34:37.913Z","avatar_url":"https://github.com/jleinonen.png","language":"Python","readme":"# Style-based GAN for geophysical fields\n\nThis is a reference implementation of a style-based generative adversarial network (GAN) designed to generate geophysical fields. This code supports a paper published in the [Proceedings of the 9th International Workshop on Climate Informatics: CI 2019](http://dx.doi.org/10.5065/y82j-f154). The paper was selected for the [Best Paper Award](https://sites.google.com/view/climateinformatics2019/accepted-submissions) at the meeting.\n\nYou might also be interested in [this paper](https://doi.org/10.1029/2019GL082532) ([code](../../../cloudsat-gan/)) or in [my post on GANs in the atmospheric sciences](https://jleinonen.github.io/2019/06/06/gans-atmos.html).\n\n## Obtaining the data\n\nDownload the data from https://doi.org/10.7910/DVN/ZDWWMG and follow the instructions there.\n\n## Obtaining the trained network\n\nGet the trained weights from [this release](../../releases/download/v0.1-data/mch_gan.zip). Unzip the file, preferably into the `models` directory.\n\n## Running the code\n\nFor training, you'll want a machine with a GPU and around 32 GB of memory (the training procedure for the radar dataset loads the entire dataset into memory). Running the pre-trained model should work just fine on a CPU.\n\nYou may want to work with the code interactively; in this case, just start a Python shell in the `geogan` directory.\n\nIf you want the simplest way to run the code, the following two options are available. You may also want to look at what `main.py` does in order to get an idea of how the training flow works.\n\n### Producing plots\n\nYou can replicate the plots in the paper by going to the `geogan` directory and using\n```\npython main.py plot --data_file=\u003cdata_file\u003e --weights_root=\u003cweights_root\u003e\n```\nwhere `\u003cdata_file\u003e` is the path to the training data and `\u003cweights_root\u003e` is the path and prefix of the stored weights. For example, if you unzipped the pre-trained weights to the `models` directory, you should use `--weights_root=../models/mch_gan`.\n\n### Training the model\n\nRun the following to start the training:\n```\npython main.py train --data_file=\u003cdata_file\u003e --weights_root=\u003cweights_root\u003e\n```\nwhere the parameters are as above. This will run the training loop until terminated (with e.g. ctrl-C) and save the weights after each 100 batches (overwriting the original weights, so save the weights under a different name if you want to avoid this).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjleinonen%2Fgeogan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjleinonen%2Fgeogan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjleinonen%2Fgeogan/lists"}