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 13151 for NEMO/branches/2020/dev_r12527_Gurvan_ShallowWater/src/SAS/diawri.F90 – NEMO

Ignore:
Timestamp:
2020-06-24T14:38:26+02:00 (4 years ago)
Author:
gm
Message:

result from merge with qco r12983

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r12527_Gurvan_ShallowWater/src/SAS/diawri.F90

    r12489 r13151  
    9999      ! Output the initial state and forcings 
    100100      IF( ninist == 1 ) THEN 
    101          CALL dia_wri_state( 'output.init', Kmm ) 
     101         CALL dia_wri_state( Kmm, 'output.init' ) 
    102102         ninist = 0 
    103103      ENDIF 
     
    126126   END FUNCTION dia_wri_alloc_abl 
    127127   
    128    SUBROUTINE dia_wri( kt ) 
     128   SUBROUTINE dia_wri( kt, Kmm ) 
    129129      !!--------------------------------------------------------------------- 
    130130      !!                  ***  ROUTINE dia_wri  *** 
     
    140140      !! 
    141141      INTEGER, INTENT( in ) ::   kt      ! ocean time-step index 
     142      INTEGER, INTENT( in ) ::   Kmm  ! ocean time level index 
    142143      !! 
    143144      LOGICAL ::   ll_print = .FALSE.                        ! =T print and flush numout 
     
    154155      ! Output the initial state and forcings 
    155156      IF( ninist == 1 ) THEN                        
    156          CALL dia_wri_state( 'output.init' ) 
     157         CALL dia_wri_state( Kmm, 'output.init' ) 
    157158         ninist = 0 
    158159      ENDIF 
     
    257258         IF( ln_abl ) THEN  
    258259         ! Define the ABL grid FILE ( nid_A ) 
    259             CALL dia_nam( clhstnam, nwrite, 'grid_ABL' ) 
     260            CALL dia_nam( clhstnam, nn_write, 'grid_ABL' ) 
    260261            IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam    ! filename 
    261262            CALL histbeg( clhstnam, jpi, glamt, jpj, gphit,           &  ! Horizontal grid: glamt and gphit 
     
    414415#endif 
    415416 
    416    SUBROUTINE dia_wri_state( cdfile_name, Kmm ) 
     417   SUBROUTINE dia_wri_state( Kmm, cdfile_name ) 
    417418      !!--------------------------------------------------------------------- 
    418419      !!                 ***  ROUTINE dia_wri_state  *** 
     
    427428      !!      File 'output.abort.nc' is created in case of abnormal job end 
    428429      !!---------------------------------------------------------------------- 
     430      INTEGER           , INTENT( in ) ::   Kmm              ! ocean time levelindex 
    429431      CHARACTER (len=* ), INTENT( in ) ::   cdfile_name      ! name of the file created 
    430       INTEGER           , INTENT( in ) ::   Kmm              ! ocean time levelindex 
    431432      !! 
    432433      INTEGER :: inum 
     
    437438      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~   and forcing fields file created ' 
    438439      IF(lwp) WRITE(numout,*) '                and named :', cdfile_name, '...nc' 
    439  
    440 #if defined key_si3 
    441      CALL iom_open( TRIM(cdfile_name), inum, ldwrt = .TRUE., kdlev = jpl ) 
    442 #else 
    443      CALL iom_open( TRIM(cdfile_name), inum, ldwrt = .TRUE. ) 
    444 #endif 
    445  
     440      ! 
     441      CALL iom_open( TRIM(cdfile_name), inum, ldwrt = .TRUE. ) 
     442      ! 
    446443      CALL iom_rstput( 0, 0, inum, 'votemper', ts (:,:,:,jp_tem,Kmm) )    ! now temperature 
    447444      CALL iom_rstput( 0, 0, inum, 'vosaline', ts (:,:,:,jp_sal,Kmm) )    ! now salinity 
     
    456453      CALL iom_rstput( 0, 0, inum, 'sozotaux', utau                  )    ! i-wind stress 
    457454      CALL iom_rstput( 0, 0, inum, 'sometauy', vtau                  )    ! j-wind stress 
    458   
     455      ! 
     456      CALL iom_close( inum ) 
     457      ! 
    459458#if defined key_si3 
    460459      IF( nn_ice == 2 ) THEN   ! condition needed in case agrif + ice-model but no-ice in child grid 
     460         CALL iom_open( TRIM(cdfile_name)//'_ice', inum, ldwrt = .TRUE., kdlev = jpl, cdcomp = 'ICE' ) 
    461461         CALL ice_wri_state( inum ) 
    462       ENDIF 
    463 #endif 
    464       ! 
    465       CALL iom_close( inum ) 
    466       ! 
     462         CALL iom_close( inum ) 
     463      ENDIF 
     464#endif 
     465 
    467466   END SUBROUTINE dia_wri_state 
    468467 
Note: See TracChangeset for help on using the changeset viewer.