Dump_nc command

Dear Lammps Users,

I have built lammps with USER-NC dump package .

A) I use following commands

compute p all pe/atom
compute dis all displace/atom
dump 1 all nc/mpiio 5000 traj.nc type x y z c_p c_dis[4]

I get the following error:

ERROR: 0 dimensions for ‘c_dis’. Not sure how to write this to the NetCDF trajectory file. (…/dump_nc_mpiio.cpp:439)

B)When I use the following commands :

compute te all temp
dump 1 all nc/mpiio 5000 traj.nc type x y z
dump_modify 1 append yes at -1 global c_te

ERROR on proc 0: NetCDF failed with error ‘NetCDF: Variable not found’ (while accessing ‘c_te’) in line 337 of …/dump_nc_mpiio.cpp. (…/dump_nc_mpiio.cpp:1046)

Could someone give an insight to it?

Thanks

Nikhil

Dear Lammps Users,

I have built lammps with USER-NC dump package .

A) I use following commands

compute p all pe/atom
compute dis all displace/atom
dump 1 all nc/mpiio 5000 traj.nc type x y z c_p c_dis[4]

I get the following error:

*ERROR: 0 dimensions for 'c_dis'. Not sure how to write this to the NetCDF
trajectory file. (../dump_nc_mpiio.cpp:439)*

​apparently, dump nc is missing support for per-atom arrays and selecting
per-atom vectors from them. this can be worked around with an atom-style
variable. ​e.g. like this:

compute p all pe/atom
compute dis all displace/atom
variable dis atom c_dis[4]

dump
​1​
all nc 50 traj.nc type x y z c_p v_dis

B)When I use the following commands :

compute te all temp
​​
dump 1 all nc/mpiio 5000 traj.nc type x y z
dump_modify 1 append yes at -1 global c_te

*ERROR on proc 0: NetCDF failed with error 'NetCDF: Variable not found'
(while accessing 'c_te') in line 337 of ../dump_nc_mpiio.cpp.
(../dump_nc_mpiio.cpp:1046)*
Could someone give an insight to it?

not sure if this is a bug, but the same kind of workaround helps here:

compute te all temp
variable te equal c_te


dump 1 all nc 5000 traj.nc type x y z
dump_modify 1 global v_te

​if you do not want to use these hacks or have more detailed questions, i
suggest you contact the developer of the USER-NC-DUMP package. email
address is in the README file.

axel.​