New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
#2491 (output time step in istate) – NEMO

Opened 4 years ago

Last modified 4 years ago

#2491 assigned Defect

output time step in istate

Reported by: rblod Owned by: rblod
Priority: low Milestone: Unscheduled
Component: TOP Version: trunk
Severity: minor Keywords:
Cc:

Description

Context

When outputting the initial state (nn_istate=1), the velocities doesn't correspond to the initial state (easy to see when starting from rest, velocities in output.ini.nc are not zero)

Analysis

diawri_state is called inside dia_wri so writes the now time step (Nnn). Velocities at time step now are corrected in dynspg_ts so doesn't correspond to the initial state anymore

Recommendation

Inside dia_wri, call diawri_state with before time step as argument : mod(kmm+1,3)+1 should do it
If assigned to me, I can do it ...

Commit History (0)

(No commits)

Change History (3)

comment:1 Changed 4 years ago by smasson

  • Owner changed from systeam to rblod
  • Status changed from new to assigned

enjoy!

comment:2 Changed 4 years ago by jchanut

you can also simply revert to correct initial barotropic velocities before writing:

      DO jk = 1, jpkm1
         puu(:,:,jk,Kmm) = ( puu(:,:,jk,Kmm) - un_adv(:,:)*r1_hu(:,:,Kmm) + puu_b(:,:,Kmm) ) * umask(:,:,jk)
         pvv(:,:,jk,Kmm) = ( pvv(:,:,jk,Kmm) - vn_adv(:,:)*r1_hv(:,:,Kmm) + pvv_b(:,:,Kmm) ) * vmask(:,:,jk)
      END DO

comment:3 Changed 4 years ago by clem

This is also the case for sea-ice. It writes the state of sea ice at the end of the 1st time step...

Note: See TracTickets for help on using tickets.