npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gfs-weather-server

v2.2.7

Published

Backend for downloading, storing and serving meteorological data.

Downloads

23

Readme

gfs-weather-server

Backend for downloading, storing and serving meteorological data.

Installation

git clone ...

Configuration

Copy config.sample.json to config.json and adjust the settings to your environment.

{
  "server": {
    // Configuration settings affecting the restify instance
    "port": 8080
  },
  // Toggle between mongoose for a mongodb database or sequelize for sql databases
  "db": "mongoose",
  "mongoose": {
    "connString": "mongodb://localhost/gfs"
  },
  // Sequelize settings. modelOptions get passed to every model.
  // Globally override settings like the schema for postgres.
  "sequelize": {
    "user": "gfs",
    "database": "gfs",
    "password": "foo",
    "options": {
      "host": "localhost",
      "port": 5432,
      "dialect": "postgres"
    },
    "modelOptions": {
      "schema": "weather",
      "underscored": true
    }
  },
  // Settings for the gfs downloader job.
  "downloader": {
    // Predefine the minimum start date when downloading. Defaults to the newest available files.
    "latestUpdate": null,
    // Where to store downloaded gfs files
    "target": "/tmp/gfs-downloader",
    // Which offset (in hours) to start downloading forecasts (multiple of 3)
    "forecastStart": 0,
    // Maximum offset of forecasts (multiple of 3)
    "forecastEnd": 72,
    // Fields (based on grib index files) to be downloaded.
    "fields": [{
        // If field names are given as array, they are combined into a single grid after downloading
        "name": ["UGRD", "VGRD"],
        "combinedName": "UVGRD",
        // The surface as defined in the grib index
        "surface": "10 m above ground",
        // The resolution in degrees. Can be 2.5, 1, 0.5 or 0.25.
        // Only 1 degree is supported at the moment
        "resolution": 1
      }, {
        "name": "TMP",
        "surface": "surface",
        "resolution": 1
      }, {
        "name": "PRATE",
        "surface": "surface",
        // For non-regular grids, define "to-regular" as a post-processing step.
        // This converts and downsamples (if needed) gaussian grids to regular latlng grids
        "process": ["to-regular", 90, 0, 1, 1, 360, 181]
      }
    ]
  }
}

Usage

Standalone server

docker build gfs-server:latest .
docker run -i -t gfs-server:latest start

Cronjobs

docker build gfs-server:latest .
docker run -i -t gfs-server:latest crond

Manually run a cron job

docker run -i -t gfs-server:latest crond -- --run-once download