I am encountering a weird issue when using WRF to write some output to netcdf. This is custom code, not in the general WRF model, but it has been used before successfully.
When I compile the model in serial, what happens is some variables are being output to netcdf, and the netcdf file size is growing (the file size scales linearly with the length of the simulation, as expected), but the "time" dimension of the netcdf file remains zero. When I use ncdump to view the contents of the file, the only variables that drop out are lat/long and height---dimension variables. All of the other expected variables are listed, with the correct names, units, etc., but they do not appear as arrays in the file, and if I open the file for example with python and extract those variables, they are just empty arrays (not even zeros). So it's confusing that the file size is growing.
The only other clue I have is that when I compile the model in parallel instead of serial, I have gotten a runtime error for a statement of this form:
Code: Select all
do j = 1, dim allocate( sample_file%var(j)%ptr(num_samples,1,nz) ) end do
Fortran runtime error: Index '1' of dimension 1 of array 'sample_file%var' above upper bound of 0.
I don't get this error when running in serial. The model completes successfully, rather I just get the weird behavior described above.
Thanks for any input!