Skip to content

Commit

Permalink
Fix reading of strat_props
Browse files Browse the repository at this point in the history
layer "NA" would result in NaN
  • Loading branch information
rubencalje committed Aug 27, 2024
1 parent 30b48ff commit 08f6921
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions nlmod/read/geotop.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def get_lithok_colors():

def get_strat_props():
fname = os.path.join(NLMOD_DATADIR, "geotop", "REF_GTP_STR_UNIT.csv")
df = pd.read_csv(fname)
df = pd.read_csv(fname, keep_default_na=False, na_values="")
# rename the columns to previously used values
# so existing nlmod-code will keep working
df = df.rename(
Expand Down Expand Up @@ -122,10 +122,6 @@ def to_model_layers(
if strat_props is None:
strat_props = get_strat_props()

# stap 2 create layer for each stratigraphy unit (geo-eenheid)
if strat_props is None:
strat_props = get_strat_props()

# get all strat-units in Dataset
strat = geotop_ds["strat"].values
units = np.unique(strat)
Expand Down

0 comments on commit 08f6921

Please sign in to comment.