Skip to content

Commit

Permalink
Merge pull request #472 from FESOM/refactoring_fix_tke2tke+idemix_res…
Browse files Browse the repository at this point in the history
…tart

Fix restart: when tke or iwe files do not exist, make existence of iwe and tke optional
  • Loading branch information
koldunovn authored Jun 23, 2023
2 parents b802a4f + e017f03 commit 2c049ce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/io_restart.F90
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@ subroutine ini_ocean_io(year, dynamics, tracers, partit, mesh)
!___Save restart variables for TKE and IDEMIX_________________________________
! if (trim(mix_scheme)=='cvmix_TKE' .or. trim(mix_scheme)=='cvmix_TKE+IDEMIX') then
if (mix_scheme_nmb==5 .or. mix_scheme_nmb==56) then
call oce_files%def_node_var('tke', 'Turbulent Kinetic Energy', 'm2/s2', tke(:,:), mesh, partit)
call oce_files%def_node_var_optional('tke', 'Turbulent Kinetic Energy', 'm2/s2', tke(:,:), mesh, partit)
endif
! if (trim(mix_scheme)=='cvmix_IDEMIX' .or. trim(mix_scheme)=='cvmix_TKE+IDEMIX') then
if (mix_scheme_nmb==6 .or. mix_scheme_nmb==56) then
call oce_files%def_elem_var('iwe', 'Internal Wave Energy' , 'm2/s2', iwe(:,:), mesh, partit)
call oce_files%def_elem_var_optional('iwe', 'Internal Wave Energy' , 'm2/s2', iwe(:,:), mesh, partit)
endif
if (dynamics%opt_visc==8) then
call oce_files%def_elem_var('uke', 'unresolved kinetic energy', 'm2/s2', uke(:,:), mesh, partit)
call oce_files%def_elem_var('uke_rhs', 'unresolved kinetic energy rhs', 'm2/s2', uke_rhs(:,:), mesh, partit)
call oce_files%def_elem_var_optional('uke', 'unresolved kinetic energy', 'm2/s2', uke(:,:), mesh, partit)
call oce_files%def_elem_var_optional('uke_rhs', 'unresolved kinetic energy rhs', 'm2/s2', uke_rhs(:,:), mesh, partit)
endif

do j=1,tracers%num_tracers
Expand Down

0 comments on commit 2c049ce

Please sign in to comment.