Skip to content

psl key error while running historical MPI-ESM1-2_HR #79

@shaniabbas137

Description

@shaniabbas137

Hello everyone I am trying to create intermediate files using cmip6-to-warminterm python module. however I am facing an error when I try to run the code. please review the screenshots.

Traceback (most recent call last):
File "/home/u2602559/anaconda3/envs/WRF/lib/python3.9/site-packages/xarray/core/dataset.py", line 1393, in _construct_dataarray
variable = self._variables[name]
KeyError: 'psl'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/u2602559/WRF_installation/TESTS/cmip6-to-wrfinterm/run_c2w.py", line 59, in
main_run()
File "/home/u2602559/WRF_installation/TESTS/cmip6-to-wrfinterm/run_c2w.py", line 48, in main_run
cmip_hdl=lib.cmip_handler.CMIPHandler(cfg_hdl)
File "/home/u2602559/WRF_installation/TESTS/cmip6-to-wrfinterm/lib/cmip_handler.py", line 54, in init
self._load_cmip_data()
File "/home/u2602559/WRF_installation/TESTS/cmip6-to-wrfinterm/lib/cmip_handler.py", line 142, in _load_cmip_data
self.ds[varname]=ds[varname].sel(
File "/home/u2602559/anaconda3/envs/WRF/lib/python3.9/site-packages/xarray/core/dataset.py", line 1484, in getitem
return self._construct_dataarray(key)
File "/home/u2602559/anaconda3/envs/WRF/lib/python3.9/site-packages/xarray/core/dataset.py", line 1395, in _construct_dataarray
_, name, variable = _get_virtual_variable(self._variables, name, self.dims)
File "/home/u2602559/anaconda3/envs/WRF/lib/python3.9/site-packages/xarray/core/dataset.py", line 196, in _get_virtual_variable
raise KeyError(key)
KeyError: 'psl'

I am also confused about SST. means how will I convert the SST file to intermediate file. or the code is wise enough to pick the SST by itself when running for other historical variables dataset.

what mistake I am doing. I need to know. Its urgent

Image Image Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions