I am using Matlab tool shared by Wilkin to write forcing file.

First, I got E value using roms_get_era5_NCARds633_bulkflux.m. I chose the real box as 99E-140E 0-26N, and set bbox as [-261 -220 0 26]. This function worked well and E value generated.

Then, I run roms_write_era5_NCARds633_frcfile.m directly, but the error said "Unrecognized function or variable 'bitcount'." I checked nc_write.m and it had not bitcount before line 216. And I don't know bitcount in this location is a function or variable and where is it?

Code: Select all

```
>> load('E.mat')
>> roms_write_era5_NCARds633_frcfile
Creating ROMS NetCDF forcing file: frc_watl_ERA5_bulkflux_201001.nc
Unrecognized function or variable 'bitcount'.
Error in nc_write>nc_write_matlab (line 216)
CheckSum = bitcount(f(ind));
Error in nc_write (line 68)
status = nc_write_matlab(ncfile, Vname, f, Tindex, Info);
Error in roms_write_era5_NCARds633_frcfile (line 151)
nc_write(Outfile,'spherical',int32(spherical));
```

Many thanks in advance.

Dan