Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
timothyas committed Aug 8, 2024
1 parent 094a011 commit a49b6e8
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 51 deletions.
7 changes: 5 additions & 2 deletions examples/replay/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,17 @@ Currently only the FV3 data is being moved, and it can be found

### Missing data

There are some time stamps that are missing (all NaNs) for the following fields,
There are some time stamps that are missing (the 2D fields are all NaNs for those time steps) for the following fields,
only in the 1 degree dataset:
- hgtsfc
- sltyp
- weasd

Since hgtsfc and sltyp are static, this doesn't matter. If 1 degree weasd is
Since hgtsfc and sltyp are static, this doesn't matter, we can just grab the
first timestamp. If 1 degree weasd is
needed in the future then we'll need to move this again.
Also, the field `hgtsfc_static` has been added which rightfully does not have
the time dimension.


## 1/4 Degree Data
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
"""Compute geopotential from Replay dataset"""
"""Compute geopotential from Replay dataset,
append it back to the original or store it locally depending on inputs
Note: this was heavily borrowed from this xarray-beam example:
https://github.com/google/xarray-beam/blob/main/examples/era5_climatology.py
"""

from typing import Tuple

Expand Down
7 changes: 6 additions & 1 deletion examples/replay/append_static_vars.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
"""Compute geopotential from Replay dataset"""
"""Compute static variables surface orography and land/sea mask,
append it back to the original or store it locally depending on inputs
Note: this was heavily borrowed from this xarray-beam example:
https://github.com/google/xarray-beam/blob/main/examples/era5_climatology.py
"""

from typing import Tuple

Expand Down
15 changes: 2 additions & 13 deletions examples/replay/localzarr.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Note that this was copied and pasted from xarray-beam to make some
# quick modifications and quick results.
"""IO with Zarr via Xarray."""
from __future__ import annotations
import collections
Expand Down
17 changes: 0 additions & 17 deletions examples/replay/submit_1deg_geopotential_append.sh

This file was deleted.

23 changes: 23 additions & 0 deletions examples/replay/submit_geopotential_append.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

#SBATCH -J append_geopotential
#SBATCH -o slurm/append_geopotential.%j.out
#SBATCH -e slurm/append_geopotential.%j.err
#SBATCH --nodes=1
#SBATCH --ntasks=3
#SBATCH --cpus-per-task=10
#SBATCH --partition=compute
#SBATCH -t 120:00:00

source /contrib/Tim.Smith/miniconda3/etc/profile.d/conda.sh
conda activate ufs2arco

python append_geopotential.py \
--input_path="gs://noaa-ufs-gefsv13replay/ufs-hr1/1.00-degree/03h-freq/zarr/fv3.zarr" \
--output_path="gs://noaa-ufs-gefsv13replay/ufs-hr1/1.00-degree/03h-freq/zarr/fv3.zarr" \
--num_workers=4

python append_geopotential.py \
--input_path="gs://noaa-ufs-gefsv13replay/ufs-hr1/0.25-degree-subsampled/03h-freq/zarr/fv3.zarr" \
--output_path="gs://noaa-ufs-gefsv13replay/ufs-hr1/0.25-degree-subsampled/03h-freq/zarr/fv3.zarr" \
--num_workers=4
17 changes: 0 additions & 17 deletions examples/replay/submit_qdegsub_geopotential_append.sh

This file was deleted.

0 comments on commit a49b6e8

Please sign in to comment.