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

Error in make_bdry_file.py #57

Open
arief121 opened this issue Jan 22, 2025 · 0 comments
Open

Error in make_bdry_file.py #57

arief121 opened this issue Jan 22, 2025 · 0 comments

Comments

@arief121
Copy link

Hi All,

I'm trying to create icbc file as roms model input, I just tried this pyroms a while ago.

I found a problem when running make_bdry_file.py, with this error:

`horizontal interpolation using scrip weights
vertical interpolation from standard z level to sigma
write data in destination file
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/coawst/.conda/envs/pyroms/lib/python3.8/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/home/coawst/.conda/envs/pyroms/lib/python3.8/multiprocessing/pool.py", line 48, in mapstar
return list(map(*args))
File "make_bdry_file.py", line 26, in do_file
zeta = remap_bdry(file, 'ssh', src_grd, dst_grd, dst_dir=dst_dir)
File "/home/coawst/penang/remap_bdry.py", line 207, in remap_bdry
nc.variables['ocean_time'][0] = time
KeyError: 'ocean_time'
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "make_bdry_file.py", line 85, in
results = p.map(partial_do_file, lst_file)
File "/home/coawst/.conda/envs/pyroms/lib/python3.8/multiprocessing/pool.py", line 364, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/home/coawst/.conda/envs/pyroms/lib/python3.8/multiprocessing/pool.py", line 771, in get
raise self._value
KeyError: 'ocean_time'`

but I tried to check the file in question, there is already ocean_time in it:

(pyroms) [coawst@master penang]$ ncdump -h ./bdry/HYCOM_GLBy0.08_2019_121_ssh_bdry_PENANG.nc netcdf HYCOM_GLBy0.08_2019_121_ssh_bdry_PENANG { dimensions: xi_rho = 20 ; xi_u = 19 ; xi_v = 20 ; xi_psi = 19 ; eta_rho = 40 ; eta_u = 40 ; eta_v = 39 ; eta_psi = 39 ; s_rho = 15 ; s_w = 16 ; ocean_time = UNLIMITED ; // (1 currently) // global attributes: :Description = "ROMS file" ; :Author = "pyroms_toolbox.nc_create_roms_file" ; :Created = "2025-01-22 11:28:14" ; :title = "ROMS file" ; data: ocean_time = 43584 ; }

Does anyone know why this error occurs?
thank you for your help

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

1 participant