Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with 4x5 degree output. #10

Open
rosiealice opened this issue Feb 14, 2025 · 1 comment
Open

Issue with 4x5 degree output. #10

rosiealice opened this issue Feb 14, 2025 · 1 comment

Comments

@rosiealice
Copy link

If I try and run with this output:

python run_diagnostic_full_from_terminal.py /datalake/NS9560K/rosief/FATES_NOCOMP_45_calib/lnd/hist/ outpath=/datalake/NS9560K/www/diagnostics/noresm/rosief pamfile=standard_pams.json

I get the following error:

All set, setting up to run diagnostics on /datalake/NS9560K/rosief/FATES_NOCOMP_45_calib/lnd/hist/ using options:
{'weight': '/datalake/NS9560K/diagnostics/land_xesmf_diag_data/map_ne30pg3_to_0.5x0.5_nomask_aave_da_c180515.nc', 'outpath': '/datalake/NS9560K/www/diagnostics/noresm/rosief', 'pamfile': 'standard_pams.json', 'compare': None}
Standard diagnostics:
Traceback (most recent call last):
File "/nird/home/rosief/gt/xesmf_clm_fates_diagnostic/scripts/run_diagnostic_full_from_terminal.py", line 85, in
diagnostic.make_all_plots_and_tables()
File "/nird/home/rosief/gt/xesmf_clm_fates_diagnostic/scripts/../src/xesmf_clm_fates_diagnostic/xesmf_clm_fates_diagnostic.py", line 273, in make_all_plots_and_tables
self.make_global_yearly_trends(year_range)
File "/nird/home/rosief/gt/xesmf_clm_fates_diagnostic/scripts/../src/xesmf_clm_fates_diagnostic/xesmf_clm_fates_diagnostic.py", line 386, in make_global_yearly_trends
outd_regr = regrid_se_data(self.regridder, outd[var])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nird/home/rosief/gt/xesmf_clm_fates_diagnostic/scripts/../src/xesmf_clm_fates_diagnostic/plotting_methods.py", line 117, in regrid_se_data
updated = data_to_regrid.copy().transpose(..., "lndgrid").expand_dims("dummy", axis=-2)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/projects/NS9560K/diagnostics/land_xesmf_env/diag_xesmf_env/lib/python3.12/site-packages/xarray/util/deprecation_helpers.py", line 140, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/projects/NS9560K/diagnostics/land_xesmf_env/diag_xesmf_env/lib/python3.12/site-packages/xarray/core/dataarray.py", line 3077, in transpose
dim = tuple(infix_dims(dim, self.dims, missing_dims))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/projects/NS9560K/diagnostics/land_xesmf_env/diag_xesmf_env/lib/python3.12/site-packages/xarray/namedarray/utils.py", line 167, in infix_dims
existing_dims = drop_missing_dims(dims_supplied, dims_all, missing_dims)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/projects/NS9560K/diagnostics/land_xesmf_env/diag_xesmf_env/lib/python3.12/site-packages/xarray/namedarray/utils.py", line 128, in drop_missing_dims
raise ValueError(
ValueError: Dimensions {'lndgrid'} do not exist. Expected one or more of ('time', 'lat', 'lon')

I would say this is a 4x5 resolution issue as that is the primary thing different about this run, but Jeanne had successfully run with 4x5 so maybe it is not that. I have tried to make these data readable.

@maritsandstad
Copy link
Collaborator

Ok, will look at this soon (today or tomorrow) along with other extensions. The code is not really tested for anything but the standard SE-resolution, so I'm not surprised it doesn't work (more surprised Jeanne got it to work honestly), but I agree that it should be possible to run with this as well, so good thing to get it to work

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

No branches or pull requests

2 participants