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 9802 for NEMO/trunk – NEMO

Changeset 9802 for NEMO/trunk


Ignore:
Timestamp:
2018-06-15T11:47:25+02:00 (6 years ago)
Author:
smasson
Message:

trunk: put back data in outputs file for e-w periodicity, see #2100

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OCE/IOM/iom.F90

    r9598 r9802  
    8080      MODULE PROCEDURE iom_rp0d, iom_rp1d, iom_rp2d, iom_rp3d 
    8181   END INTERFACE 
    82   INTERFACE iom_put 
    83      MODULE PROCEDURE iom_p0d, iom_p1d, iom_p2d, iom_p3d 
    84   END INTERFACE 
    85  
     82   INTERFACE iom_put 
     83      MODULE PROCEDURE iom_p0d, iom_p1d, iom_p2d, iom_p3d 
     84   END INTERFACE iom_put 
     85    
     86   LOGICAL, PARAMETER ::   ltmppatch = .TRUE.     !: seb: patch before we remove periodicity 
     87   INTEGER            ::   nldi_save, nlei_save   !:      and close boundaries in output files 
     88   INTEGER            ::   nldj_save, nlej_save   !: 
     89   
    8690   !!---------------------------------------------------------------------- 
    8791   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     
    110114      REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zt_bnds, zw_bnds 
    111115      !!---------------------------------------------------------------------- 
     116      ! 
     117      ! seb: patch before we remove periodicity and close boundaries in output files 
     118      IF ( ltmppatch ) THEN 
     119         nldi_save = nldi   ;   nlei_save = nlei 
     120         nldj_save = nldj   ;   nlej_save = nlej 
     121         IF( nimpp           ==      1 ) nldi = 1 
     122         IF( nimpp + jpi - 1 == jpiglo ) nlei = jpi 
     123         IF( njmpp           ==      1 ) nldj = 1 
     124         IF( njmpp + jpj - 1 == jpjglo ) nlej = jpj 
     125      ENDIF 
    112126      ! 
    113127      ALLOCATE( zt_bnds(2,jpk), zw_bnds(2,jpk) ) 
     
    232246      DEALLOCATE( zt_bnds, zw_bnds ) 
    233247      ! 
     248      IF ( ltmppatch ) THEN 
     249         nldi = nldi_save   ;   nlei = nlei_save 
     250         nldj = nldj_save   ;   nlej = nlej_save 
     251      ENDIF 
    234252#endif 
    235253      ! 
     
    17371755#if defined key_iomput 
    17381756   !!---------------------------------------------------------------------- 
    1739    !!   'key_iomput'                                         IOM interface 
     1757   !!   'key_iomput'                                         XIOS interface 
    17401758   !!---------------------------------------------------------------------- 
    17411759 
     
    19061924      !!---------------------------------------------------------------------- 
    19071925      ! 
     1926      ! seb: patch before we remove periodicity and close boundaries in output files 
     1927      IF ( ltmppatch ) THEN 
     1928         nldi_save = nldi   ;   nlei_save = nlei 
     1929         nldj_save = nldj   ;   nlej_save = nlej 
     1930         IF( nimpp           ==      1 ) nldi = 1 
     1931         IF( nimpp + jpi - 1 == jpiglo ) nlei = jpi 
     1932         IF( njmpp           ==      1 ) nldj = 1 
     1933         IF( njmpp + jpj - 1 == jpjglo ) nlej = jpj 
     1934      ENDIF 
     1935      ! 
    19081936      ni = nlei-nldi+1 
    19091937      nj = nlej-nldj+1 
     
    19271955      ENDIF 
    19281956      ! 
     1957      IF ( ltmppatch ) THEN 
     1958         nldi = nldi_save   ;   nlei = nlei_save 
     1959         nldj = nldj_save   ;   nlej = nlej_save 
     1960      ENDIF 
     1961      ! 
    19291962   END SUBROUTINE set_grid 
    19301963 
     
    19481981      REAL(wp), ALLOCATABLE, DIMENSION(:,:)     :: z_rot       ! Lat/lon working array for rotation of cells 
    19491982      !!---------------------------------------------------------------------- 
     1983      ! 
     1984      ! seb: patch before we remove periodicity and close boundaries in output files 
     1985      IF ( ltmppatch ) THEN 
     1986         nldi_save = nldi   ;   nlei_save = nlei 
     1987         nldj_save = nldj   ;   nlej_save = nlej 
     1988         IF( nimpp           ==      1 ) nldi = 1 
     1989         IF( nimpp + jpi - 1 == jpiglo ) nlei = jpi 
     1990         IF( njmpp           ==      1 ) nldj = 1 
     1991         IF( njmpp + jpj - 1 == jpjglo ) nlej = jpj 
     1992      ENDIF 
    19501993      ! 
    19511994      ALLOCATE( z_bnds(4,jpi,jpj,2), z_fld(jpi,jpj), z_rot(4,2)  ) 
     
    20322075      DEALLOCATE( z_bnds, z_fld, z_rot )  
    20332076      ! 
     2077      IF ( ltmppatch ) THEN 
     2078         nldi = nldi_save   ;   nlei = nlei_save 
     2079         nldj = nldj_save   ;   nlej = nlej_save 
     2080      ENDIF 
     2081      ! 
    20342082   END SUBROUTINE set_grid_bounds 
    20352083 
     
    20472095      REAL(wp), DIMENSION(:), ALLOCATABLE  ::   zlon 
    20482096      !!---------------------------------------------------------------------- 
     2097      ! 
     2098      ! seb: patch before we remove periodicity and close boundaries in output files 
     2099      IF ( ltmppatch ) THEN 
     2100         nldi_save = nldi   ;   nlei_save = nlei 
     2101         nldj_save = nldj   ;   nlej_save = nlej 
     2102         IF( nimpp           ==      1 ) nldi = 1 
     2103         IF( nimpp + jpi - 1 == jpiglo ) nlei = jpi 
     2104         IF( njmpp           ==      1 ) nldj = 1 
     2105         IF( njmpp + jpj - 1 == jpjglo ) nlej = jpj 
     2106      ENDIF 
    20492107      ! 
    20502108      ni=nlei-nldi+1       ! define zonal mean domain (jpj*jpk) 
     
    20612119      ! 
    20622120      CALL iom_update_file_name('ptr') 
     2121      ! 
     2122      IF ( ltmppatch ) THEN 
     2123         nldi = nldi_save   ;   nlei = nlei_save 
     2124         nldj = nldj_save   ;   nlej = nlej_save 
     2125      ENDIF 
    20632126      ! 
    20642127   END SUBROUTINE set_grid_znl 
Note: See TracChangeset for help on using the changeset viewer.