Skip to content

Error in make_bdry_file.py #57

@arief121

Description

@arief121

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

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