Skip to content

Commit

Permalink
black formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
manishvenu committed Sep 27, 2024
1 parent 34be7e2 commit 5efb3b0
Showing 1 changed file with 46 additions and 22 deletions.
68 changes: 46 additions & 22 deletions tests/test_angled_grids.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,71 @@
from pathlib import Path




def test_angled_grids():
"""
Test that the angled grid is correctly read in.
"""
expt_name = "nwa12_read_grids"

latitude_extent = [16., 27]
latitude_extent = [16.0, 27]
longitude_extent = [192, 209]

date_range = ["2005-01-01 00:00:00", "2005-02-01 00:00:00"]

## Place where all your input files go
input_dir = Path(os.path.join("/","glade","u","home","manishrv","documents","nwa12_0.1","regional_mom_workflows","rm6",expt_name, "inputs"))
## Place where all your input files go
input_dir = Path(
os.path.join(
"/",
"glade",
"u",
"home",
"manishrv",
"documents",
"nwa12_0.1",
"regional_mom_workflows",
"rm6",
expt_name,
"inputs",
)
)

## Directory where you'll run the experiment from
run_dir = Path(os.path.join("/","glade","u","home","manishrv","documents","nwa12_0.1","regional_mom_workflows","rm6",expt_name, "run_files"))
run_dir = Path(
os.path.join(
"/",
"glade",
"u",
"home",
"manishrv",
"documents",
"nwa12_0.1",
"regional_mom_workflows",
"rm6",
expt_name,
"run_files",
)
)
for path in (run_dir, input_dir):
os.makedirs(str(path), exist_ok=True)

## User-1st, test if we can even read the angled nc files.
expt = rmom6.experiment(
longitude_extent = longitude_extent,
latitude_extent = latitude_extent,
date_range = date_range,
resolution = 0.05,
number_vertical_layers = 75,
layer_thickness_ratio = 10,
depth = 4500,
minimum_depth = 5,
mom_run_dir = run_dir,
mom_input_dir = input_dir,
toolpath_dir = "",
read_existing_grids = True)
longitude_extent=longitude_extent,
latitude_extent=latitude_extent,
date_range=date_range,
resolution=0.05,
number_vertical_layers=75,
layer_thickness_ratio=10,
depth=4500,
minimum_depth=5,
mom_run_dir=run_dir,
mom_input_dir=input_dir,
toolpath_dir="",
read_existing_grids=True,
)

## Dev-2nd, test if the segment.coords function can properly give us the angles from this grid, which is at least called by rectangular_boundaries.

## User-2nd, test our ocean state boundary conditions

## User-3rd, test our tides boundary conditions



0 comments on commit 5efb3b0

Please sign in to comment.