timeseries data

Open
#23 0 comments 0 reactions 1 assignee View on GitHub

@allibco is already working on this.

Since Apr 22, 2022.

Assessment

This issue has not been assessed yet.

Description

enhancement

Modify code such that the "new" data to compare can be timeseries or history file. The time series is useful when comparing older data where history files may have been deleted.

Here is what I did for POP to make a history file from timeseries files:

Use xarray to make multiple timeseries into history file for ECT:
(see ~/python/pinatubo.ipynb on glade)

import xarray as xr
import numpy as np

ds_yellow = xr.open_mfdataset("/glade/work/abaker/pinatubo/ocn_ens_out/lens001/orig_yellow/b.*.nc")
ds_yellow_mo12 = ds_yellow.isel(time=[11])

ds_yellow_ssh = ds_yellow_mo12["SSH"]
ds_yellow_salt = ds_yellow_mo12["SALT"]
ds_yellow_temp = ds_yellow_mo12["TEMP"]
ds_yellow_uvel = ds_yellow_mo12["UVEL"]
ds_yellow_vvel = ds_yellow_mo12["VVEL"]
ds_yellow_rm = ds_yellow_mo12["REGION_MASK"]

yellow_ds = xr.merge([ds_yellow_ssh, ds_yellow_temp, ds_yellow_salt, ds_yellow_uvel, ds_yellow_vvel, ds_yellow_rm])
yellow_ds
yellow_ds.to_netcdf("yellow_mask.nc")

Dominant language
Jupyter Notebook
Stars
5
Forks
4
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

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.

More from NCAR/PyCECT

All issues in NCAR/PyCECT

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.