---
title: "Downscaling Numerical Weather Models With GANs (My CI 2019 Paper)"
canonical: "/2020/11/17/ci-2019-paper-blog-post/"
date: "2020-11-17"
author: "Alok Singh"
tags: []
---


I saw some people on Twitter recently talking about work that's similar
to stuff I'd done last year (\~April 2019). For a moment, I felt
annoyance that I wasn't cited, but then that quote about standing on
each other's shoulders and not each others' toes came to mind, so I
decided to blog about the paper since my marketing clearly wasn't good
enough.

[Paper link](https://par.nsf.gov/servlets/purl/10137368)

## Background

I did this work while at Terrafuse, and the basic idea is to do
super-resolution, but for the weather.

My first pass at it was to do the simplest possible thing and just
pretend it's an image problem.

## Setup

Get some pics of weather and super-res them.

## The interesting bit: Confusion about Results

Here's a sample of the results: It goes ground truth vs GAN vs SR-CNN vs
bicubic upsampling. There's also a zoom-in of the red region.

![](/assets/ci2019/compare.png)

So the GAN *looks* pretty good.

But it does worse on metrics like MSE and SSIM.

The GAN images have a sharpness to them that the other predictions do
not have, so I looked at their [power spectral
density](https://en.wikipedia.org/wiki/Spectral_density#Power_spectral_density).

![](/assets/ci2019/psd.png)

The fit is so close that plotting it basically overlaid 2 curves on each
other and I wasted 2 days trying to debug what I thought was an issue in
`matplotlib`.

Later experiments showed that GANs match spectral density and other
statistics of the data very quickly, within 2 epochs. But to *also* get
good image quality takes almost a 100. I had a few ideas about how to
use this, that made it into another paper.
