Skip to content

Commit

Permalink
Merge pull request #7 from nsidc/update-for-params-unification
Browse files Browse the repository at this point in the history
Update for params unification
  • Loading branch information
trey-stafford authored Oct 16, 2023
2 parents 479904d + abbcd27 commit 4d038cc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
uses: "actions/checkout@v3"
with:
repository: "nsidc/pm_icecon"
ref: "update_for_nise_cdr_cetb"
ref: "main"
path: "pm_icecon"

- name: "Check out pm_tb_data repository"
Expand Down
17 changes: 7 additions & 10 deletions seaice_ecdr/initial_daily_ecdr.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,21 @@
import sys
import traceback
from pathlib import Path
from typing import get_args, TypedDict, cast
from typing import TypedDict, cast, get_args

import click
import numpy as np
import numpy.typing as npt
import pm_icecon.bt.compute_bt_ic as bt
import pm_icecon.bt.params.amsr2_cdr as pmi_bt_params

import pm_icecon.bt.params.ausi_amsr2 as pmi_bt_params
import pm_icecon.nt.compute_nt_ic as nt
import pm_icecon.nt.params.amsr2 as nt_amsr2_params
import xarray as xr
from loguru import logger

from pm_icecon._types import Hemisphere
from pm_icecon.bt.fields import get_bootstrap_fields
from pm_icecon.cli.util import datetime_to_date

from pm_icecon.constants import DEFAULT_FLAG_VALUES
from pm_tb_data.fetch.au_si import AU_SI_RESOLUTIONS, get_au_si_tbs
from pm_icecon.fill_polehole import fill_pole_hole
from pm_icecon.interpolation import spatial_interp_tbs
from pm_icecon.land_spillover import (
Expand All @@ -33,10 +30,10 @@
load_or_create_land90_conc,
read_adj123_file,
)

from pm_icecon.nt.tiepoints import NasateamTiePoints
from pm_icecon.nt._types import NasateamGradientRatioThresholds
from pm_icecon.nt.tiepoints import NasateamTiePoints
from pm_icecon.util import date_range, standard_output_filename
from pm_tb_data.fetch.au_si import AU_SI_RESOLUTIONS, get_au_si_tbs

from seaice_ecdr.gridid_to_xr_dataarray import get_dataset_for_gridid

Expand Down Expand Up @@ -323,7 +320,7 @@ def compute_initial_daily_ecdr_dataset(
)
logger.info("Initialized spatial_interpolation_flag with TB fill locations")

bt_coefs_init = pmi_bt_params.get_bootstrap_params(
bt_coefs_init = pmi_bt_params.get_ausi_bootstrap_params(
date=date,
satellite="amsr2",
gridid=gridid,
Expand All @@ -333,7 +330,7 @@ def compute_initial_daily_ecdr_dataset(
bt_coefs_init["bt_tb_data_mask_function"] = bt.tb_data_mask

# Get the bootstrap fields and assign them to ide_ds DataArrays
bt_fields = pmi_bt_params.get_bootstrap_fields(
bt_fields = get_bootstrap_fields(
date=date,
satellite="amsr2",
gridid=gridid,
Expand Down
4 changes: 2 additions & 2 deletions seaice_ecdr/nrt.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"""Code to run NRT ECDR processing."""
from pathlib import Path

from seaice_ecdr.constants import LANCE_NRT_DATA_DIR

import click
from pm_tb_data.fetch.lance_amsr2 import download_latest_lance_files

from seaice_ecdr.constants import LANCE_NRT_DATA_DIR


@click.command(name="download-latest-nrt-data")
@click.option(
Expand Down
1 change: 0 additions & 1 deletion seaice_ecdr/tests/integration/gen_ide_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
compute_initial_daily_ecdr_dataset as compute_idecdr_ds,
)


# Set the default minimum log notification to Warning
logger.remove(0) # Removes previous logger info
logger.add(sys.stderr, level="INFO")
Expand Down

0 comments on commit 4d038cc

Please sign in to comment.