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.
Changeset 12574 for NEMO/branches/UKMO/NEMO_4.0.1_GO8_package/src/OCE/IOM/restart.F90 – NEMO

Ignore:
Timestamp:
2020-03-19T15:52:52+01:00 (4 years ago)
Author:
cguiavarch
Message:

Add Equation of State tag to salinity and temperature outputs and cell_methods attribute for mean_nemo (mean_nemo_wrapper not needed anymore)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/NEMO_4.0.1_GO8_package/src/OCE/IOM/restart.F90

    r11717 r12574  
    184184                  END IF 
    185185      ENDIF 
     186                     CALL iom_rstput( kt, nitrst, numrow, 'neos'    , REAL(neos)      , ldxios = lwxios)   ! equation of state 
     187                     !CALL iom_rstput( kt, nitrst, numrow, 'neos'    , neos      , ktype = jp_i1, ldxios = lwxios)   ! equation of state 
     188 
    186189       
    187190      IF (ln_diurnal) CALL iom_rstput( kt, nitrst, numrow, 'Dsst', x_dsst, ldxios = lwxios )   
     
    260263      !!---------------------------------------------------------------------- 
    261264      REAL(wp) ::   zrdt 
     265      REAL(wp) ::   zeos 
    262266      INTEGER  ::   jk 
    263267      REAL(wp), DIMENSION(jpi, jpj, jpk) :: w3d 
     
    266270      CALL rst_read_open           ! open restart for reading (if not already opened) 
    267271 
     272      IF ( ln_rst_eos ) THEN 
     273         ! Check equation of state used is consistent with the restart 
     274         IF( iom_varid( numror, 'neos') == -1) THEN 
     275            CALL ctl_stop( 'restart, rst_read: variable neos not found. STOP check that the equations of state in the restart file and in the namelist nameos are consistent and use ln_rst_eos=F') 
     276         ELSE 
     277            CALL iom_get( numror, 'neos', zeos, ldxios = lrxios ) 
     278            IF ( INT(zeos) /= neos ) CALL ctl_stop( 'restart, rst_read: equation of state used in restart file differs from namelist nameos') 
     279         ENDIF 
     280      ENDIF 
     281 
    268282      ! Check dynamics and tracer time-step consistency and force Euler restart if changed 
    269       IF( iom_varid( numror, 'rdt', ldstop = .FALSE. ) > 0 )   THEN 
     283      IF( iom_varid( numror, 'rdt', ldstop = .FALSE. ) > 0 )   THEN  
    270284         CALL iom_get( numror, 'rdt', zrdt, ldxios = lrxios ) 
    271285         IF( zrdt /= rdt )   neuler = 0 
Note: See TracChangeset for help on using the changeset viewer.