From 82416bd68d1e9e9da6906edfee706dd93fe58181 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 22 Oct 2025 20:00:18 +0000 Subject: [PATCH 1/6] Bump pypdf from 6.0.0 to 6.1.3 Bumps [pypdf](https://github.com/py-pdf/pypdf) from 6.0.0 to 6.1.3. - [Release notes](https://github.com/py-pdf/pypdf/releases) - [Changelog](https://github.com/py-pdf/pypdf/blob/main/CHANGELOG.md) - [Commits](https://github.com/py-pdf/pypdf/compare/6.0.0...6.1.3) --- updated-dependencies: - dependency-name: pypdf dependency-version: 6.1.3 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- docs/requirements.txt | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 03136b87..52725e11 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -18,7 +18,7 @@ netcdf4==1.6.5 numpy==1.26.2 requests==2.32.4 scipy==1.11.4 -pypdf==6.0.0 +pypdf==6.1.3 # Dependencies required by other packages certifi==2024.7.4 diff --git a/pyproject.toml b/pyproject.toml index 5ecf683c..f2348b31 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ dependencies = [ "xarray>=2023.5.0", "pandas>=2.0.3", "pyodbc>=4.0.39", - "pypdf==6.0.0", + "pypdf==6.1.3", ] [project.optional-dependencies] From a8155f9e4a427e728c68a9f57c21c335df04c125 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Nov 2025 22:58:47 +0000 Subject: [PATCH 2/6] Bump pypdf from 6.1.3 to 6.4.0 Bumps [pypdf](https://github.com/py-pdf/pypdf) from 6.1.3 to 6.4.0. - [Release notes](https://github.com/py-pdf/pypdf/releases) - [Changelog](https://github.com/py-pdf/pypdf/blob/main/CHANGELOG.md) - [Commits](https://github.com/py-pdf/pypdf/compare/6.1.3...6.4.0) --- updated-dependencies: - dependency-name: pypdf dependency-version: 6.4.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- docs/requirements.txt | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 52725e11..0512826e 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -18,7 +18,7 @@ netcdf4==1.6.5 numpy==1.26.2 requests==2.32.4 scipy==1.11.4 -pypdf==6.1.3 +pypdf==6.4.0 # Dependencies required by other packages certifi==2024.7.4 diff --git a/pyproject.toml b/pyproject.toml index 562dcc38..863b5f42 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ dependencies = [ "xarray>=2023.5.0", "pandas>=2.0.3", "pyodbc>=4.0.39", - "pypdf==6.1.3", + "pypdf==6.4.0", ] [project.optional-dependencies] From 1e6e127ee1c7b069c23653977a8735022b452153 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Dec 2025 19:59:36 +0000 Subject: [PATCH 3/6] Bump fonttools from 4.47.0 to 4.61.0 in /docs Bumps [fonttools](https://github.com/fonttools/fonttools) from 4.47.0 to 4.61.0. - [Release notes](https://github.com/fonttools/fonttools/releases) - [Changelog](https://github.com/fonttools/fonttools/blob/main/NEWS.rst) - [Commits](https://github.com/fonttools/fonttools/compare/4.47.0...4.61.0) --- updated-dependencies: - dependency-name: fonttools dependency-version: 4.61.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 52725e11..e8fcefb7 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -26,7 +26,7 @@ cftime==1.6.3 charset-normalizer==3.3.2 contourpy==1.2.0 cycler==0.12.1 -fonttools==4.47.0 +fonttools==4.61.0 idna==3.7 importlib-resources==6.1.1 kiwisolver==1.4.5 From 2db9196e6204209a365f117d87c338088c1f150c Mon Sep 17 00:00:00 2001 From: Courtney Batterson <42366074+falconstryker@users.noreply.github.com> Date: Fri, 5 Dec 2025 10:31:59 -0800 Subject: [PATCH 4/6] Downgrade fonttools version in requirements.txt Downgrade fonttools from version 4.61.0 to 4.60.1. This is compatible with readthedocs --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 7e9c785d..55858aa4 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -26,7 +26,7 @@ cftime==1.6.3 charset-normalizer==3.3.2 contourpy==1.2.0 cycler==0.12.1 -fonttools==4.61.0 +fonttools==4.60.1 idna==3.7 importlib-resources==6.1.1 kiwisolver==1.4.5 From 953aeda99de54acfdec2a6046e4c67913d5fef19 Mon Sep 17 00:00:00 2001 From: rurata Date: Wed, 7 Jan 2026 14:00:27 -0800 Subject: [PATCH 5/6] changes for interpolating phalf vars to the same grid --- bin/MarsInterp.py | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/bin/MarsInterp.py b/bin/MarsInterp.py index 8bcdd27b..1628ce13 100755 --- a/bin/MarsInterp.py +++ b/bin/MarsInterp.py @@ -430,11 +430,14 @@ def main(): if interp_type == "pstd": # Permute by default dimension, e.g., lev is first L_3D_P = fms_press_calc(ps, ak, bk, lev_type = "full") + L_3D_Ph = fms_press_calc(ps, ak, bk, lev_type = "half") elif interp_type == 'zagl': temp = fNcdf.variables["temp"][:] L_3D_P = fms_Z_calc(ps, ak, bk, temp.transpose( permut), topo=0., lev_type='full') + L_3D_Ph = fms_Z_calc(ps, ak, bk, temp.transpose( + permut), topo=0., lev_type='half') elif interp_type == 'zstd': temp = fNcdf.variables["temp"][:] @@ -446,6 +449,8 @@ def main(): L_3D_P = fms_Z_calc(ps, ak, bk, temp.transpose(permut), topo = zflat, lev_type = "full") + L_3D_Ph = fms_Z_calc(ps, ak, bk, temp.transpose(permut), + topo = zflat, lev_type = "half") fnew = Ncdf(newname, "Pressure interpolation using MarsInterp") @@ -455,7 +460,7 @@ def main(): # Get the variables var_list = filter_vars(fNcdf, args.include) - fnew.copy_all_dims_from_Ncfile(fNcdf, exclude_dim=["pfull"]) + fnew.copy_all_dims_from_Ncfile(fNcdf, exclude_dim=["pfull","phalf"]) # Add new vertical dimension fnew.add_dim_with_content(interp_type, lev_in, longname_txt, units_txt) @@ -480,22 +485,37 @@ def main(): fNcdf.variables[ivar].dimensions == ("time", tod_name, "pfull", "lat", "lon") or fNcdf.variables[ivar].dimensions == ("time", "pfull", + "grid_yt", "grid_xt"), + fNcdf.variables[ivar].dimensions == ("time", "phalf", "lat", + "lon") or + fNcdf.variables[ivar].dimensions == ("time", tod_name, "phalf", + "lat", "lon") or + fNcdf.variables[ivar].dimensions == ("time", "phalf", "grid_yt", "grid_xt")): if compute_indices: print(f"{Cyan}Computing indices ...{Nclr}") index = find_n(L_3D_P, lev_in, reverse_input = need_to_reverse) + indexh = find_n(L_3D_P, lev_in, + reverse_input = need_to_reverse) compute_indices = False print(f"{Cyan}Interpolating: {ivar} ...{Nclr}") varIN = fNcdf.variables[ivar][:] # This with the loop suppresses "divide by zero" errors with np.errstate(divide = "ignore", invalid = "ignore"): - varOUT = vinterp(varIN.transpose(permut), L_3D_P, lev_in, + if 'pfull' in fNcdf.variables[ivar].dimensions: + varOUT = vinterp(varIN.transpose(permut), L_3D_P, lev_in, type_int = interp_technic, reverse_input = need_to_reverse, masktop = True, index = index).transpose(permut) + elif 'phalf' in fNcdf.variables[ivar].dimensions: + varOUT = vinterp(varIN.transpose(permut), L_3D_Ph, lev_in, + type_int = interp_technic, + reverse_input = need_to_reverse, + masktop = True, + index = indexh).transpose(permut) long_name_txt = getattr(fNcdf.variables[ivar], "long_name", "") units_txt = getattr(fNcdf.variables[ivar], "units", "") @@ -530,7 +550,7 @@ def main(): dim_list=fNcdf.dimensions.keys() - if 'pfull' not in fNcdf.variables[ivar].dimensions: + if 'pfull' not in fNcdf.variables[ivar].dimensions or 'phalf' not in fNcdf.variables[ivar].dimensions: print(f"{Cyan}Copying over: {ivar}...") if ivar in dim_list: fnew.copy_Ncaxis_with_content(fNcdf.variables[ivar]) From d5b2e900b7cce369b14a4591d826f4d4bbd1c60e Mon Sep 17 00:00:00 2001 From: rurata Date: Thu, 8 Jan 2026 13:51:07 -0800 Subject: [PATCH 6/6] bugfix for phalf interp --- bin/MarsInterp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/MarsInterp.py b/bin/MarsInterp.py index 1628ce13..d2e61578 100755 --- a/bin/MarsInterp.py +++ b/bin/MarsInterp.py @@ -485,7 +485,7 @@ def main(): fNcdf.variables[ivar].dimensions == ("time", tod_name, "pfull", "lat", "lon") or fNcdf.variables[ivar].dimensions == ("time", "pfull", - "grid_yt", "grid_xt"), + "grid_yt", "grid_xt") or fNcdf.variables[ivar].dimensions == ("time", "phalf", "lat", "lon") or fNcdf.variables[ivar].dimensions == ("time", tod_name, "phalf", @@ -496,7 +496,7 @@ def main(): print(f"{Cyan}Computing indices ...{Nclr}") index = find_n(L_3D_P, lev_in, reverse_input = need_to_reverse) - indexh = find_n(L_3D_P, lev_in, + indexh = find_n(L_3D_Ph, lev_in, reverse_input = need_to_reverse) compute_indices = False