- edited description
netcdf error with write_eigenfunc
I get NetCDF errors with write_eigenfunc = T.
ERROR: NetCDF: Not a valid ID ERROR in netcdf_error: NetCDF: Not a valid ID in varid: 0, ncid: 0
I compiled with a default setting, so maybe new diagnostics is used.
In do_write_eigenfunc in diagnostics/diagnostics_final_routine.f90, nc_eigenfunc of gs2_io is called, but gs2_io seems not initialized.
Comments (15)
-
reporter -
Hi Ryusuke, could you upload your input file, so I can try to replicate this? What branch are you using? Could you try using
next
? -
reporter - attached test_gs2.in
hear's the test input file.
-
reporter I used master.
And, I've tested next if I do correctly and get the same error. I did the following and compiled.
# git pull origin next
-
Thanks. I can't replicate this. Could you tell me which commits of gs2, Makefiles and utils you are using when you see the error? That is, can you run
git rev-parse HEAD
in the main directory, and in the Makefiles and utils subdirectories, and report the three hashes here? -
reporter For the master branch, gs2: 7350129ed3e7753bc84673c607e3f1f0d790f7e8 utils: 57bf40efe7182aba6552b1dae4bee5674c8b8a3a Makefiles: 0238d084bec26dfe0cb0a06f14536d617ee9be10
And, for the next branch: gs2: 796a873a03827a929840d7ad69155d9897a43607 utils: f59923440dbfea522f84f233c6fe2c0aec37fa6b Makefiles: 7aee67a9a8a31c0665a78484d5aa08f41dd13ec9
-
Thanks. I still don't see it. Could you tell me what compiler and
GK_SYSTEM
you are using?Also, it seems
gs2_io.fpp
has lots of#ifdef NETCDF
directives. Have you usedNETCDF=on
in the Makefile so that these sections are also ings2_io.f90
? -
reporter - attached make_test.txt
I uploaded make_test.txt.
I use GK_SYSTEM=rokko, and COMPILER=intel. It seems NETCDF configuration is ok.
BTW, I also some error in Makefile. SEDSYSTEMCONFIG line gives me "-i: command not found" I'll open another issue.
-
reporter Has anybody reproduced the problem? I see this problem on my mac with gfortran as well as my local linux cluster as reported above. I compiled the next branch version with USE_PARALLEL_NETCDF=on, USE_NETCDF=on.
This problem seems because some new diagnostics routines in diagnostics/ still call routines in gs2_io, which is old. I searched "use gs2_io" statement in diagnostics/, and found the followings still have this statement: fields, _final_routines, _fluxes, _moments, _turbulence. Most of them do not actually call nc routines, but only final_routines does. So, I get the netcdf error when I turn the following switches on: write_eigenfunc, write_final_epar, write_final_moments, write_final_antot. Probably, we can just remove nc routine since _final_routines write data to ascii files.
-
reporter - attached patch.diagnostics_nc
I suggest modifications as in the attached patch.
-
Thanks Ryusuke. I understand what is happening now. This isn't an error that crashes the code, but the unexpected behaviour causes a line to be written to the
.error
file.As you say, the problem is that parts of the new diagnostics - like
write_eigenfunc
- are just copies from the old diagnostics, and these fail because they depend ongs2_io
, which is part of old diagnostics. The patch you shared removes the bad function calls from new diagnostics, which is a necessary step. But if we only do that, a user who setswrite_eigenfunc = .true.
while using new diagnostics would get no eigenfunction output and no error message. So new diagnostics needs to have these functions added into it properly. Since I now get what's going on, I'll assign this to myself. -
-
assigned issue to
-
assigned issue to
-
reporter I'm sorry that I wasn't clear enough. I don't mind if the diagnostics write out either ascii or NetCDF output.
-
Implement write_eigenfunc in new diagnostics
Replaces PR #45 (updating it for 8.0.4-RC + python) Resolves addresses issue
#25→ <<cset d904ab10f653>>
-
- changed status to resolved
Fixed by PR #281
- Log in to comment