Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: joss.theoj.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.4%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Basic Info
  • Host: GitHub
  • Owner: manmeet3591
  • License: mit
  • Language: Jupyter Notebook
  • Default Branch: main
  • Size: 7.46 MB
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 2
  • Open Issues: 0
  • Releases: 4
Created 9 months ago · Last pushed 8 months ago
Metadata Files
Readme License Citation

README.md

xdownscale

xdownscale logo

Project Status: Active PyPI version License: MIT PyPI Downloads

xdownscale is a Python package for super-resolution downscaling of gridded datasets using deep learning. It supports a wide range of applications, including satellite observations, reanalysis data, and climate model outputs. Built with PyTorch and xarray, it enables efficient mapping from coarse-to-fine-resolution grids in just a few lines of code.


Installation

To install from PyPI, we recommend using a conda environment

bash conda create -n xdownscale python=3.10 conda activate xdownscale conda install -c conda-forge pytorch cudatoolkit=11.8 cudnn pip install xdownscale

To install from source:

bash git clone https://github.com/manmeet3591/xdownscale.git cd xdownscale pip install .

Or install from a zipped archive:

bash unzip xdownscale_package.zip cd xdownscale pip install .


Usage

```python import xarray as xr import numpy as np from xdownscale import Downscaler

Create dummy coarse-resolution input and fine-resolution target

x = np.random.rand(128, 128).astype(np.float32) y = (x + np.random.normal(0, 0.01, size=x.shape)).astype(np.float32)

inputda = xr.DataArray(x, dims=["lat", "lon"]) targetda = xr.DataArray(y, dims=["lat", "long"])

Initialize the downscaler

ds = Downscaler(inputda, targetda, model_name="fsrcnn")

Predict high-resolution output

result = ds.predict(input_da) result.plot() ```

Available models:
srcnn, fsrcnn, lapsr, carnm, falsra, falsrb, srresnet, carn, oisrrk2, mdsr, san, rcan, unet, dlgsanet, dpmn, safmn, dpt, distgssr, swin


Description

xdownscale performs patch-wise training using PyTorch’s DataLoader and returns predictions as xarray.DataArray objects. It is designed to work with any gridded dataset and provides a flexible interface for model selection, training, and inference.


Sample Data

Sample input and target data are provided in the data/ directory for testing and demonstrations.


Development

To extend or customize the package:

  • Modify model architectures in xdownscale/model.py
  • Add training logic in xdownscale/core.py
  • Customize patch extraction and utilities in xdownscale/utils.py

License

This project is licensed under the MIT License.

Owner

  • Name: Manmeet Singh
  • Login: manmeet3591
  • Kind: user
  • Location: Pune, India
  • Company: Indian Institute of Tropical Meteorology

Citation (citation.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
title: "xdownscale: A Deep Learning Toolkit for Spatial Resolution Enhancement"
authors:
  - family-names: Singh
    given-names: Manmeet
    affiliation: The University of Texas at Austin
    orcid: https://orcid.org/0000-0000-0000-0000
  - family-names: Sudharsan
    given-names: Naveen
    affiliation: The University of Texas at Austin
    orcid: https://orcid.org/0000-0002-1328-110X
  - family-names: Srivastava
    given-names: Amit Kumar
    affiliation: Leibniz Centre for Agricultural Landscape Research (ZALF), Müncheberg, Germany
    orcid: https://orcid.org/0000-0001-8219-4854
date-released: 2025-06-06
version: "1.0.0"
doi: 10.21105/joss.XXXXXXX
license: MIT
repository-code: https://github.com/manmeet3591/xdownscale

GitHub Events

Total
  • Release event: 3
  • Member event: 1
  • Push event: 93
  • Pull request event: 11
  • Fork event: 1
  • Create event: 5
Last Year
  • Release event: 3
  • Member event: 1
  • Push event: 93
  • Pull request event: 11
  • Fork event: 1
  • Create event: 5

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 192 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 2
  • Total maintainers: 2
pypi.org: xdownscale

A PyTorch-based tool to downscale spatiotemporal data

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 192 Last month
Rankings
Dependent packages count: 9.0%
Average: 29.9%
Dependent repos count: 50.8%
Maintainers (2)
Last synced: 7 months ago

Dependencies

requirements.txt pypi
  • numpy *
  • torch *
  • wandb *
  • xarray *
setup.py pypi
  • numpy *
  • torch *
  • xarray *