NCAR / NCAR/wrf-python

Allow for reading "static" fields from a separate file

Open
#87 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
498
Forks
178
PR merge metrics
No merged PRs in 30d

Description

I'm trying to use wrf-python with output from WRF-DART, and have been running into a few problems. One was that the WRF output files from various stages of DART (using the manhattan release) don't have many of the static fields that are needed for several diagnostic calculations in wrf-python.

I worked around this problem in my workflow by running a separate ncks script to add the static fields from the original wrfinput file to each of the WRF-DART forecast and analysis output files. However, this wastes disk space because these fields are the same for all files, and so arguably only need to be written in one master file (which is more-or-less what DART does). I thought a good way to allow for both scenarios (i.e. whether the static fields were present in the "main" file) would be to provide a keyword argument to getvar that would allow for a separate file containing the static fields to be read in. If this keyword argument were not provided, the original behavior of attempting to read them from the main file would be recovered.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the getvar entry point and trace how static fields are read for diagnostic calculations. Add support for an optional separate static-fields file while preserving the existing behavior when it is omitted, then verify both scenarios with the project's relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.