Commit 86a883c0 authored by Nick R. Papior's avatar Nick R. Papior
Browse files

bug: fixed writing Ef to .nc file in corner cases

Sometimes the Ef variable was not written because of option clashes.
Now we always write Ef with either DM or H writes.
parent 03d735f9
...@@ -289,7 +289,7 @@ ...@@ -289,7 +289,7 @@
if ( idyn == 6 ) then if ( idyn == 6 ) then
call cdf_save_fc(trim(slabel)//'.nc', istep) call cdf_save_fc(trim(slabel)//'.nc', istep)
if ( istep == 0 ) then if ( istep == 0 ) then
dic_save = ('fa'.kv.1)//('stress'.kv.1) dic_save = ('fa'.kv.1)//('stress'.kv.1)//('Ef'.kv.1)
if ( savehs .or. TS_HS_save ) if ( savehs .or. TS_HS_save )
& dic_save = dic_save//('H'.kv.1) & dic_save = dic_save//('H'.kv.1)
call cdf_save_state(trim(slabel)//'.nc',dic_save) call cdf_save_state(trim(slabel)//'.nc',dic_save)
...@@ -298,7 +298,7 @@ ...@@ -298,7 +298,7 @@
else if ( idyn /=0 .or. nmove /= 0 ) then else if ( idyn /=0 .or. nmove /= 0 ) then
!call cdf_save_md(trim(slabel)//'.nc') !call cdf_save_md(trim(slabel)//'.nc')
else else
dic_save = ('fa'.kv.1)//('stress'.kv.1) dic_save = ('fa'.kv.1)//('stress'.kv.1)//('Ef'.kv.1)
if ( savehs .or. TS_HS_save ) dic_save = dic_save //('H'.kv.1) if ( savehs .or. TS_HS_save ) dic_save = dic_save //('H'.kv.1)
call cdf_save_state(trim(slabel)//'.nc',dic_save) call cdf_save_state(trim(slabel)//'.nc',dic_save)
call delete(dic_save) call delete(dic_save)
......
...@@ -95,8 +95,7 @@ contains ...@@ -95,8 +95,7 @@ contains
if ( (idyn == 0 .and. nmove == 0) .or. & if ( (idyn == 0 .and. nmove == 0) .or. &
(idyn == 6 .and. istp == 1 ) ) then (idyn == 6 .and. istp == 1 ) ) then
dic_save = ('Ef'.kv.1) dic_save = ('Ef'.kv.1)//('DM'.kv.1)//('EDM'.kv.1)
dic_save = dic_save//('DM'.kv.1)//('EDM'.kv.1)
call cdf_save_state(trim(slabel)//'.nc',dic_save) call cdf_save_state(trim(slabel)//'.nc',dic_save)
call delete(dic_save) call delete(dic_save)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment