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

ACT fails to run read_arm_mmcr when using read-only files as input #887

Open
isilber opened this issue Dec 11, 2024 · 0 comments · May be fixed by #888
Open

ACT fails to run read_arm_mmcr when using read-only files as input #887

isilber opened this issue Dec 11, 2024 · 0 comments · May be fixed by #888

Comments

@isilber
Copy link

isilber commented Dec 11, 2024

  • ACT version: 2.1.4
  • Python version: 3.11.5
  • Operating System: Red Hat v7.9

Description

ACT fails to run read_arm_mmcr when using read-only files as input

What I Did

Upon running the following code:

import act
filename = './sgpmmcrmomC1.b1.20030927.000000.cdf'
mmcr_file = act.io.read_arm_mmcr([filename])
mmcr_file

I receive the following error:

OSError                                   Traceback (most recent call last)
Cell In[1], line 3
      1 import act
      2 filename = './sgpmmcrmomC1.b1.20030927.000000.cdf'
----> 3 mmcr_file = act.io.read_arm_mmcr([filename])
      5 mmcr_file

File ~/git_dev/ACT/act/io/arm.py:844, in read_arm_mmcr(filenames)
    842 multi_ds = []
    843 for f in filenames:
--> 844     nc = Dataset(f, 'a')
    845     # Change heights name to range to read appropriately to xarray
    846     if 'heights' in nc.dimensions:

File src/netCDF4/_netCDF4.pyx:2521, in netCDF4._netCDF4.Dataset.__init__()

File src/netCDF4/_netCDF4.pyx:2158, in netCDF4._netCDF4._ensure_nc_success()

OSError: [Errno 30] Read-only file system: './sgpmmcrmomC1.b1.20030927.000000.cdf'
@isilber isilber linked a pull request Dec 11, 2024 that will close this issue
1 task
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

Successfully merging a pull request may close this issue.

1 participant