Closed Aariq closed 1 year ago
Similar error with ensemble 2 but at year 2010:
Error in ncdf4::ncvar_put(nc = nc, varid = varid, vals = vals, start = start, :
ncvar_put: error: you asked to write 48 values, but the passed data array only has 44 entries!
In addition: Warning messages:
1: There were 6 warnings in `dplyr::summarize()`.
The first warning was:
ℹ In argument: `dplyr::across(dplyr::everything(), function(.x) matrix(.x, ncol = n_pft))`.
Caused by warning in `matrix()`:
! data length [46] is not a sub-multiple or multiple of the number of rows [12]
So something to do with matrix()
.
Looks like sometimes not all PFTs end up in the output, an assumption I had made. 2003-08-01 through 2008-11-01 only have 3 PFTs after going through extract_E_file()
Apparently https://github.com/PecanProject/pecan/pull/3140 didn't fix it entirely. Now getting a similar error in 2002 for ensemble number 6:
----- Processing year: 2002
2023-03-21 09:06:09 INFO [read_E_files] :
*** Reading -E- file ***
2023-03-21 09:06:12 INFO [model2netcdf.ED2] :
*** Writing netCDF file ***
Error in ncdf4::ncvar_put(nc = nc, varid = varid, vals = vals, start = start, :
ncvar_put: error: you asked to write 48 values, but the passed data array only has 36 entries!
Calls: model2netcdf.ED2 ... var_put -> <Anonymous> -> withVisible -> <Anonymous>
Execution halted
ERROR IN model2netcdf.ED2
Also in ENS 10 in 2001, ENS 20 in 2002,
For some reason
model2netcdf.ED2()
fails for the prairie run at site 1123 for ensemble member 1 at 2003.