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 14644 for NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/tests/STATION_ASF/MY_SRC – NEMO

Ignore:
Timestamp:
2021-03-26T15:33:49+01:00 (3 years ago)
Author:
sparonuz
Message:

Merge trunk -r14642:HEAD

Location:
NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final

    • Property svn:externals
      •  

        old new  
        99 
        1010# SETTE 
        11 ^/utils/CI/sette_wave@13990         sette 
         11^/utils/CI/sette@14244        sette 
  • NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/tests/STATION_ASF/MY_SRC/diawri.F90

    r14072 r14644  
    6363CONTAINS 
    6464 
    65 #if defined key_iomput 
    66    !!---------------------------------------------------------------------- 
    67    !!   'key_iomput'                                        use IOM library 
     65#if defined key_xios 
     66   !!---------------------------------------------------------------------- 
     67   !!   'key_xios'                                        use IOM library 
    6868   !!---------------------------------------------------------------------- 
    6969   INTEGER FUNCTION dia_wri_alloc() 
  • NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/tests/STATION_ASF/MY_SRC/icesbc.F90

    r14072 r14644  
    9191         vtau_ice(ji,jj) = vtau_ice(ji,jj) * xcplmask(ji,jj,0) + zvtau_ice(ji,jj) * ( 1. - xcplmask(ji,jj,0) ) 
    9292         END_2D 
    93          CALL lbc_lnk_multi( 'icesbc', utau_ice, 'U', -1.0_wp, vtau_ice, 'V', -1.0_wp ) 
     93         CALL lbc_lnk( 'icesbc', utau_ice, 'U', -1.0_wp, vtau_ice, 'V', -1.0_wp ) 
    9494      ENDIF 
    9595      ! 
  • NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/tests/STATION_ASF/MY_SRC/nemogcm.F90

    r14072 r14644  
    3434   USE mppini         ! shared/distributed memory setting (mpp_init routine) 
    3535   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 
    36 #if defined key_iomput 
     36#if defined key_xios 
    3737   USE xios           ! xIOserver 
    3838#endif 
     
    4646   CHARACTER(lc) ::   cform_aaa="( /, 'AAAAAAAA', / ) "     ! flag for output listing 
    4747 
    48 #if defined key_mpp_mpi 
     48#if ! defined key_mpi_off 
    4949   ! need MPI_Wtime 
    5050   INCLUDE 'mpif.h' 
     
    113113      CALL nemo_closefile 
    114114      ! 
    115 #if defined key_iomput 
     115#if defined key_xios 
    116116      CALL xios_finalize  ! end mpp communications with xios 
    117117#else 
     
    148148      !                             !-------------------------------------------------! 
    149149      ! 
    150 #if defined key_iomput 
     150#if defined key_xios 
    151151      IF( Agrif_Root() ) THEN 
    152152         CALL xios_initialize( "for_xios_mpi_id", return_comm=ilocal_comm )   ! nemo local communicator given by xios 
     
    243243      ! 
    244244      IF( ln_read_cfg ) THEN            ! Read sizes in domain configuration file 
    245          CALL domain_cfg ( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, jperio ) 
     245         CALL domain_cfg ( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, l_Iperio, l_Jperio, l_NFold, c_NFtype ) 
    246246      ELSE                              ! user-defined namelist 
    247          CALL usr_def_nam( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, jperio ) 
     247         CALL usr_def_nam( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, l_Iperio, l_Jperio, l_NFold, c_NFtype ) 
    248248      ENDIF 
    249249      ! 
     
    373373      !!                     ***  ROUTINE nemo_alloc  *** 
    374374      !! 
    375       !! ** Purpose :   Allocate all the dynamic arrays of the OPA modules 
     375      !! ** Purpose :   Allocate all the dynamic arrays of the OCE modules 
    376376      !! 
    377377      !! ** Method  : 
  • NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/tests/STATION_ASF/MY_SRC/step_c1d.F90

    r14072 r14644  
    3636      !! 
    3737      !! ** Purpose :  - Time stepping of SBC including sea ice (dynamic and thermodynamic eqs.) 
    38       !!               - Time stepping of OPA (momentum and active tracer eqs.) 
     38      !!               - Time stepping of OCE (momentum and active tracer eqs.) 
    3939      !!               - Time stepping of TOP (passive tracer eqs.) 
    4040      !! 
     
    7979      IF( lrst_oce       )   CALL rst_write( kstp, Nbb, Nnn )  ! write output ocean restart file 
    8080      ! 
    81 #if defined key_iomput 
     81#if defined key_xios 
    8282      IF( kstp == nitend .OR. nstop > 0 )   CALL xios_context_finalize()   ! needed for XIOS 
    8383      ! 
  • NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/tests/STATION_ASF/MY_SRC/stpctl.F90

    r14072 r14644  
    3131   PUBLIC stp_ctl           ! routine called by step.F90 
    3232 
    33    INTEGER                ::   nrunid   ! netcdf file id 
    34    INTEGER, DIMENSION(3)  ::   nvarid   ! netcdf variable id 
     33   INTEGER, PARAMETER         ::   jpvar = 3 
     34   INTEGER                    ::   nrunid   ! netcdf file id 
     35   INTEGER, DIMENSION(jpvar)  ::   nvarid   ! netcdf variable id 
    3536   !!---------------------------------------------------------------------- 
    3637   !! NEMO/SAS 4.0 , NEMO Consortium (2018) 
     
    5960      INTEGER, INTENT(in   ) ::   Kmm      ! ocean time level index 
    6061      !! 
     62      INTEGER, PARAMETER              ::   jptst = 3 
    6163      INTEGER                         ::   ji                                    ! dummy loop indices 
    6264      INTEGER                         ::   idtime, istatus 
    63       INTEGER , DIMENSION(4)          ::   iareasum, iareamin, iareamax 
    64       INTEGER , DIMENSION(3,3)        ::   iloc                                  ! min/max loc indices 
    65       REAL(wp)                        ::   zzz                                   ! local real 
    66       REAL(wp), DIMENSION(4)          ::   zmax, zmaxlocal 
     65      INTEGER , DIMENSION(jptst)      ::   iareasum, iareamin, iareamax 
     66      INTEGER , DIMENSION(3,jptst)    ::   iloc                                  ! min/max loc indices 
     67      REAL(wp)                        ::   zzz                                   ! local real  
     68      REAL(wp), DIMENSION(jpvar+1)    ::   zmax 
     69      REAL(wp), DIMENSION(jptst)      ::   zmaxlocal 
    6770      LOGICAL                         ::   ll_wrtstp, ll_colruns, ll_wrtruns, ll_0oce 
    6871      LOGICAL, DIMENSION(jpi,jpj)     ::   llmsk 
     
    110113      !                                   !==  done by all processes at every time step  ==! 
    111114      ! 
    112       llmsk(   1:Nis1,:) = .FALSE.                                              ! exclude halos from the checked region 
    113       llmsk(Nie1: jpi,:) = .FALSE. 
    114       llmsk(:,   1:Njs1) = .FALSE. 
    115       llmsk(:,Nje1: jpj) = .FALSE. 
     115      llmsk(     1:nn_hls,:) = .FALSE.                                          ! exclude halos from the checked region 
     116      llmsk(Nie0+1:  jpi,:) = .FALSE. 
     117      llmsk(:,     1:nn_hls) = .FALSE. 
     118      llmsk(:,Nje0+1:  jpj) = .FALSE. 
    116119      ! 
    117120      llmsk(Nis0:Nie0,Njs0:Nje0) = tmask(Nis0:Nie0,Njs0:Nje0,1) == 1._wp        ! test only the inner domain 
     
    122125      zmax(2) = MAXVAL( ABS( qns(:,:) ), mask = llmsk )                         ! max non-solar heat flux 
    123126      zmax(3) = MAXVAL( ABS( emp(:,:) ), mask = llmsk )                         ! max E-P 
    124       zmax(4) = REAL( nstop, wp )                                               ! stop indicator 
     127      zmax(jpvar+1) = REAL( nstop, wp )                                         ! stop indicator 
    125128      ! 
    126129      !                                   !==               get global extrema             ==! 
    127130      !                                   !==  done by all processes if writting run.stat  ==! 
    128131      IF( ll_colruns ) THEN 
    129          zmaxlocal(:) = zmax(:) 
    130          CALL mpp_max( "stpctl", zmax )          ! max over the global domain 
    131          nstop = NINT( zmax(4) )                 ! update nstop indicator (now sheared among all local domains) 
     132         zmaxlocal(:) = zmax(1:jptst) 
     133         CALL mpp_max( "stpctl", zmax )          ! max over the global domain: ok even of ll_0oce = .true. 
     134         nstop = NINT( zmax(jpvar+1) )           ! update nstop indicator (now sheared among all local domains) 
    132135      ELSE 
    133136         ! if no ocean point: MAXVAL returns -HUGE => we must overwrite this value to avoid error handling bellow. 
    134          IF( ll_0oce )   zmax(1:3) = 0._wp       ! default "valid" values... 
    135       ENDIF 
    136       !                                   !==               error handling               ==! 
     137         IF( ll_0oce )   zmax(1:jptst) = 0._wp        ! default "valid" values... 
     138      ENDIF 
    137139      !                                   !==              write "run.stat" files              ==! 
    138140      !                                   !==  done only by 1st subdomain at writting timestep  ==! 
    139141      IF( ll_wrtruns ) THEN 
    140          WRITE(numrun,9500) kt, zmax(1), zmax(2), zmax(3) 
    141          DO ji = 1, 3 
     142         WRITE(numrun,9500) kt, zmax(1:jptst) 
     143         DO ji = 1, jpvar 
    142144            istatus = NF90_PUT_VAR( nrunid, nvarid(ji), (/zmax(ji)/), (/kt/), (/1/) ) 
    143145         END DO 
    144          IF( kt == nitend ) istatus = NF90_CLOSE(nrunid) 
     146         IF( kt == nitend )   istatus = NF90_CLOSE(nrunid) 
    145147      END IF 
    146148      !                                   !==               error handling               ==! 
    147149      !                                   !==  done by all processes at every time step  ==! 
    148150      ! 
    149       IF(   zmax(1) >    5._wp .OR.   &                   ! too large wind stress         ( > 5 N/m^2 ) 
    150          &  zmax(2) > 2000._wp .OR.   &                   ! too large non-solar heat flux ( > 2000 W/m^2 ) 
    151          &  zmax(3) > 1.E-3_wp .OR.   &                   ! too large net freshwater flux ( > 1.E-3 kg/m^2/s ) 
    152          &  ISNAN( zmax(1) + zmax(2) + zmax(3) ) .OR.   &               ! NaN encounter in the tests 
    153          &  ABS(   zmax(1) + zmax(2) + zmax(3) ) > HUGE(1._wp) ) THEN   ! Infinity encounter in the tests 
     151      IF(   zmax(1) >    5._wp .OR.   &                       ! too large wind stress         ( > 5 N/m^2 ) 
     152         &  zmax(2) > 2000._wp .OR.   &                       ! too large non-solar heat flux ( > 2000 W/m^2 ) 
     153         &  zmax(3) > 1.E-3_wp .OR.   &                       ! too large net freshwater flux ( > 1.E-3 kg/m^2/s ) 
     154         & ISNAN( SUM(zmax(1:jptst)) ) .OR.   &               ! NaN encounter in the tests 
     155         & ABS(   SUM(zmax(1:jptst)) ) > HUGE(1._wp) ) THEN   ! Infinity encounter in the tests 
    154156         ! 
    155157         iloc(:,:) = 0 
     
    163165            ! find which subdomain has the max. 
    164166            iareamin(:) = jpnij+1   ;   iareamax(:) = 0   ;   iareasum(:) = 0 
    165             DO ji = 1, 4 
     167            DO ji = 1, jptst 
    166168               IF( zmaxlocal(ji) == zmax(ji) ) THEN 
    167169                  iareamin(ji) = narea   ;   iareamax(ji) = narea   ;   iareasum(ji) = 1 
     
    176178            iloc(1:2,2) = MAXLOC( ABS( qns(:,:) ), mask = llmsk ) 
    177179            iloc(1:2,3) = MINLOC( ABS( emp(:,:) ), mask = llmsk ) 
    178             DO ji = 1, 3   ! local domain indices ==> global domain indices, excluding halos 
     180            DO ji = 1, jptst   ! local domain indices ==> global domain indices, excluding halos 
    179181               iloc(1:2,ji) = (/ mig0(iloc(1,ji)), mjg0(iloc(2,ji)) /) 
    180182            END DO 
     
    195197         ! 
    196198         IF( ll_colruns .OR. jpnij == 1 ) THEN   ! all processes synchronized -> use lwp to print in opened ocean.output files 
    197             IF(lwp) THEN 
    198                CALL ctl_stop( ctmp1, ' ', ctmp2, ctmp3, ctmp4, ctmp5, ' ', ctmp6 ) 
    199             ELSE 
    200                nstop = MAX(1, nstop)   ! make sure nstop > 0 (automatically done when calling ctl_stop) 
     199            IF(lwp) THEN   ;   CALL ctl_stop( ctmp1, ' ', ctmp2, ctmp3, ctmp4, ctmp5, ' ', ctmp6 ) 
     200            ELSE           ;   nstop = MAX(1, nstop)   ! make sure nstop > 0 (automatically done when calling ctl_stop) 
    201201            ENDIF 
    202202         ELSE                                    ! only mpi subdomains with errors are here -> STOP now 
     
    239239 
    240240      WRITE(clfmt, '(i1)') INT(LOG10(REAL(jpnij  ,wp))) + 1     ! how many digits to we need to write ? (we decide max = 9) 
    241 !!! WRITE(clsum, '(i'//clfmt//')') ksum                   ! this is creating a compilation error with AGRIF 
     241      !!! WRITE(clsum, '(i'//clfmt//')') ksum                   ! this is creating a compilation error with AGRIF 
    242242      cl4 = '(i'//clfmt//')'   ;   WRITE(clsum, cl4) ksum 
    243243      WRITE(clfmt, '(i1)') INT(LOG10(REAL(MAX(1,jpnij-1),wp))) + 1    ! how many digits to we need to write ? (we decide max = 9) 
    244244      cl4 = '(i'//clfmt//')'   ;   WRITE(clmin, cl4) kmin-1 
    245       WRITE(clmax, cl4) kmax-1 
     245                                   WRITE(clmax, cl4) kmax-1 
    246246      ! 
    247247      WRITE(clfmt, '(i1)') INT(LOG10(REAL(jpiglo,wp))) + 1      ! how many digits to we need to write jpiglo? (we decide max = 9) 
     
    259259      ELSE 
    260260         WRITE(clfmt, '(i1)') INT(LOG10(REAL(jpk,wp))) + 1      ! how many digits to we need to write jpk? (we decide max = 9) 
    261 !!! WRITE(clk, '(i'//clfmt//')') kloc(3)               ! this is creating a compilation error with AGRIF 
     261         !!! WRITE(clk, '(i'//clfmt//')') kloc(3)               ! this is creating a compilation error with AGRIF 
    262262         cl4 = '(i'//clfmt//')'   ;   WRITE(clk, cl4) kloc(3)   ! this is ok with AGRIF 
    263263         WRITE(cdline,9400) TRIM(ADJUSTL(clkt)), TRIM(ADJUSTL(cdprefix)), pval, TRIM(cli), TRIM(clj),    TRIM(clk), TRIM(clsuff) 
  • NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/tests/STATION_ASF/MY_SRC/usrdef_nam.F90

    r14072 r14644  
    3737CONTAINS 
    3838 
    39    SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     39   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 
    4040      !!---------------------------------------------------------------------- 
    4141      !!                     ***  ROUTINE dom_nam  *** 
     
    4949      !! ** input   : - namusr_def namelist found in namelist_cfg 
    5050      !!---------------------------------------------------------------------- 
    51       CHARACTER(len=*), INTENT(out) ::   cd_cfg          ! configuration name 
    52       INTEGER         , INTENT(out) ::   kk_cfg          ! configuration resolution 
    53       INTEGER         , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes 
    54       INTEGER         , INTENT(out) ::   kperio          ! lateral global domain b.c. 
     51      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name 
     52      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution 
     53      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes 
     54      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity 
     55      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding 
     56      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F 
    5557      ! 
    5658      INTEGER ::   ios   ! Local integer 
     
    7375      ! 
    7476      !                             ! Set the lateral boundary condition of the global domain 
    75       kperio =  7                   ! C1D configuration : 3x3 basin with cyclic Est-West and Norht-South condition 
     77      ldIperio = .TRUE.    ;   ldJperio = .true.   ! C1D configuration : 3x3 basin with cyclic Est-West and Norht-South condition 
     78      ldNFold  = .FALSE.   ;   cdNFtype = '-' 
    7679      ! 
    7780      !                             ! control print 
     
    8588         WRITE(numout,*) '      number of model levels                              kpk = ', kpk 
    8689         WRITE(numout,*) '   ' 
    87          WRITE(numout,*) '   Lateral b.c. of the domain set to       jperio = ', kperio 
    8890      ENDIF 
    8991      ! 
Note: See TracChangeset for help on using the changeset viewer.