Skip to content

Commit

Permalink
more docs
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett committed Oct 10, 2024
1 parent a8a881d commit cd1e4f9
Showing 1 changed file with 29 additions and 9 deletions.
38 changes: 29 additions & 9 deletions ush/blending_fv3.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""
This file handles blending of FV3 tiles???
"""This script performs blending between regional and global weather
forecast model restarts using the Fortran module raymond. The Raymond
filter is a sixth-order tangent low-pass implicit filter and can be
controlled via the cutoff length scale (Lx).
"""
import numpy as np
Expand All @@ -8,13 +10,31 @@
import sys

def check_file_nans(test_nc, vars_fg, vars_bg, name):
"""
Check file NANS?
test_nc: Test netCDF file.
vars_fg: Vars?
vars_bg: Vars?
name: Name of file?
"""Check for NaN values in specified variables of a netCDF file.
This function iterates over a list of variables and checks for NaN values in the provided
netCDF file. It prints the count of NaNs found for each variable and indicates whether
any NaNs were detected.
Again, if there are any NaNs found, I wanted to catch that here
instead of later when the model is running. I don't think there is
any reason to expect NaNs.
Parameters:
test_nc: Dataset
The test netCDF file containing the variables to be checked for NaN values.
vars_fg: list of str
A list of variable names from the regional model (foreground) to check.
vars_bg: list of str
A corresponding list of variable names from the global model (background) to check.
name: str
A string representing the context (e.g., 'glb' for global or 'reg' for regional)
to identify the source of the variables being checked.
Returns:
bool
Returns True if any NaN values are found in the specified variables;
otherwise, returns False.
"""
nans = False
Expand Down

0 comments on commit cd1e4f9

Please sign in to comment.