Skip to content

Update archive script to handle new ocean output#69

Open
kieranricardo wants to merge 2 commits intomainfrom
update-archive-script-om3-update
Open

Update archive script to handle new ocean output#69
kieranricardo wants to merge 2 commits intomainfrom
update-archive-script-om3-update

Conversation

@kieranricardo
Copy link
Collaborator

@kieranricardo kieranricardo commented Feb 10, 2026

This updates the archiving script to handle the new ocean output (single variable files).

Note that a typo in the suite cause the ocean files to be saved as om3_... in stead of cm3_..., to handle this om3 and cm3 are searched for in the file regex, and om3 is replaced with cm3 in the output filenames.

Example output here: /g/data/zv30/non-cmip/ACCESS-CM3/cm3-run-20-01-2026-om3-update

Copy link
Collaborator

@blimlim blimlim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kieranricardo! Really glad that this makes the ocean file processing a lot simpler. I've just added a few comments around unneeded functions that can also be removed

return f"{len(non_time_dims)}d"


def get_frequency(times):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be safe to delete this function as it's not used anymore

return frequency


def check_year(year, da_years):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be safe to delete this one too

return ("scalar_axis" in dims)


def get_ndims(dims):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be safe to delete the get_ndims function

)


def set_scalar_name(ds, scalar_vars, frequency, year):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be safe to delete this one

)


def parse_cell_methods(methods_string):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be safe to delete this one too

dataset.load().to_netcdf(out_filepath)


def is_scalar_var(dims):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this one can go too

return name


def set_ocn_file_name(ndims,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one can be deleted too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants