Giter Site home page Giter Site logo

dsgan's Introduction

version PyTorch license DOI

About

This is the offical implementation of the model, a conditinal GAN for dynamic precipitation downscaling, proposed in our paper Fast and accurate learned multiresolution dynamical downscaling for precipitation

Model and Implementation

As discussed in the manuscript, we evluated 5 different model archtecture and concluded that the Encoded-CGAN performed the best in different cases under different metric. So, here we only opensourced the Encoded-CGAN. The architecture of the generator is shown below. We can consider open other implemnetaions upon request.

Generator Model Arch

We need to note that, the main purpose of this repo is to show all implementation details of our model proposed in the paper. This implementation is not fine-tuned to support new dataset straightforwardly, i.e., it is NOT an out-of-box solution for any downscaling. Depends on your dataset, you may need to handcraft our hard-coded piece to make it work with yours.

Dataset

If you want to reproduce our results, please download the dataset from http://doi.org/10.5281/zenodo.4298978 and unzip them (WRF_50km_vars-mask-clip0p05-99p5.hdf5 and WRF_precip_2005_12km-mask-clip0p05-99p5.hdf5) to the dataset folder here.

If you want to try it using your own dataset, you can either edit the data.py to load dataset of your format, or prepare your h5 dataset using the same dataset name as we used in the data.py. We need to note that, the main purpose of this repo is to show all implementation details of our model proposed in the paper. This implementation is not fine-tuned to support new dataset straightforwardly, i.e., it is not an out-of-box solution for any downscaling. Depends on your dataset, you may need to handcraft our hard-coded piece to make it work with yours.

Basically, you need to prepare your high resolution precipitation as (omit the dimension size):

HDF5 "WRF_precip_2005_12km-mask-clip0p05-99p5.hdf5" {
GROUP "/" {
   DATASET "rain" {
      DATATYPE  H5T_IEEE_F32LE
      DATASPACE  SIMPLE { ( 2911, 256, 512 ) / ( 2911, 256, 512 ) }
   }
}
}

and your low resolution precipitation and variables as (omit the dimension size):

HDF5 "WRF_50km_vars-mask-clip0p05-99p5.hdf5" {
GROUP "/" {
   DATASET "IWV" {
      DATATYPE  H5T_IEEE_F32LE
      DATASPACE  SIMPLE { ( 2911, 64, 128 ) / ( 2911, 64, 128 ) }
   }
   DATASET "RAIN" {
      DATATYPE  H5T_IEEE_F32LE
      DATASPACE  SIMPLE { ( 2911, 64, 128 ) / ( 2911, 64, 128 ) }
   }
   DATASET "SLP" {
      DATATYPE  H5T_IEEE_F32LE
      DATASPACE  SIMPLE { ( 2911, 64, 128 ) / ( 2911, 64, 128 ) }
   }
   DATASET "T2" {
      DATATYPE  H5T_IEEE_F32LE
      DATASPACE  SIMPLE { ( 2911, 64, 128 ) / ( 2911, 64, 128 ) }
   }
}
}

dsgan's People

Contributors

lzhengchun avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.