geocryology / globsim

Using global reanalyses for permafrost simulation
GNU General Public License v3.0
19 stars 5 forks source link

Writing Netcdf during scaling of JRA and MERRA data #102

Closed EmilieStewartJones closed 2 years ago

EmilieStewartJones commented 2 years ago

This error is new for me. It did not happen before I updated globsim to the most recent version. Occurs with both JRA and MERRA.

When I ran this command: globsim scale -d JRA -f /fs/yedoma/usr-storage/esj555/RunningExperiments/NorthernCoastMtns/par/config.toml

I get the following error:
Traceback (most recent call last):
  File "/home/esj555/.conda/envs/globsim/bin/globsim", line 11, in <module>
    load_entry_point('globsim==2.3.1', 'console_scripts', 'globsim')()
  File "/home/esj555/globsim/globsim/globsim_cli.py", line 97, in main
    args.func(args)
  File "/home/esj555/globsim/globsim/globsim_scale.py", line 40, in main
    JRA=JRA, MERRA=MERRA)
  File "/home/esj555/globsim/globsim/globsim_main.py", line 162, in GlobsimScale
    JRAsc = scale.JRAscale(sfile)
  File "/home/esj555/globsim/globsim/scale/JRAscale.py", line 49, in __init__
    dataset.globsim_version = globsim_version
  File "netCDF4/_netCDF4.pyx", line 2914, in netCDF4._netCDF4.Dataset.__setattr__
  File "netCDF4/_netCDF4.pyx", line 2844, in netCDF4._netCDF4.Dataset.setncattr
  File "netCDF4/_netCDF4.pyx", line 1606, in netCDF4._netCDF4._set_att
  File "netCDF4/_netCDF4.pyx", line 1887, in netCDF4._netCDF4._ensure_nc_success
AttributeError: NetCDF: Write to read only
nicholas512 commented 2 years ago

This should be fixed by the recent commit: 2d2e722a9c726a795a68b6bc64712d7c98f4c1fe

EmilieStewartJones commented 2 years ago

Tested it out and it works! Thank you!