0
votes

I've come across a specific task to create a netcdf file which stores data only from certain processors. The matter is the following-I have 3d field, divided into (nx) x (ny) x (nz) domains. Each domain has a processor assigned to it. I would like to save data only from domains in certain position in x direction. This means that the data would come only from ny x nz processors. I've been trying to find examples on how to write such data, but unsucessfully. Does anyone know if this is doable and also-are there specific commands I should use.

For example, I tried to invoke writing data with using if conditions where I used if(mpid%rank==0) then... together with nf90_var_par_access(ncid, varid, nf90_independent) call, but without success, the procedure seems to get stuck.

thank you in advance!

1

1 Answers

0
votes

Actually, I've managed to resolve the issue just hours after I posted the question. The main trouble was the dimension length definition in nf90_def_dim call. In it, the code I have assumed by default the dimension, which was a product of number of domains and points in them. I changed that definition to adapt to the case when only certain domains are used and the write process on only few processors worked.

regards to all