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

Invalid path is used when trying to find mesh #158

Open
SorooshMani-NOAA opened this issue Jul 12, 2023 · 1 comment
Open

Invalid path is used when trying to find mesh #158

SorooshMani-NOAA opened this issue Jul 12, 2023 · 1 comment
Assignees

Comments

@SorooshMani-NOAA
Copy link
Collaborator

Issue reported by @FariborzDaneshvar-NOAA

The input path to SCHISM configuration is correct, but then during generation this issues shows up.

generate_schism_configuration(**{
    'configuration_directory': workdir,
    'output_directory': workdir,
    'relative_paths': True,
    'overwrite': True,
    'parallel': True
})

results in

---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
Cell In[10], line 2
      1 # Now generate the setup (it generates SCHISM input files: [bctides.in](http://bctides.in/), Makefile, ...)
----> 2 generate_schism_configuration(**{
      3     'configuration_directory': workdir,
      4     'output_directory': workdir,
      5     'relative_paths': True,
      6     'overwrite': True,
      7     'parallel': True
      8 })

File ~/miniconda3/envs/perturbation/lib/python3.10/site-packages/coupledmodeldriver/generate/schism/generate.py:116, in generate_schism_configuration(configuration_directory, output_directory, relative_paths, overwrite, parallel)
    113 use_original_mesh = base_configuration['schism']['use_original_mesh']
    115 if original_hgrid_filename is None or not original_hgrid_filename.exists():
--> 116     raise FileNotFoundError(f'horizontal grid not found at "{original_hgrid_filename}"')
    118 local_fgrid_filename = output_directory / [original_fgrid_filename.name](http://original_fgrid_filename.name/)
    119 local_hgrid_filename = output_directory / 'hgrid.gr3'

FileNotFoundError: horizontal grid not found at "/contrib/contrib/Soroosh.Mani/demo/perturb/hgrid.grd"
@SorooshMani-NOAA SorooshMani-NOAA self-assigned this Jul 12, 2023
@SorooshMani-NOAA
Copy link
Collaborator Author

It seems that absolute to relative path conversion and what current directory is have something to do with this error.

This the content of configure_schism.json file:

...
schism_executable_path:"pschism-TVD_VL"
schism_hotstart_combiner_path:"combine_hotstart7"
schism_schout_combiner_path:"combine_output11"
modeled_start_time:"2018-09-09 00:00:00"
modeled_end_time:"2018-09-18 00:00:00"
modeled_timestep:150
fgrid_path:"../../../../../../contrib/Soroosh.Mani/demo/perturb/manning.gr3"
hgrid_path:"../../../../../../contrib/Soroosh.Mani/demo/perturb/hgrid.grd"
schism_use_old_io:false
tidal_spinup_duration:172800
tidal_spinup_timestep:150
source_filename:null
use_original_mesh:false
output_surface:true
surface_output_interval:3600
output_stations:false
stations_file_path:null
stations_output_interval:360
output_spinup:true
output_elevations:true
processors:11
nems_parameters:{}
...

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