Hi,
I’d like to start a nested simulation in NEMO 5.0 (using RK3) based on NEMO 4.2.2 restarts. Although I haven’t tried, this should be fine without AGRIF but fails with AGRIF using dynspg_ts because of missing variables [uv]b2_i_b
and [uv]n_adv
. Is it safe to initialse these variables with zeros instead of reading the fields, similarly as done for other variables (e.g. sshbb_e etc.).
Changing lines 1143 ff in dynspg_ts.F90
from
#if defined key_agrif
! Read time integrated fluxes
IF ( .NOT.Agrif_Root() ) THEN
CALL iom_get( numror, jpdom_auto, 'ub2_i_b' , ub2_i_b(:,:), cd_type = 'U', psgn = -1._wp )
CALL iom_get( numror, jpdom_auto, 'vb2_i_b' , vb2_i_b(:,:), cd_type = 'V', psgn = -1._wp )
ELSE
ub2_i_b(:,:) = 0._wp ; vb2_i_b(:,:) = 0._wp ! used in the 1st update of agrif
ENDIF
# if defined key_RK3
CALL iom_get( numror, jpdom_auto, 'un_adv' , un_adv(:,:), cd_type = 'U', psgn = -1._wp )
CALL iom_get( numror, jpdom_auto, 'vn_adv' , vn_adv(:,:), cd_type = 'V', psgn = -1._wp )
# endif
#endif
to
#if defined key_agrif
! Read time integrated fluxes
IF ( .NOT.Agrif_Root() ) THEN
IF( iom_varid( numror, 'ub2_i_b', ldstop = .FALSE. ) > 0 ) THEN
CALL iom_get( numror, jpdom_auto, 'ub2_i_b' , ub2_i_b(:,:), cd_type = 'U', psgn = -1._wp )
CALL iom_get( numror, jpdom_auto, 'vb2_i_b' , vb2_i_b(:,:), cd_type = 'V', psgn = -1._wp )
ELSE
ub2_i_b(:,:) = 0._wp ; vb2_i_b(:,:) = 0._wp
ENDIF
ELSE
ub2_i_b(:,:) = 0._wp ; vb2_i_b(:,:) = 0._wp ! used in the 1st update of agrif
ENDIF
# if defined key_RK3
IF( iom_varid( numror, 'un_adv', ldstop = .FALSE. ) > 0 ) THEN
CALL iom_get( numror, jpdom_auto, 'un_adv' , un_adv(:,:), cd_type = 'U', psgn = -1._wp )
CALL iom_get( numror, jpdom_auto, 'vn_adv' , vn_adv(:,:), cd_type = 'V', psgn = -1._wp )
ELSE
un_adv(:,:) = 0._wp ; vn_adv(:,:) = 0._wp
ENDIF
# endif
#endif
seems to work technically but is this a way to go or what am I “losing/missing” when doing so? Is there another way to start a nested NEMO 5.0 simulation using RK3 from NEMO 4.2.2 restarts?
Thank you!
Franziska