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 14770 – NEMO

Changeset 14770


Ignore:
Timestamp:
2021-04-30T12:05:23+02:00 (3 years ago)
Author:
mcastril
Message:

[DiagGPU] Update with trunk

Location:
NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests
Files:
18 deleted
104 edited
26 copied

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/BENCH/EXPREF/namelist_cfg_orca025_like

    r13461 r14770  
    1818   nn_jsize   =   1206  !!  1049    ! number of point in j-direction of global(local) domain if >0 (<0)   
    1919   nn_ksize   =   75       ! total number of point in k-direction 
    20    nn_perio   =   4        ! periodicity 
    21 / 
    22 !----------------------------------------------------------------------- 
    23 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi") 
     20   ln_Iperio  =   .true.   ! i-periodicity 
     21   ln_Jperio  =  .false.   ! j-periodicity 
     22   ln_NFold   =   .true.   ! North pole folding 
     23      cn_NFtype   =   'T'  ! Folding type: T or F 
     24/ 
     25!----------------------------------------------------------------------- 
     26&nammpp        !   Massively Parallel Processing 
    2427!----------------------------------------------------------------------- 
    2528   ln_nnogather=  .true.   !  activate code to avoid mpi_allgather use at the northfold 
     
    178181!----------------------------------------------------------------------- 
    179182   ln_dynvor_een = .true. !  energy & enstrophy scheme 
    180       nn_een_e3f = 0          ! =0  e3f = mi(mj(e3t))/4  
    181       !                       ! =1  e3f = mi(mj(e3t))/mi(mj( tmask)) 
     183   nn_e3f_typ = 0         ! =0  e3f = mi(mj(e3t))/4  
     184   !                      ! =1  e3f = mi(mj(e3t))/mi(mj( tmask)) 
    182185/ 
    183186!----------------------------------------------------------------------- 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/BENCH/EXPREF/namelist_cfg_orca12_like

    r13461 r14770  
    1818   nn_jsize   =   3146     ! number of point in j-direction of global(local) domain if >0 (<0)   
    1919   nn_ksize   =   75       ! total number of point in k-direction 
    20    nn_perio   =   4        ! periodicity 
    21 / 
    22 !----------------------------------------------------------------------- 
    23 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi") 
     20   ln_Iperio  =   .true.   ! i-periodicity 
     21   ln_Jperio  =  .false.   ! j-periodicity 
     22   ln_NFold   =   .true.   ! North pole folding 
     23      cn_NFtype   =   'T'  ! Folding type: T or F 
     24/ 
     25!----------------------------------------------------------------------- 
     26&nammpp        !   Massively Parallel Processing 
    2427!----------------------------------------------------------------------- 
    2528   ln_nnogather=  .true.   !  activate code to avoid mpi_allgather use at the northfold 
     
    177180!----------------------------------------------------------------------- 
    178181   ln_dynvor_een = .true. !  energy & enstrophy scheme 
    179       nn_een_e3f = 0          ! =0  e3f = mi(mj(e3t))/4  
     182      nn_e3f_typ = 0          ! =0  e3f = mi(mj(e3t))/4  
    180183      !                       ! =1  e3f = mi(mj(e3t))/mi(mj( tmask)) 
    181184/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/BENCH/EXPREF/namelist_cfg_orca1_like

    r13461 r14770  
    1818   nn_jsize   =   331      ! number of point in j-direction of global(local) domain if >0 (<0)   
    1919   nn_ksize   =   75       ! total number of point in k-direction 
    20    nn_perio   =   6        ! periodicity 
    21 / 
    22 !----------------------------------------------------------------------- 
    23 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi") 
     20   ln_Iperio  =   .true.   ! i-periodicity 
     21   ln_Jperio  =  .false.   ! j-periodicity 
     22   ln_NFold   =   .true.   ! North pole folding 
     23      cn_NFtype   =   'F'  ! Folding type: T or F 
     24/ 
     25!----------------------------------------------------------------------- 
     26&nammpp        !   Massively Parallel Processing 
    2427!----------------------------------------------------------------------- 
    2528   ln_nnogather=  .true.   !  activate code to avoid mpi_allgather use at the northfold 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/BENCH/MY_SRC/usrdef_hgr.F90

    r13295 r14770  
    7474      ! Position coordinates (in grid points) 
    7575      !                          ========== 
    76       DO_2D( 1, 1, 1, 1 ) 
     76      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    7777          
    78          zti = REAL( mig0_oldcmp(ji) - 1, wp )   ! start at i=0 in the global grid without halos 
    79          ztj = REAL( mjg0_oldcmp(jj) - 1, wp )   ! start at j=0 in the global grid without halos 
     78         zti = REAL( mig0(ji), wp ) - 0.5_wp  ! start at i=0.5 in the global grid without halos 
     79         ztj = REAL( mjg0(jj), wp ) - 0.5_wp  ! start at j=0.5 in the global grid without halos 
    8080          
    8181         plamt(ji,jj) = zti 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/BENCH/MY_SRC/usrdef_istate.F90

    r13295 r14770  
    2626   PRIVATE 
    2727 
    28    PUBLIC   usr_def_istate   ! called by istate.F90 
     28   PUBLIC   usr_def_istate       ! called by istate.F90 
     29   PUBLIC   usr_def_istate_ssh   ! called by domqco.F90 
    2930 
    3031   !! * Substitutions 
     
    3738CONTAINS 
    3839   
    39    SUBROUTINE usr_def_istate( pdept, ptmask, pts, pu, pv, pssh ) 
     40   SUBROUTINE usr_def_istate( pdept, ptmask, pts, pu, pv ) !!st, pssh ) 
    4041      !!---------------------------------------------------------------------- 
    4142      !!                   ***  ROUTINE usr_def_istate  *** 
     
    5253      REAL(wp), DIMENSION(jpi,jpj,jpk)     , INTENT(  out) ::   pu      ! i-component of the velocity  [m/s]  
    5354      REAL(wp), DIMENSION(jpi,jpj,jpk)     , INTENT(  out) ::   pv      ! j-component of the velocity  [m/s]  
    54       REAL(wp), DIMENSION(jpi,jpj)         , INTENT(  out) ::   pssh    ! sea-surface height 
    5555      ! 
    5656      REAL(wp), DIMENSION(jpi,jpj) ::   z2d   ! 2D workspace 
    5757      REAL(wp) ::   zfact 
    5858      INTEGER  ::   ji, jj, jk 
    59       INTEGER  ::   igloi, igloj   ! to be removed in the future, see comment bellow 
    6059      !!---------------------------------------------------------------------- 
    6160      ! 
     
    6665      ! define unique value on each point of the inner global domain. z2d ranging from 0.05 to -0.05 
    6766      ! 
    68       ! WARNING: to keep compatibility with the trunk that was including periodocity into the input data,  
    69       ! we must define z2d as bellow. 
    70       ! Once we decide to forget trunk compatibility, we must simply define z2d as: 
    71 !!$      DO_2D( 0, 0, 0, 0 ) 
    72 !!$         z2d(ji,jj) = 0.1 * ( 0.5 - REAL( mig0_oldcmp(ji) + (mjg0_oldcmp(jj)-1) * Ni0glo, wp ) / REAL( Ni0glo * Nj0glo, wp ) ) 
    73 !!$      END_2D 
    74       igloi = Ni0glo + 2 * COUNT( (/ jperio == 1 .OR. jperio == 4 .OR. jperio == 6 .OR. jperio == 7 /) ) 
    75       igloj = Nj0glo + 2 * COUNT( (/ jperio == 2 .OR. jperio == 7 /) ) + 1 * COUNT( (/ jperio >= 4 .AND. jperio <= 6 /) ) 
    76       DO_2D( 0, 0, 0, 0 ) 
    77          z2d(ji,jj) = 0.1 * ( 0.5 - REAL( mig0_oldcmp(ji) + (mjg0_oldcmp(jj)-1) * igloi, wp ) / REAL( igloi * igloj, wp ) ) 
     67      DO_2D( 0, 0, 0, 0 )   !  +/- 0.05 
     68         z2d(ji,jj) = 0.1 * ( 0.5 - REAL( mig0(ji) + (mjg0(jj)-1) * Ni0glo, wp ) / REAL( Ni0glo * Nj0glo, wp ) ) 
    7869      END_2D 
    79       ! 
    80       ! sea level: 
    81       pssh(:,:) = z2d(:,:)                                                ! +/- 0.05 m 
    8270      ! 
    8371      DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 
    8472         zfact = REAL(jk-1,wp) / REAL(jpk-1,wp)   ! 0 to 1 to add a basic stratification 
    8573         ! temperature choosen to lead to ~50% ice at the beginning if rn_thres_sst = 0.5 
    86          pts(:,:,jk,jp_tem) = 20._wp*z2d(:,:) - 1._wp - 0.5_wp * zfact    ! -1 to -1.5 +/-1.0 degG 
     74         pts(ji,jj,jk,jp_tem) = 20._wp*z2d(ji,jj) - 1._wp - 0.5_wp * zfact    ! -1 to -1.5 +/- 1.0 degG 
    8775         ! salinity:   
    88          pts(:,:,jk,jp_sal) = 30._wp + 1._wp * zfact + z2d(:,:)           ! 30 to 31 +/- 0.05 psu 
     76         pts(ji,jj,jk,jp_sal) = 30._wp + 1._wp * zfact + z2d(ji,jj)           ! 30 to 31  +/- 0.05 psu 
    8977         ! velocities: 
    90          pu(:,:,jk) = z2d(:,:) *  0.1_wp * umask(:,:,jk)                  ! +/- 0.005  m/s 
    91          pv(:,:,jk) = z2d(:,:) * 0.01_wp * vmask(:,:,jk)                  ! +/- 0.0005 m/s 
     78         pu(ji,jj,jk) = z2d(ji,jj) *  0.1_wp * umask(ji,jj,jk)                ! +/- 0.005  m/s 
     79         pv(ji,jj,jk) = z2d(ji,jj) * 0.01_wp * vmask(ji,jj,jk)                ! +/- 0.0005 m/s 
    9280      END_3D 
    9381      pts(:,:,jpk,:) = 0._wp 
     
    9583      pv( :,:,jpk  ) = 0._wp 
    9684      ! 
    97       CALL lbc_lnk('usrdef_istate', pssh, 'T',  1. )            ! apply boundary conditions 
    9885      CALL lbc_lnk('usrdef_istate',  pts, 'T',  1. )            ! apply boundary conditions 
    9986      CALL lbc_lnk('usrdef_istate',   pu, 'U', -1. )            ! apply boundary conditions 
     
    10289   END SUBROUTINE usr_def_istate 
    10390 
     91 
     92   SUBROUTINE usr_def_istate_ssh( ptmask, pssh ) 
     93      !!---------------------------------------------------------------------- 
     94      !!                   ***  ROUTINE usr_def_istate_ssh  *** 
     95      !!  
     96      !! ** Purpose :   Initialization of ssh 
     97      !!                Here BENCH configuration  
     98      !! 
     99      !! ** Method  :   Set ssh 
     100      !!---------------------------------------------------------------------- 
     101      REAL(wp), DIMENSION(jpi,jpj,jpk)     , INTENT(in   ) ::   ptmask  ! t-point ocean mask   [m] 
     102      REAL(wp), DIMENSION(jpi,jpj)         , INTENT(  out) ::   pssh    ! sea-surface height   [m] 
     103      ! 
     104      INTEGER  ::   ji, jj 
     105      !!---------------------------------------------------------------------- 
     106      ! 
     107      IF(lwp) WRITE(numout,*) 
     108      IF(lwp) WRITE(numout,*) 'usr_def_istate_ssh : BENCH configuration, analytical definition of initial ssh' 
     109      ! 
     110      DO_2D( 0, 0, 0, 0 )                              ! sea level:  +/- 0.05 m 
     111         pssh(ji,jj) = 0.1 * ( 0.5 - REAL( mig0(ji) + (mjg0(jj)-1) * Ni0glo, wp ) / REAL( Ni0glo * Nj0glo, wp ) ) 
     112      END_2D 
     113      ! 
     114      CALL lbc_lnk('usrdef_istate', pssh, 'T',  1. )   ! apply boundary conditions 
     115      ! 
     116   END SUBROUTINE usr_def_istate_ssh 
     117    
    104118   !!====================================================================== 
    105119END MODULE usrdef_istate 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/BENCH/MY_SRC/usrdef_nam.F90

    r13286 r14770  
    2929CONTAINS 
    3030 
    31    SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     31   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 
    3232      !!---------------------------------------------------------------------- 
    3333      !!                     ***  ROUTINE dom_nam  *** 
     
    4141      !! ** input   : - namusr_def namelist found in namelist_cfg 
    4242      !!---------------------------------------------------------------------- 
    43       CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    44       INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
    45       INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes  
    46       INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
    47       ! 
     43      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name 
     44      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution 
     45      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes  
     46      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity 
     47      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding 
     48      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F 
    4849      ! 
    4950      INTEGER ::   ios         ! Local integer 
     
    5253      INTEGER ::   nn_jsize    ! number of point in j-direction of global(local) domain if >0 (<0)   
    5354      INTEGER ::   nn_ksize    ! total number of point in k-direction 
    54       INTEGER ::   nn_perio    ! periodicity 
    5555      !                              !!* nammpp namelist *!! 
    5656      INTEGER          ::   jpni, jpnj 
    57       LOGICAL          ::   ln_nnogather, ln_listonly 
     57      LOGICAL          ::   ln_listonly 
     58      LOGICAL          ::   ln_Iperio, ln_Jperio 
     59      LOGICAL          ::   ln_NFold 
     60      character(len=1) ::   cn_NFtype 
    5861      !! 
    59       NAMELIST/namusr_def/ nn_isize, nn_jsize, nn_ksize, nn_perio 
    60       NAMELIST/nammpp/ jpni, jpnj, nn_hls, ln_nnogather, ln_listonly 
     62      NAMELIST/namusr_def/ nn_isize, nn_jsize, nn_ksize, ln_Iperio, ln_Jperio, ln_NFold, cn_NFtype 
     63      NAMELIST/nammpp/ jpni, jpnj, nn_hls, ln_nnogather, ln_listonly, nn_comm 
    6164      !!----------------------------------------------------------------------      
    6265      ! 
     
    8386         kpj = nn_jsize 
    8487      ENDIF 
     88      kpk = nn_ksize 
    8589      ! 
    86       kpk = nn_ksize 
    87       kperio = nn_perio 
     90      ldIperio = ln_Iperio   ;   ldJperio = ln_Jperio 
     91      ldNFold  = ln_NFold    ;   cdNFtype = cn_NFtype 
     92      ! 
    8893      !                             ! control print 
    8994      IF(lwp) THEN 
     
    107112         ENDIF 
    108113         WRITE(numout,*) '      global domain size-z            nn_ksize = ', nn_ksize 
    109          WRITE(numout,*) '      LBC of the global domain          kperio = ', kperio 
     114         WRITE(numout,*) '   ' 
    110115      ENDIF 
    111116      ! 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/BENCH/MY_SRC/usrdef_sbc.F90

    r13472 r14770  
    3030   PRIVATE 
    3131 
    32    PUBLIC   usrdef_sbc_oce      ! routine called in sbcmod module 
    33    PUBLIC   usrdef_sbc_ice_tau  ! routine called by sbcice_lim.F90 for ice dynamics 
    34    PUBLIC   usrdef_sbc_ice_flx  ! routine called by sbcice_lim.F90 for ice thermo 
     32   PUBLIC   usrdef_sbc_oce      ! routine called by sbcmod.F90 for sbc ocean 
     33   PUBLIC   usrdef_sbc_ice_tau  ! routine called by icestp.F90 for ice dynamics 
     34   PUBLIC   usrdef_sbc_ice_flx  ! routine called by icestp.F90 for ice thermo 
    3535 
    3636   !! * Substitutions 
     
    8383         ! 
    8484      ENDIF 
    85        
    8685      ! 
    8786   END SUBROUTINE usrdef_sbc_oce 
     
    9796      INTEGER, INTENT(in) ::   kt   ! ocean time step 
    9897      ! 
    99       REAL(wp), DIMENSION(jpi,jpj) ::   z2d   ! 2D workspace 
     98      REAL(wp) ::   zztmp 
    10099      INTEGER  ::   ji, jj 
    101       INTEGER  ::   igloi, igloj   ! to be removed in the future, see comment bellow 
    102100      !!--------------------------------------------------------------------- 
    103101#if defined key_si3 
     
    106104      ! define unique value on each point. z2d ranging from 0.05 to -0.05 
    107105      ! 
    108       ! WARNING: to keep compatibility with the trunk that was including periodocity into the input data,  
    109       ! we must define z2d as bellow. 
    110       ! Once we decide to forget trunk compatibility, we must simply define z2d as: 
    111 !!$      DO_2D( 0, 0, 0, 0 ) 
    112 !!$         z2d(ji,jj) = 0.1 * ( 0.5 - REAL( mig0_oldcmp(ji) + (mjg0_oldcmp(jj)-1) * Ni0glo, wp ) / REAL( Ni0glo * Nj0glo, wp ) ) 
    113 !!$      END_2D 
    114       igloi = Ni0glo + 2 * COUNT( (/ jperio == 1 .OR. jperio == 4 .OR. jperio == 6 .OR. jperio == 7 /) ) 
    115       igloj = Nj0glo + 2 * COUNT( (/ jperio == 2 .OR. jperio == 7 /) ) + 1 * COUNT( (/ jperio >= 4 .AND. jperio <= 6 /) ) 
    116106      DO_2D( 0, 0, 0, 0 ) 
    117          z2d(ji,jj) = 0.1 * ( 0.5 - REAL( mig0_oldcmp(ji) + (mjg0_oldcmp(jj)-1) * igloi, wp ) / REAL( igloi * igloj, wp ) ) 
     107         zztmp = 0.1 * ( 0.5 - REAL( mig0(ji) + (mjg0(jj)-1) * Ni0glo, wp ) / REAL( Ni0glo * Nj0glo, wp ) ) 
     108         utau_ice(ji,jj) = 0.1_wp + zztmp 
     109         vtau_ice(ji,jj) = 0.1_wp + zztmp 
    118110      END_2D 
    119       utau_ice(:,:) = 0.1_wp + z2d(:,:) 
    120       vtau_ice(:,:) = 0.1_wp + z2d(:,:) 
    121111 
    122       CALL lbc_lnk_multi( 'usrdef_sbc', utau_ice, 'U', -1., vtau_ice, 'V', -1. ) 
     112      CALL lbc_lnk( 'usrdef_sbc', utau_ice, 'U', -1., vtau_ice, 'V', -1. ) 
    123113#endif 
    124114      ! 
     
    130120      !!                     ***  ROUTINE usrdef_sbc_ice_flx  *** 
    131121      !! 
    132       !! ** Purpose :   provide the surface boundary (flux) condition over 
    133       !sea-ice 
     122      !! ** Purpose :   provide the surface boundary (flux) condition over sea-ice 
    134123      !!--------------------------------------------------------------------- 
    135124      INTEGER, INTENT(in) ::   kt   ! ocean time step 
     
    139128      REAL(wp), DIMENSION(jpi,jpj) ::   zsnw   ! snw distribution after wind blowing 
    140129      !!--------------------------------------------------------------------- 
     130#if defined key_si3 
    141131      ! 
    142 #if defined key_si3 
    143132      IF( kt==nit000 .AND. lwp)   WRITE(numout,*)' usrdef_sbc_ice : BENCH case: NO flux forcing' 
    144133      ! 
     
    146135      emp_oce (:,:)   = 0._wp   ! uniform value for freshwater budget (E-P) 
    147136      qsr_oce (:,:)   = 0._wp   ! uniform value for     solar radiation 
    148       qns_oce (:,:)   = 0._wp   ! uniform value for non-solar radiation 
     137      qns_oce (:,:)   = 0._wp   ! uniform value for non-solar heat flux 
    149138 
    150139      ! ice variables 
    151140      alb_ice (:,:,:) = 0.7_wp  ! useless 
    152141      qsr_ice (:,:,:) = 0._wp   ! uniform value for     solar radiation 
    153       qns_ice (:,:,:) = 0._wp   ! uniform value for non-solar radiation 
     142      qns_ice (:,:,:) = 0._wp   ! uniform value for non-solar heat flux 
     143      dqns_ice(:,:,:) = 0._wp   ! uniform value for non solar heat flux sensitivity for ice 
    154144      sprecip (:,:)   = 0._wp   ! uniform value for snow precip 
    155145      evap_ice(:,:,:) = 0._wp   ! uniform value for sublimation 
     
    157147      ! ice fields deduced from above 
    158148      zsnw(:,:) = 1._wp 
    159       !!CALL lim_thd_snwblow( at_i_b, zsnw )  ! snow distribution over ice after 
    160       !wind blowing  
     149      !!CALL lim_thd_snwblow( at_i_b, zsnw )  ! snow distribution over ice after wind blowing  
    161150      emp_ice  (:,:)   = SUM( a_i_b(:,:,:) * evap_ice(:,:,:), dim=3 ) - sprecip(:,:) * zsnw(:,:) 
    162151      emp_oce  (:,:)   = emp_oce(:,:) - sprecip(:,:) * (1._wp - zsnw(:,:) ) 
     
    173162      ! --- shortwave radiation transmitted thru the surface scattering layer (W/m2) --- ! 
    174163      qtr_ice_top(:,:,:) = 0._wp 
    175  
    176164#endif 
    177165 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/BENCH/MY_SRC/usrdef_zgr.F90

    r13286 r14770  
    197197      ! 
    198198       
    199 !!$      IF( jperio == 3 .OR. jperio == 4 ) THEN   ! add a small island in the upper corners to avoid model instabilities... 
     199!!$      IF( c_NFtype == 'T' ) THEN   ! add a small island in the upper corners to avoid model instabilities... 
    200200!!$         z2d(mi0(       nn_hls):mi1(                  nn_hls+2 ),mj0(jpjglo-nn_hls-1):mj1(jpjglo-nn_hls+1)) = 0. 
    201201!!$         z2d(mi0(jpiglo-nn_hls):mi1(MIN(jpiglo,jpiglo-nn_hls+2)),mj0(jpjglo-nn_hls-1):mj1(jpjglo-nn_hls+1)) = 0. 
     
    203203!!$      ENDIF 
    204204!!$      ! 
    205 !!$      IF( jperio == 5 .OR. jperio == 6 ) THEN   ! add a small island in the upper corners to avoid model instabilities... 
     205!!$      IF( c_NFtype == 'F' ) THEN   ! add a small island in the upper corners to avoid model instabilities... 
    206206!!$         z2d(mi0(       nn_hls):mi1(       nn_hls+1),mj0(jpjglo-nn_hls):mj1(jpjglo-nn_hls+1)) = 0. 
    207207!!$         z2d(mi0(jpiglo-nn_hls):mi1(jpiglo-nn_hls+1),mj0(jpjglo-nn_hls):mj1(jpjglo-nn_hls+1)) = 0. 
     
    210210 
    211211      ! 
    212       CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )           ! set surrounding land to zero (here jperio=0 ==>> closed) 
     212      CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )           ! set surrounding land to zero (closed boundaries) 
    213213      ! 
    214214      k_bot(:,:) = INT( z2d(:,:) )           ! =jpkm1 over the ocean point, =0 elsewhere 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/BENCH/cpp_BENCH.fcm

    r10343 r14770  
    1  bld::tool::fppkeys key_mpp_mpi key_si3 key_top 
     1 bld::tool::fppkeys key_si3 key_top key_qco 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/CANAL/EXPREF/file_def_nemo-oce.xml

    r13472 r14770  
    1616     <field field_ref="ssh"  /> 
    1717     <field field_ref="socegrad"  /> 
    18      <field field_ref="eken_int"  /> 
     18     <field field_ref="ke_int"  /> 
    1919     <field field_ref="relvor"  /> 
    2020     <field field_ref="potvor"  /> 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/CANAL/EXPREF/namelist_cfg

    r13558 r14770  
    4949   ln_sshnoise =  .FALSE.  !  add random noise on initial ssh 
    5050   rn_lambda   =     50.   !  gaussian lambda 
    51    nn_perio    = 1 
     51   ln_Iperio   =   .true.  ! i-periodicity 
     52   ln_Jperio   =  .false.  ! j-periodicity 
    5253/ 
    5354!----------------------------------------------------------------------- 
     
    231232&namdyn_vor    !   Vorticity / Coriolis scheme                          (default: NO selection) 
    232233!----------------------------------------------------------------------- 
    233    ln_dynvor_ene = .false.  !  energy conserving scheme 
    234    ln_dynvor_ens = .false.  !  enstrophy conserving scheme 
    235    ln_dynvor_mix = .false.  !  mixed scheme 
    236    ln_dynvor_een = .false.  !  energy & enstrophy scheme 
    237    ln_dynvor_enT = .false.  !  energy conserving scheme (T-point) 
    238    ln_dynvor_eeT = .true.   !  energy conserving scheme (een using e3t) 
    239       nn_een_e3f = 0             !  e3f = masked averaging of e3t divided by 4 (=0) or by the sum of mask (=1) 
     234   ln_dynvor_ene = .false. !  energy    conserving scheme 
     235   ln_dynvor_ens = .false. !  enstrophy conserving scheme 
     236   ln_dynvor_mix = .false. !  mixed scheme 
     237   ln_dynvor_enT = .false. !  energy conserving scheme (T-point) 
     238   ln_dynvor_eeT =  .true. !  energy conserving scheme (een using e3t) 
     239   ln_dynvor_een = .false. !  energy & enstrophy scheme 
     240   ! 
     241   nn_e3f_typ = 0          !  type of e3f (EEN, ENE, ENS, MIX only)  =0  e3f = mi(mj(e3t))/4 
     242   !                       !                                         =1  e3f = mi(mj(e3t))/mi(mj( tmask)) 
    240243/ 
    241244!----------------------------------------------------------------------- 
     
    319322!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    320323!!   namdiu       Cool skin and warm layer models                       (default: OFF) 
    321 <<<<<<< .working 
    322 !!   namflo       float parameters                                      (default: OFF) 
    323 !!   nam_diadct   transports through some sections                      (default: OFF) 
    324 ||||||| .merge-left.r13465 
    325 !!   namflo       float parameters                                      (default: OFF) 
    326 !!   nam_diaharm  Harmonic analysis of tidal constituents               (default: OFF) 
    327 !!   nam_diadct   transports through some sections                      (default: OFF) 
    328 ======= 
    329324!!   namflo       float parameters                                      ("key_float") 
    330325!!   nam_diaharm  Harmonic analysis of tidal constituents               ("key_diaharm") 
    331326!!   namdct       transports through some sections                      ("key_diadct") 
    332327!!   nam_diatmb   Top Middle Bottom Output                              (default: OFF) 
    333 >>>>>>> .merge-right.r13470 
    334328!!   nam_dia25h   25h Mean Output                                       (default: OFF) 
    335329!!   namnc4       netcdf4 chunking and compression settings             ("key_netcdf4") 
     
    359353!!                  ***  Miscellaneous namelists  ***                 !! 
    360354!!                                                                    !! 
    361 !!   nammpp            Massively Parallel Processing                    ("key_mpp_mpi") 
     355!!   nammpp            Massively Parallel Processing 
    362356!!   namctl            Control prints                                   (default: OFF) 
    363357!!   namsto            Stochastic parametrization of EOS                (default: OFF) 
     
    365359! 
    366360!----------------------------------------------------------------------- 
    367 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi") 
     361&nammpp        !   Massively Parallel Processing 
    368362!----------------------------------------------------------------------- 
    369363!!   jpni        =   8       !  jpni   number of processors following i (set automatically if < 1) 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/CANAL/MY_SRC/usrdef_hgr.F90

    r13295 r14770  
    6464      ! 
    6565      INTEGER  ::   ji, jj     ! dummy loop indices 
    66       REAL(wp) ::   zphi0, zlam0, zbeta, zf0 
     66      INTEGER  ::   ii0, ij0   ! dummy loop indices 
     67      REAL(wp) ::   zbeta, zf0 
    6768      REAL(wp) ::   zti, ztj   ! local scalars 
    6869      !!------------------------------------------------------------------------------- 
     
    7778      ! Position coordinates (in kilometers) 
    7879      !                          ========== 
    79       zlam0 = -REAL(NINT(Ni0glo*rn_0xratio)-1, wp) * rn_dx 
    80       zphi0 = -REAL(NINT(Nj0glo*rn_0yratio)-1, wp) * rn_dy  
     80      ii0 = NINT( REAL(Ni0glo, wp) * rn_0xratio ) 
     81      ij0 = NINT( REAL(Nj0glo, wp) * rn_0yratio ) 
    8182 
    8283#if defined key_agrif 
    8384      ! ! let lower left longitude and latitude from parent 
    8485      IF (.NOT.Agrif_root()) THEN 
    85           zlam0 = (0.5_wp-(Agrif_parent(jpiglo)-1)/2)*Agrif_irhox()*rn_dx & 
    86              &+(Agrif_Ix()+nbghostcells-1)*Agrif_irhox()*rn_dx-(0.5_wp+nbghostcells)*rn_dx 
    87           zphi0 = (0.5_wp-(Agrif_parent(jpjglo)-1)/2)*Agrif_irhoy()*rn_dy & 
    88              &+(Agrif_Iy()+nbghostcells-1)*Agrif_irhoy()*rn_dy-(0.5_wp+nbghostcells)*rn_dy 
     86          to be coded... 
    8987      ENDIF  
    9088#endif 
    9189          
    92       DO_2D( 1, 1, 1, 1 )          
    93          zti = REAL( mig0_oldcmp(ji) - 1, wp )   ! start at i=0 in the global grid without halos 
    94          ztj = REAL( mjg0_oldcmp(jj) - 1, wp )   ! start at j=0 in the global grid without halos 
     90      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )          
     91         zti = REAL( mig0(ji)-ii0, wp )   ! =0 at i=ii0 in the global grid without halos 
     92         ztj = REAL( mjg0(jj)-ij0, wp )   ! =0 at i=ij0 in the global grid without halos 
    9593          
    96          plamt(ji,jj) = zlam0 + rn_dx *   zti 
    97          plamu(ji,jj) = zlam0 + rn_dx * ( zti + 0.5_wp )  
     94         plamt(ji,jj) = rn_dx *   zti 
     95         plamu(ji,jj) = rn_dx * ( zti + 0.5_wp )  
    9896         plamv(ji,jj) = plamt(ji,jj)  
    9997         plamf(ji,jj) = plamu(ji,jj)  
    10098          
    101          pphit(ji,jj) = zphi0 + rn_dy *   ztj 
    102          pphiv(ji,jj) = zphi0 + rn_dy * ( ztj + 0.5_wp )  
     99         pphit(ji,jj) = rn_dy *   ztj 
     100         pphiv(ji,jj) = rn_dy * ( ztj + 0.5_wp )  
    103101         pphiu(ji,jj) = pphit(ji,jj)  
    104102         pphif(ji,jj) = pphiv(ji,jj)  
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/CANAL/MY_SRC/usrdef_istate.F90

    r13472 r14770  
    1616   USE dom_oce         
    1717   USE phycst         ! physical constants 
     18   USE eosbn2, ONLY: rn_a0 
    1819   ! 
    1920   USE in_out_manager ! I/O manager 
     
    2627   PRIVATE 
    2728 
    28    PUBLIC   usr_def_istate   ! called by istate.F90 
     29   PUBLIC   usr_def_istate       ! called by istate.F90 
     30   PUBLIC   usr_def_istate_ssh   ! called by sshwzv.F90 
    2931 
    3032   !! * Substitutions 
     
    3739CONTAINS 
    3840   
    39    SUBROUTINE usr_def_istate( pdept, ptmask, pts, pu, pv, pssh ) 
     41   SUBROUTINE usr_def_istate( pdept, ptmask, pts, pu, pv ) 
    4042      !!---------------------------------------------------------------------- 
    4143      !!                   ***  ROUTINE usr_def_istate  *** 
     
    5254      REAL(wp), DIMENSION(jpi,jpj,jpk)     , INTENT(  out) ::   pu      ! i-component of the velocity  [m/s]  
    5355      REAL(wp), DIMENSION(jpi,jpj,jpk)     , INTENT(  out) ::   pv      ! j-component of the velocity  [m/s]  
    54       REAL(wp), DIMENSION(jpi,jpj)         , INTENT(  out) ::   pssh    ! sea-surface height 
    5556      ! 
    5657      INTEGER  :: ji, jj, jk, jl  ! dummy loop indices 
     
    7576      CASE(-1)    ! stratif at rest 
    7677 
    77          ! sea level: 
    78          pssh(:,:) = 0. 
    7978         ! temperature: 
    8079         pts(:,:,1,jp_tem) = 25. !!30._wp 
     
    8786 
    8887      CASE(0)    ! rest 
    89           
    90          ! sea level: 
    91          pssh(:,:) = 0. 
     88         ! 
    9289         ! temperature: 
    9390         pts(:,:,:,jp_tem) = 10._wp 
     
    9996          
    10097      CASE(1)    ! geostrophic zonal jet from -zjety to +zjety 
    101  
    102          ! sea level: 
    103          SELECT CASE( nn_fcase ) 
    104          CASE(0)    ! f = f0 
    105             ! sea level: ssh = - fuy / g 
    106             WHERE( ABS(gphit) <= zjety ) 
    107                pssh(:,:) = - ff_t(:,:) * rn_uzonal * gphit(:,:) * 1.e3 / grav 
    108             ELSEWHERE 
    109                pssh(:,:) = - ff_t(:,:) * rn_uzonal * SIGN(zjety, gphit(:,:)) * 1.e3 / grav 
    110             END WHERE 
    111          CASE(1)    ! f = f0 + beta*y 
    112             ! sea level: ssh = - u / g * ( fy + 0.5 * beta * y^2 ) 
    113             zbeta = 2._wp * omega * COS( rad * rn_ppgphi0 ) / ra 
    114             WHERE( ABS(gphit) <= zjety ) 
    115                pssh(:,:) = - rn_uzonal / grav * ( zf0 * gphit(:,:) * 1.e3 + 0.5 * zbeta * gphit(:,:) * gphit(:,:) * 1.e6 ) 
    116             ELSEWHERE 
    117                pssh(:,:) = - rn_uzonal / grav * ( zf0 * SIGN(zjety, gphit(:,:)) * 1.e3   & 
    118                   &                             + 0.5 * zbeta * zjety * zjety * 1.e6 ) 
    119             END WHERE 
    120          END SELECT 
     98         ! 
    12199         ! temperature: 
    122100         pts(:,:,:,jp_tem) = 10._wp 
     
    139117         !                   
    140118      CASE(2)    ! geostrophic zonal current shear 
    141        
    142          ! sea level: 
    143          SELECT CASE( nn_fcase ) 
    144          CASE(0)    ! f = f0 
    145             ! sea level: ssh = - fuy / g 
    146             WHERE( ABS(gphit) <= zjety ) 
    147                pssh(:,:) = - ff_t(:,:) * rn_uzonal * ABS(gphit(:,:)) * 1.e3 / grav 
    148             ELSEWHERE 
    149                pssh(:,:) = - ff_t(:,:) * rn_uzonal * zjety * 1.e3 / grav 
    150             END WHERE 
    151          CASE(1)    ! f = f0 + beta*y 
    152             ! sea level: ssh = - u / g * ( fy + 0.5 * beta * y^2 ) 
    153             zbeta = 2._wp * omega * COS( rad * rn_ppgphi0 ) / ra 
    154             WHERE( ABS(gphit) <= zjety ) 
    155                pssh(:,:) = - SIGN(rn_uzonal, gphit(:,:)) / grav   & 
    156                   &        * ( zf0 * gphit(:,:) * 1.e3 + 0.5 * zbeta * gphit(:,:) * gphit(:,:) * 1.e6 ) 
    157             ELSEWHERE 
    158                pssh(:,:) = - SIGN(rn_uzonal, gphit(:,:)) / grav   & 
    159                   &        * ( zf0 * SIGN(zjety, gphit(:,:)) * 1.e3 + 0.5 * zbeta * zjety * zjety * 1.e6 ) 
    160             END WHERE 
    161          END SELECT 
     119         ! 
    162120         ! temperature: 
    163121         pts(:,:,:,jp_tem) = 10._wp 
     
    176134         !                   
    177135      CASE(3)    ! gaussian zonal currant 
    178  
     136         ! 
    179137         ! zonal current 
    180138         DO jk=1, jpkm1 
     
    182140            pu(:,:,jk) = rn_uzonal * EXP( - 0.5 * gphit(:,:)**2 / rn_lambda**2 ) 
    183141         END DO 
    184           
    185          ! sea level: 
    186          pssh(:,1) = - ff_t(:,1) / grav * pu(:,1,1) * e2t(:,1) 
    187          DO jl=1, jpnj 
    188             DO_2D( 0, 0, 0, 0 ) 
    189                pssh(ji,jj) = pssh(ji,jj-1) - ff_t(ji,jj) / grav * pu(ji,jj,1) * e2t(ji,jj) 
    190             END_2D 
    191             CALL lbc_lnk( 'usrdef_istate', pssh, 'T',  1. ) 
    192          END DO 
    193           
    194142         ! temperature: 
    195143         pts(:,:,:,jp_tem) = 10._wp 
    196144         ! salinity:   
    197145         DO jk=1, jpkm1 
    198             pts(:,:,jk,jp_sal) = pssh(:,:) 
     146            pts(:,:,jk,jp_sal) = gphit(:,:) 
    199147         END DO 
    200148         ! velocities: 
     
    202150         !             
    203151      CASE(4)    ! geostrophic zonal pulse 
    204     
     152         ! 
    205153         DO_2D( 1, 1, 1, 1 ) 
    206154            IF ( ABS(glamt(ji,jj)) <= zjetx ) THEN 
     
    210158            ELSE 
    211159               zdu = 0. 
    212             END IF 
     160            ENDIF 
    213161            IF ( ABS(gphit(ji,jj)) <= zjety ) THEN 
    214                pssh(ji,jj) = - ff_t(ji,jj) * zdu * gphit(ji,jj) * 1.e3 / grav 
    215162               pu(ji,jj,:) = zdu 
    216163               pts(ji,jj,:,jp_sal) = zdu / rn_uzonal + 1. 
    217164            ELSE 
    218                pssh(ji,jj) = - ff_t(ji,jj) * zdu * SIGN(zjety,gphit(ji,jj)) * 1.e3 / grav  
    219165               pu(ji,jj,:) = 0. 
    220166               pts(ji,jj,:,jp_sal) = 1. 
    221             END IF 
    222          END_2D 
    223           
     167            ENDIF 
     168         END_2D 
     169         ! 
    224170         ! temperature: 
    225171         pts(:,:,:,jp_tem) = 10._wp * ptmask(:,:,:)         
    226172         pv(:,:,:) = 0. 
    227           
    228        CASE(5)    ! vortex 
    229                   ! 
     173         ! 
     174      CASE(5)    ! vortex 
     175         ! 
    230176         zf0   = 2._wp * omega * SIN( rad * rn_ppgphi0 ) 
    231          zumax = rn_vtxmax * SIGN(1._wp, zf0) ! Here Anticyclonic: set zumax=-1 for cyclonic 
     177         zumax = rn_vtxmax * SIGN(1._wp, zf0)  ! Here Anticyclonic: set zumax=-1 for cyclonic 
    232178         zlambda = SQRT(2._wp)*rn_lambda*1.e3       ! Horizontal scale in meters  
    233179         zn2 = 3.e-3**2 
     
    242188            ! Surface pressure: P(x,y,z) = F(z) * Psurf(x,y) 
    243189            zpsurf = zP0 * EXP(-(zx**2+zy**2)*zr_lambda2) - rho0 * ff_t(ji,jj) * rn_uzonal * zy 
    244             ! Sea level: 
    245             pssh(ji,jj) = 0. 
    246             DO jl=1,5 
    247                zdt = pssh(ji,jj) 
    248                zdzF = (1._wp - EXP(zdt-zH)) / (zH - 1._wp + EXP(-zH))   ! F'(z) 
    249                zrho1 = rho0 * (1._wp + zn2*zdt/grav) - zdzF * zpsurf / grav    ! -1/g Dz(P) = -1/g * F'(z) * Psurf(x,y) 
    250                pssh(ji,jj) = zpsurf / (zrho1*grav) * ptmask(ji,jj,1)   ! ssh = Psurf / (Rho*g) 
    251             END DO 
    252190            ! temperature: 
    253191            DO jk=1,jpk 
     
    258196                  zrho1 = zrho1 - zdzF * zpsurf / grav    ! -1/g Dz(P) = -1/g * F'(z) * Psurf(x,y) 
    259197               ENDIF 
    260                !               pts(ji,jj,jk,jp_tem) = (20._wp + (rho0-zrho1) / 0.28_wp) * ptmask(ji,jj,jk) 
    261                pts(ji,jj,jk,jp_tem) = (10._wp + (rho0-zrho1) / 0.28_wp) * ptmask(ji,jj,jk) 
     198               !               pts(ji,jj,jk,jp_tem) = (20._wp + (rho0-zrho1) / rn_a0) * ptmask(ji,jj,jk) 
     199               pts(ji,jj,jk,jp_tem) = (10._wp + (rho0-zrho1) / rn_a0) * ptmask(ji,jj,jk) 
    262200            END DO 
    263201         END_2D 
     
    299237         !             
    300238      END SELECT 
    301        
     239      ! 
     240      CALL lbc_lnk( 'usrdef_istate', pts , 'T',  1. ) 
     241      CALL lbc_lnk( 'usrdef_istate', pu, 'U', -1., pv, 'V', -1. ) 
     242 
     243   END SUBROUTINE usr_def_istate 
     244 
     245   
     246   SUBROUTINE usr_def_istate_ssh( ptmask, pssh ) 
     247      !!---------------------------------------------------------------------- 
     248      !!                   ***  ROUTINE usr_def_istate_ssh  *** 
     249      !!  
     250      !! ** Purpose :   Initialization of the dynamics and tracers 
     251      !!                Here CANAL configuration  
     252      !! 
     253      !! ** Method  :   Set ssh  
     254      !!---------------------------------------------------------------------- 
     255      REAL(wp), DIMENSION(jpi,jpj,jpk)     , INTENT(in   ) ::   ptmask  ! t-point ocean mask             [m] 
     256      REAL(wp), DIMENSION(jpi,jpj)         , INTENT(  out) ::   pssh    ! sea-surface height 
     257      ! 
     258      INTEGER  :: ji, jj, jk, jl  ! dummy loop indices 
     259      REAL(wp) :: zx, zy, zP0, zumax, zlambda, zr_lambda2, zn2, zf0, zH, zrho1, za, zf, zdzF 
     260      REAL(wp) :: zpsurf, zdyPs, zdxPs 
     261      REAL(wp) :: zdt, zdu, zdv 
     262      REAL(wp) :: zjetx, zjety, zbeta 
     263      REAL(wp), DIMENSION(jpi,jpj)  ::   zrandom 
     264      !!---------------------------------------------------------------------- 
     265      ! 
     266      IF(lwp) WRITE(numout,*) 
     267      IF(lwp) WRITE(numout,*) 'usr_def_istate_ssh : CANAL configuration, analytical definition of initial state' 
     268      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~   ' 
     269      ! 
     270      IF (ln_sshnoise) CALL RANDOM_NUMBER(zrandom) 
     271      zjetx = ABS(rn_ujetszx)/2. 
     272      zjety = ABS(rn_ujetszy)/2. 
     273      ! 
     274      SELECT CASE(nn_initcase) 
     275      CASE(0)                      !==   rest  ==! 
     276         ! 
     277         pssh(:,:) = 0. 
     278         ! 
     279      CASE(1)                      !==  geostrophic zonal jet from -zjety to +zjety  ==! 
     280         ! 
     281         SELECT CASE( nn_fcase ) 
     282         CASE(0)                          !* f = f0 : ssh = - fuy / g 
     283            WHERE( ABS(gphit) <= zjety ) 
     284               pssh(:,:) = - ff_t(:,:) * rn_uzonal * gphit(:,:) * 1.e3 / grav 
     285            ELSEWHERE 
     286               pssh(:,:) = - ff_t(:,:) * rn_uzonal * SIGN(zjety, gphit(:,:)) * 1.e3 / grav 
     287            END WHERE 
     288         CASE(1)                          !* f = f0 + beta*y : ssh = - u / g * ( fy + 0.5 * beta * y^2 ) 
     289            zbeta = 2._wp * omega * COS( rad * rn_ppgphi0 ) / ra 
     290            WHERE( ABS(gphit) <= zjety ) 
     291               pssh(:,:) = - rn_uzonal / grav * ( ff_t(:,:) * gphit(:,:) * 1.e3 + 0.5 * zbeta * gphit(:,:) * gphit(:,:) * 1.e6 ) 
     292            ELSEWHERE 
     293               pssh(:,:) = - rn_uzonal / grav * ( ff_t(:,:) * SIGN(zjety, gphit(:,:)) * 1.e3   & 
     294                  &                             + 0.5 * zbeta * zjety * zjety * 1.e6 ) 
     295            END WHERE 
     296         END SELECT 
     297         !                   
     298      CASE(2)                      !==  geostrophic zonal current shear  ==! 
     299         ! 
     300         SELECT CASE( nn_fcase ) 
     301         CASE(0)                          !* f = f0 : ssh = - fuy / g 
     302            WHERE( ABS(gphit) <= zjety ) 
     303               pssh(:,:) = - ff_t(:,:) * rn_uzonal * ABS(gphit(:,:)) * 1.e3 / grav 
     304            ELSEWHERE 
     305               pssh(:,:) = - ff_t(:,:) * rn_uzonal * zjety * 1.e3 / grav 
     306            END WHERE 
     307         CASE(1)                          !* f = f0 + beta*y : ssh = - u / g * ( fy + 0.5 * beta * y^2 ) 
     308            zbeta = 2._wp * omega * COS( rad * rn_ppgphi0 ) / ra 
     309            WHERE( ABS(gphit) <= zjety ) 
     310               pssh(:,:) = - SIGN(rn_uzonal, gphit(:,:)) / grav   & 
     311                  &        * ( ff_t(:,:) * gphit(:,:) * 1.e3 + 0.5 * zbeta * gphit(:,:) * gphit(:,:) * 1.e6 ) 
     312            ELSEWHERE 
     313               pssh(:,:) = - SIGN(rn_uzonal, gphit(:,:)) / grav   & 
     314                  &        * ( ff_t(:,:) * SIGN(zjety, gphit(:,:)) * 1.e3 + 0.5 * zbeta * zjety * zjety * 1.e6 ) 
     315            END WHERE 
     316         END SELECT 
     317         !                   
     318      CASE(3)                      !==  gaussian zonal currant  ==! 
     319         ! 
     320         pssh(:,1) = - ff_t(:,1) / grav * e2t(:,1) * rn_uzonal * EXP( - 0.5 * gphit(:,1)**2 / rn_lambda**2 ) 
     321         DO jl=1, jpnj 
     322            DO_2D( 0, 0, 0, 0 ) 
     323               pssh(ji,jj) = pssh(ji,jj-1) - ff_t(ji,jj) / grav * rn_uzonal * EXP( - 0.5 * gphit(ji,jj)**2 / rn_lambda**2 ) * e2t(ji,jj) 
     324            END_2D 
     325            CALL lbc_lnk( 'usrdef_istate_ssh', pssh, 'T',  1. ) 
     326         END DO 
     327         !             
     328      CASE(4)                      !==  geostrophic zonal pulse !!st need to implement a way to separate ssh properly  ==! 
     329         ! 
     330         DO_2D( 1, 1, 1, 1 ) 
     331            IF ( ABS(glamt(ji,jj)) <= zjetx ) THEN 
     332               zdu = rn_uzonal 
     333            ELSEIF ( ABS(glamt(ji,jj)) <= zjetx + 100. ) THEN 
     334               zdu = rn_uzonal * ( ( zjetx-ABS(glamt(ji,jj)) )/100. + 1. ) 
     335            ELSE 
     336               zdu = 0. 
     337            ENDIF 
     338            IF ( ABS(gphit(ji,jj)) <= zjety ) THEN 
     339               pssh(ji,jj) = - ff_t(ji,jj) * zdu * gphit(ji,jj) * 1.e3 / grav 
     340            ELSE 
     341               pssh(ji,jj) = - ff_t(ji,jj) * zdu * SIGN(zjety,gphit(ji,jj)) * 1.e3 / grav  
     342            ENDIF 
     343         END_2D 
     344         ! 
     345      CASE(5)                    !==  vortex  ==! 
     346         ! 
     347         zf0   = 2._wp * omega * SIN( rad * rn_ppgphi0 ) 
     348         zumax = rn_vtxmax * SIGN(1._wp, zf0)   ! Here Anticyclonic: set zumax=-1 for cyclonic 
     349         zlambda = SQRT(2._wp)*rn_lambda        ! Horizontal scale in meters  
     350         zn2 = 3.e-3**2 
     351         zH = 0.5_wp * 5000._wp 
     352         ! 
     353         zr_lambda2 = 1._wp / zlambda**2 
     354         zP0 = rho0 * zf0 * zumax * zlambda * SQRT(EXP(1._wp)/2._wp) 
     355         ! 
     356         DO_2D( 1, 1, 1, 1 ) 
     357            zx = glamt(ji,jj) * 1.e3 
     358            zy = gphit(ji,jj) * 1.e3 
     359            !                                   ! Surface pressure: P(x,y,z) = F(z) * Psurf(x,y) 
     360            zpsurf = zP0 * EXP(-(zx**2+zy**2)*zr_lambda2) - rho0 * ff_t(ji,jj) * rn_uzonal * zy 
     361            pssh(ji,jj) = 0. 
     362            DO jl=1,5 
     363               zdt = pssh(ji,jj) 
     364               zdzF = (1._wp - EXP(zdt-zH)) / (zH - 1._wp + EXP(-zH))   ! F'(z) 
     365               zrho1 = rho0 * (1._wp + zn2*zdt/grav) - zdzF * zpsurf / grav    ! -1/g Dz(P) = -1/g * F'(z) * Psurf(x,y) 
     366               pssh(ji,jj) = zpsurf / (zrho1*grav) * ptmask(ji,jj,1)   ! ssh = Psurf / (Rho*g) 
     367            END DO 
     368         END_2D 
     369         !             
     370      END SELECT 
     371      !                          !==  add noise  ==! 
    302372      IF (ln_sshnoise) THEN 
    303373         CALL RANDOM_SEED() 
    304374         CALL RANDOM_NUMBER(zrandom) 
    305375         pssh(:,:) = pssh(:,:) + ( 0.1  * zrandom(:,:) - 0.05 ) 
    306       END IF 
    307       CALL lbc_lnk( 'usrdef_istate', pssh, 'T',  1. ) 
    308       CALL lbc_lnk( 'usrdef_istate', pts , 'T',  1. ) 
    309       CALL lbc_lnk_multi( 'usrdef_istate', pu, 'U', -1., pv, 'V', -1. ) 
    310  
    311    END SUBROUTINE usr_def_istate 
    312  
     376      ENDIF 
     377      CALL lbc_lnk( 'usrdef_istate_ssh', pssh, 'T',  1. ) 
     378      ! 
     379   END SUBROUTINE usr_def_istate_ssh 
     380    
    313381   !!====================================================================== 
    314382END MODULE usrdef_istate 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/CANAL/MY_SRC/usrdef_nam.F90

    r13472 r14770  
    5050   LOGICAL , PUBLIC ::   ln_sshnoise=.false. ! add random noise on initial ssh 
    5151   REAL(wp), PUBLIC ::   rn_lambda  = 50.    ! gaussian lambda 
    52    INTEGER , PUBLIC ::   nn_perio   =    0   ! periodicity of the channel (0=closed, 1=E-W) 
    5352 
    5453   !!---------------------------------------------------------------------- 
     
    5958CONTAINS 
    6059 
    61    SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     60   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 
    6261      !!---------------------------------------------------------------------- 
    6362      !!                     ***  ROUTINE dom_nam  *** 
     
    7170      !! ** input   : - namusr_def namelist found in namelist_cfg 
    7271      !!---------------------------------------------------------------------- 
    73       CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    74       INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
    75       INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes  
    76       INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
     72      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name 
     73      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution 
     74      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes 
     75      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity 
     76      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding 
     77      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F 
    7778      ! 
    7879      INTEGER ::   ios      ! Local integer 
    7980      REAL(wp)::   zh       ! Local scalars 
     81      LOGICAL ::   ln_Iperio, ln_Jperio 
    8082      !! 
    8183      NAMELIST/namusr_def/  rn_domszx, rn_domszy, rn_domszz, rn_dx, rn_dy, rn_dz, rn_0xratio, rn_0yratio   & 
    8284         &                 , nn_fcase, rn_ppgphi0, rn_u10, rn_windszx, rn_windszy & !!, rn_uofac   & 
    8385         &                 , rn_vtxmax, rn_uzonal, rn_ujetszx, rn_ujetszy  & 
    84          &                 , nn_botcase, nn_initcase, ln_sshnoise, rn_lambda, nn_perio 
     86         &                 , nn_botcase, nn_initcase, ln_sshnoise, rn_lambda, ln_Iperio, ln_Jperio 
    8587      !!---------------------------------------------------------------------- 
    8688      ! 
     
    102104#endif 
    103105      ! 
    104       IF(lwm)   WRITE( numond, namusr_def ) 
    105       ! 
    106106      cd_cfg = 'EW_CANAL'             ! name & resolution (not used) 
    107107      kk_cfg = INT( rn_dx ) 
     
    109109      IF( Agrif_Root() ) THEN        ! Global Domain size:  EW_CANAL global domain is  1800 km x 1800 Km x 5000 m 
    110110         kpi = NINT( rn_domszx / rn_dx ) + 1 
    111          kpj = NINT( rn_domszy / rn_dy ) + 3 
     111         kpj = NINT( rn_domszy / rn_dy ) + 1 
    112112      ELSE                           ! Global Domain size: add nbghostcells + 1 "land" point on each side 
    113113         kpi  = nbcellsx + nbghostcells_x   + nbghostcells_x   + 2 
     
    117117      ! 
    118118      zh  = (kpk-1)*rn_dz 
    119       !                             ! Set the lateral boundary condition of the global domain 
    120       kperio = 1                    ! EW_CANAL configuration : closed basin 
    121119      !                             ! control print 
    122120      IF(lwp) THEN 
     
    149147         WRITE(numout,*) '      add random noise on initial ssh   ln_sshnoise= ', ln_sshnoise 
    150148         WRITE(numout,*) '      Gaussian lambda parameter          rn_lambda = ', rn_lambda 
    151          WRITE(numout,*) '      Periodicity of the basin            nn_perio = ', nn_perio 
     149         WRITE(numout,*) '      i and j Periodicity     ln_Iperio, ln_Jperio = ', ln_Iperio, ln_Jperio 
     150         WRITE(numout,*) '   ' 
    152151      ENDIF 
    153152      !                             ! Set the lateral boundary condition of the global domain 
    154       kperio = nn_perio                    ! EW_CANAL configuration : closed basin 
     153      ldIperio = ln_Iperio   ;   ldJperio = ln_Jperio   ! CANAL configuration 
     154      ldNFold  =  .FALSE.    ;   cdNFtype = '-' 
    155155      ! 
    156156   END SUBROUTINE usr_def_nam 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/CANAL/MY_SRC/usrdef_zgr.F90

    r13472 r14770  
    202202      END SELECT 
    203203      ! 
    204       CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )           ! set surrounding land to zero (here jperio=0 ==>> closed) 
     204      CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )           ! set surrounding land to zero (closed boundaries) 
    205205      ! 
    206206      k_bot(:,:) = NINT( z2d(:,:) )          ! =jpkm1 over the ocean point, =0 elsewhere 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/CANAL/cpp_CANAL.fcm

    r10425 r14770  
    1  bld::tool::fppkeys key_iomput key_mpp_mpi  
     1 bld::tool::fppkeys key_xios key_qco  
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/CPL_OASIS/EXPREF/namelist_cfg

    r13558 r14770  
    367367!----------------------------------------------------------------------- 
    368368   ln_dynvor_een = .true.  !  energy & enstrophy scheme 
    369       nn_een_e3f = 0          ! =0   e3f = mean masked e3t divided by 4 
    370369/ 
    371370!----------------------------------------------------------------------- 
     
    467466!!                  ***  Miscellaneous namelists  ***                 !! 
    468467!!                                                                    !! 
    469 !!   nammpp            Massively Parallel Processing                    ("key_mpp_mpi") 
     468!!   nammpp            Massively Parallel Processing 
    470469!!   namctl            Control prints                                   (default: OFF) 
    471470!!   namsto            Stochastic parametrization of EOS                (default: OFF) 
     
    473472! 
    474473!----------------------------------------------------------------------- 
    475 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi") 
     474&nammpp        !   Massively Parallel Processing 
    476475!----------------------------------------------------------------------- 
    477476/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/CPL_OASIS/cpp_CPL_OASIS.fcm

    r12663 r14770  
    1 bld::tool::fppkeys   key_si3 key_top key_iomput key_mpp_mpi key_oasis3 
     1bld::tool::fppkeys   key_si3 key_top key_xios key_oasis3 key_qco 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/ICE_ADV1D/EXPREF/namelist_cfg

    r13558 r14770  
    216216!!                  ***  Miscellaneous namelists  ***                 !! 
    217217!!                                                                    !! 
    218 !!   nammpp            Massively Parallel Processing                    ("key_mpp_mpi") 
     218!!   nammpp            Massively Parallel Processing 
    219219!!   namctl            Control prints                                   (default: OFF) 
    220220!!   namsto            Stochastic parametrization of EOS                (default: OFF) 
     
    222222! 
    223223!----------------------------------------------------------------------- 
    224 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi") 
     224&nammpp        !   Massively Parallel Processing 
    225225!----------------------------------------------------------------------- 
    226226/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/ICE_ADV1D/EXPREF/namelist_cfg_120pts

    r13558 r14770  
    216216!!                  ***  Miscellaneous namelists  ***                 !! 
    217217!!                                                                    !! 
    218 !!   nammpp            Massively Parallel Processing                    ("key_mpp_mpi") 
     218!!   nammpp            Massively Parallel Processing 
    219219!!   namctl            Control prints                                   (default: OFF) 
    220220!!   namsto            Stochastic parametrization of EOS                (default: OFF) 
     
    222222! 
    223223!----------------------------------------------------------------------- 
    224 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi") 
     224&nammpp        !   Massively Parallel Processing 
    225225!----------------------------------------------------------------------- 
    226226/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/ICE_ADV1D/EXPREF/namelist_cfg_240pts

    r13558 r14770  
    216216!!                  ***  Miscellaneous namelists  ***                 !! 
    217217!!                                                                    !! 
    218 !!   nammpp            Massively Parallel Processing                    ("key_mpp_mpi") 
     218!!   nammpp            Massively Parallel Processing 
    219219!!   namctl            Control prints                                   (default: OFF) 
    220220!!   namsto            Stochastic parametrization of EOS                (default: OFF) 
     
    222222! 
    223223!----------------------------------------------------------------------- 
    224 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi") 
     224&nammpp        !   Massively Parallel Processing 
    225225!----------------------------------------------------------------------- 
    226226/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/ICE_ADV1D/EXPREF/namelist_cfg_60pts

    r13558 r14770  
    216216!!                  ***  Miscellaneous namelists  ***                 !! 
    217217!!                                                                    !! 
    218 !!   nammpp            Massively Parallel Processing                    ("key_mpp_mpi") 
     218!!   nammpp            Massively Parallel Processing 
    219219!!   namctl            Control prints                                   (default: OFF) 
    220220!!   namsto            Stochastic parametrization of EOS                (default: OFF) 
     
    222222! 
    223223!----------------------------------------------------------------------- 
    224 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi") 
     224&nammpp        !   Massively Parallel Processing 
    225225!----------------------------------------------------------------------- 
    226226/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/ICE_ADV1D/MY_SRC/usrdef_hgr.F90

    r13295 r14770  
    7575 
    7676      !                          ========== 
    77       zlam0 = -REAL( (Ni0glo-2)/2, wp) * 1.e-3 * rn_dx 
    78       zphi0 = -REAL( (Nj0glo-2)/2, wp) * 1.e-3 * rn_dy 
     77      zlam0 = -REAL(Ni0glo, wp) * 0.5 * 1.e-3 * rn_dx 
     78      zphi0 = -REAL(Nj0glo, wp) * 0.5 * 1.e-3 * rn_dy 
    7979 
    80       DO_2D( 1, 1, 1, 1 ) 
    81          zti = REAL( mig0_oldcmp(ji) - 1, wp )   ! start at i=0 in the global grid without halos 
    82          ztj = REAL( mjg0_oldcmp(jj) - 1, wp )   ! start at j=0 in the global grid without halos 
     80      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
     81         zti = REAL( mig0(ji), wp ) - 0.5_wp  ! start at i=0.5 in the global grid without halos 
     82         ztj = REAL( mjg0(jj), wp ) - 0.5_wp  ! start at j=0.5 in the global grid without halos 
    8383          
    8484         plamt(ji,jj) = zlam0 + rn_dx * 1.e-3 *   zti 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/ICE_ADV1D/MY_SRC/usrdef_nam.F90

    r13286 r14770  
    3939CONTAINS 
    4040 
    41    SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     41   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 
    4242      !!---------------------------------------------------------------------- 
    4343      !!                     ***  ROUTINE dom_nam  *** 
     
    5151      !! ** input   : - namusr_def namelist found in namelist_cfg 
    5252      !!---------------------------------------------------------------------- 
    53       CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    54       INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
    55       INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes  
    56       INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
     53      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name 
     54      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution 
     55      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes 
     56      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity 
     57      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding 
     58      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F 
    5759      ! 
    5860      INTEGER ::   ios       ! Local integer 
     
    7880      zly = kpj*rn_dy*1.e-3 
    7981      !                             ! Set the lateral boundary condition of the global domain 
    80       kperio = 0                    ! ICE_ADV1D configuration : bi-periodic basin 
     82      ldIperio = .FALSE.   ;   ldJperio = .FALSE.   ! ICE_ADV1D configuration : closed domain 
     83      ldNFold  = .FALSE.   ;   cdNFtype = '-' 
     84      ! 
    8185      !                             ! control print 
    8286      IF(lwp) THEN 
     
    9599         WRITE(numout,*) '         Coriolis:', ln_corio 
    96100         WRITE(numout,*) '   ' 
    97          WRITE(numout,*) '   Lateral boundary condition of the global domain' 
    98          WRITE(numout,*) '      ICE_ADV1D : closed basin                 jperio = ', kperio 
    99101      ENDIF 
    100102      ! 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/ICE_ADV1D/MY_SRC/usrdef_sbc.F90

    r13472 r14770  
    2020   USE ice, ONLY       : at_i_b, a_i_b 
    2121   USE icethd_dh       ! for CALL ice_thd_snwblow 
     22   USE sbc_phy, ONLY : pp_cldf 
    2223   ! 
    2324   USE in_out_manager  ! I/O manager 
     
    2627   USE lib_fortran     ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)  
    2728 
     29    
    2830   IMPLICIT NONE 
    2931   PRIVATE 
     
    118120      emp_oce (:,:)   = 0._wp   ! uniform value for freshwater budget (E-P) 
    119121      qsr_oce (:,:)   = 0._wp   ! uniform value for     solar radiation 
    120       qns_oce (:,:)   = 0._wp   ! uniform value for non-solar radiation 
     122      qns_oce (:,:)   = 0._wp   ! uniform value for non-solar heat flux 
    121123 
    122124      ! ice variables 
    123125      alb_ice (:,:,:) = 0.7_wp  ! useless 
    124126      qsr_ice (:,:,:) = 0._wp   ! uniform value for     solar radiation 
    125       qns_ice (:,:,:) = 0._wp   ! uniform value for non-solar radiation 
     127      qns_ice (:,:,:) = 0._wp   ! uniform value for non-solar heat flux 
     128      dqns_ice(:,:,:) = 0._wp   ! uniform value for non solar heat flux sensitivity for ice 
    126129      sprecip (:,:)   = 0._wp   ! uniform value for snow precip 
    127130      evap_ice(:,:,:) = 0._wp   ! uniform value for sublimation 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/ICE_ADV1D/cpp_ICE_ADV1D.fcm

    r10513 r14770  
    1 bld::tool::fppkeys key_si3 key_mpp_mpi key_nosignedzero key_iomput 
     1bld::tool::fppkeys key_si3 key_xios key_linssh 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/ICE_ADV2D/EXPREF/namelist_cfg

    r13558 r14770  
    216216!!                  ***  Miscellaneous namelists  ***                 !! 
    217217!!                                                                    !! 
    218 !!   nammpp            Massively Parallel Processing                    ("key_mpp_mpi") 
     218!!   nammpp            Massively Parallel Processing 
    219219!!   namctl            Control prints                                   (default: OFF) 
    220220!!   namsto            Stochastic parametrization of EOS                (default: OFF) 
     
    222222! 
    223223!----------------------------------------------------------------------- 
    224 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi") 
     224&nammpp        !   Massively Parallel Processing 
    225225!----------------------------------------------------------------------- 
    226226/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/ICE_ADV2D/MY_SRC/usrdef_hgr.F90

    r13295 r14770  
    7676 
    7777      !                          ========== 
    78       zlam0 = -REAL( (Ni0glo-2)/2, wp) * 1.e-3 * rn_dx 
    79       zphi0 = -REAL( (Nj0glo-2)/2, wp) * 1.e-3 * rn_dy  
     78      zlam0 = -REAL(Ni0glo, wp) * 0.5 * 1.e-3 * rn_dx 
     79      zphi0 = -REAL(Nj0glo, wp) * 0.5 * 1.e-3 * rn_dy 
    8080 
    8181#if defined key_agrif  
     
    9090#endif          
    9191 
    92       DO_2D( 1, 1, 1, 1 ) 
    93          zti = REAL( mig0_oldcmp(ji) - 1, wp )   ! start at i=0 in the global grid without halos 
    94          ztj = REAL( mjg0_oldcmp(jj) - 1, wp )   ! start at j=0 in the global grid without halos 
     92      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
     93         zti = REAL( mig0(ji), wp ) - 0.5_wp  ! start at i=0.5 in the global grid without halos 
     94         ztj = REAL( mjg0(jj), wp ) - 0.5_wp  ! start at j=0.5 in the global grid without halos 
    9595          
    9696         plamt(ji,jj) = zlam0 + rn_dx * 1.e-3 *   zti 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/ICE_ADV2D/MY_SRC/usrdef_nam.F90

    r13286 r14770  
    4040CONTAINS 
    4141 
    42    SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     42   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 
    4343      !!---------------------------------------------------------------------- 
    4444      !!                     ***  ROUTINE dom_nam  *** 
     
    5252      !! ** input   : - namusr_def namelist found in namelist_cfg 
    5353      !!---------------------------------------------------------------------- 
    54       CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    55       INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
    56       INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes  
    57       INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
     54      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name 
     55      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution 
     56      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes  
     57      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity 
     58      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding 
     59      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F 
    5860      ! 
    5961      INTEGER ::   ios       ! Local integer 
     
    9698      zly = kpj*rn_dy*1.e-3 
    9799      ! 
    98       IF( Agrif_Root() ) THEN   ;   kperio = 7     ! ICE_AGRIF configuration : bi-periodic basin 
    99       ELSE                      ;   kperio = 0     ! closed periodicity for the zoom 
     100      IF( Agrif_Root() ) THEN   ;   ldIperio =  .TRUE.   ;   ldJperio =  .TRUE.     ! ICE_ADV2D configuration : bi-periodic basin 
     101      ELSE                      ;   ldIperio = .FALSE.   ;   ldJperio = .FALSE.     ! closed periodicity for the zoom 
    100102      ENDIF 
     103      ldNFold  = .FALSE.   ;   cdNFtype = '-' 
     104      ! 
    101105      !                             ! control print 
    102106      IF(lwp) THEN 
     
    115119         WRITE(numout,*) '         Coriolis:', ln_corio 
    116120         WRITE(numout,*) '   ' 
    117          WRITE(numout,*) '   Lateral boundary condition of the global domain' 
    118          WRITE(numout,*) '      ICE_ADV2D : bi-periodic basin            jperio = ', kperio 
    119121      ENDIF 
    120122      ! 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/ICE_ADV2D/MY_SRC/usrdef_sbc.F90

    r13472 r14770  
    1818   USE sbc_ice         ! Surface boundary condition: ice fields 
    1919   USE phycst          ! physical constants 
    20    USE ice, ONLY       : at_i_b, a_i_b 
     20   USE ice, ONLY       : jpl, at_i_b, a_i_b 
    2121   USE icethd_dh       ! for CALL ice_thd_snwblow 
    2222   ! 
     
    118118      emp_oce (:,:)   = 0._wp   ! uniform value for freshwater budget (E-P) 
    119119      qsr_oce (:,:)   = 0._wp   ! uniform value for     solar radiation 
    120       qns_oce (:,:)   = 0._wp   ! uniform value for non-solar radiation 
     120      qns_oce (:,:)   = 0._wp   ! uniform value for non-solar heat flux 
    121121 
    122122      ! ice variables 
    123123      alb_ice (:,:,:) = 0.7_wp  ! useless 
    124124      qsr_ice (:,:,:) = 0._wp   ! uniform value for     solar radiation 
    125       qns_ice (:,:,:) = 0._wp   ! uniform value for non-solar radiation 
     125      qns_ice (:,:,:) = 0._wp   ! uniform value for non-solar heat flux 
     126      dqns_ice(:,:,:) = 0._wp   ! uniform value for non solar heat flux sensitivity for ice 
    126127      sprecip (:,:)   = 0._wp   ! uniform value for snow precip 
    127128      evap_ice(:,:,:) = 0._wp   ! uniform value for sublimation 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/ICE_ADV2D/cpp_ICE_ADV2D.fcm

    r10515 r14770  
    1 bld::tool::fppkeys key_si3 key_mpp_mpi key_nosignedzero key_iomput 
     1bld::tool::fppkeys key_si3 key_linssh key_xios 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/ICE_AGRIF/EXPREF/1_namelist_cfg

    r13558 r14770  
    216216!!                  ***  Miscellaneous namelists  ***                 !! 
    217217!!                                                                    !! 
    218 !!   nammpp            Massively Parallel Processing                    ("key_mpp_mpi") 
     218!!   nammpp            Massively Parallel Processing 
    219219!!   namctl            Control prints                                   (default: OFF) 
    220220!!   namsto            Stochastic parametrization of EOS                (default: OFF) 
     
    222222! 
    223223!----------------------------------------------------------------------- 
    224 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi") 
     224&nammpp        !   Massively Parallel Processing 
    225225!----------------------------------------------------------------------- 
    226226/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/ICE_AGRIF/EXPREF/namelist_cfg

    r13558 r14770  
    216216!!                  ***  Miscellaneous namelists  ***                 !! 
    217217!!                                                                    !! 
    218 !!   nammpp            Massively Parallel Processing                    ("key_mpp_mpi") 
     218!!   nammpp            Massively Parallel Processing 
    219219!!   namctl            Control prints                                   (default: OFF) 
    220220!!   namsto            Stochastic parametrization of EOS                (default: OFF) 
     
    222222! 
    223223!----------------------------------------------------------------------- 
    224 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi") 
     224&nammpp        !   Massively Parallel Processing 
    225225!----------------------------------------------------------------------- 
    226226/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/ICE_AGRIF/MY_SRC/usrdef_hgr.F90

    r13295 r14770  
    7979      IF( Agrif_Root() ) THEN 
    8080#endif 
    81          ! Compatibility WITH old version:  
    82          ! jperio = 7 =>  Ni0glo = jpigo_old_version - 2 
    83          !            =>  jpiglo-1 replaced by Ni0glo+1 
    84          zlam0 = -REAL( (Ni0glo+1)/2, wp) * 1.e-3 * rn_dx 
    85          zphi0 = -REAL( (Nj0glo+1)/2, wp) * 1.e-3 * rn_dy   ! +1 for compatibility with old version --> to be replaced by -1 as before 
     81         zlam0 = -REAL(Ni0glo, wp) * 0.5 * 1.e-3 * rn_dx 
     82         zphi0 = -REAL(Nj0glo, wp) * 0.5 * 1.e-3 * rn_dy 
    8683#if defined key_agrif  
    8784      ELSE 
     
    8986!clem         zlam0  = Agrif_Parent(zlam0) + (Agrif_ix())*Agrif_Parent(rn_dx) * 1.e-5 
    9087!clem         zphi0  = Agrif_Parent(zphi0) + (Agrif_iy())*Agrif_Parent(rn_dy) * 1.e-5 
    91          ! Compatibility WITH old version:  
    92          ! jperio = 0 =>  Ni0glo = jpigo_old_version 
    93          !            =>  Agrif_parent(jpiglo)-1 replaced by  Agrif_parent(Ni0glo)-1 
    94          zlam0 = ( 0.5_wp - REAL( ( Agrif_parent(Ni0glo)-1 ) / 2, wp) ) * 1.e-3 * Agrif_irhox() * rn_dx  & 
     88         zlam0 = ( 0.5_wp - REAL(Ni0glo, wp) * 0.5 ) * 1.e-3 * Agrif_irhox() * rn_dx  & 
    9589            &  + ( Agrif_Ix() + nbghostcells - 1 ) * Agrif_irhox() * rn_dx * 1.e-3 - ( 0.5_wp + nbghostcells ) * rn_dx * 1.e-3 
    96          zphi0 = ( 0.5_wp - REAL( ( Agrif_parent(Nj0glo)-1 ) / 2, wp) ) * 1.e-3 * Agrif_irhoy() * rn_dy  & 
     90         zphi0 = ( 0.5_wp - REAL(Nj0glo, wp) * 0.5 ) * 1.e-3 * Agrif_irhoy() * rn_dy  & 
    9791            &  + ( Agrif_Iy() + nbghostcells - 1 ) * Agrif_irhoy() * rn_dy * 1.e-3 - ( 0.5_wp + nbghostcells ) * rn_dy * 1.e-3 
    9892      ENDIF 
    9993#endif          
    10094 
    101       DO_2D( 1, 1, 1, 1 ) 
    102          zti = REAL( mig0_oldcmp(ji) - 1, wp )   ! start at i=0 in the global grid without halos 
    103          ztj = REAL( mjg0_oldcmp(jj) - 1, wp )   ! start at j=0 in the global grid without halos 
    104           
     95      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
     96         zti = REAL( mig0(ji), wp ) - 0.5_wp  ! start at i=0.5 in the global grid without halos 
     97         ztj = REAL( mjg0(jj), wp ) - 0.5_wp  ! start at j=0.5 in the global grid without halos 
     98           
    10599         plamt(ji,jj) = zlam0 + rn_dx * 1.e-3 *   zti 
    106100         plamu(ji,jj) = zlam0 + rn_dx * 1.e-3 * ( zti + 0.5_wp ) 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/ICE_AGRIF/MY_SRC/usrdef_nam.F90

    r13286 r14770  
    4040CONTAINS 
    4141 
    42    SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     42   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 
    4343      !!---------------------------------------------------------------------- 
    4444      !!                     ***  ROUTINE dom_nam  *** 
     
    5252      !! ** input   : - namusr_def namelist found in namelist_cfg 
    5353      !!---------------------------------------------------------------------- 
    54       CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    55       INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
    56       INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes  
    57       INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
     54      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name 
     55      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution 
     56      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes  
     57      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity 
     58      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding 
     59      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F 
    5860      ! 
    5961      INTEGER ::   ios       ! Local integer 
     
    8385      ! 
    8486      IF( Agrif_Root() ) THEN        ! Global Domain size:  ICE_AGRIF domain is  300 km x 300 Km x 10 m 
    85          kpi = NINT( 300.e3 / rn_dx ) - 1 
    86          kpj = NINT( 300.e3 / rn_dy ) - 1 
    87          kpi = kpi - 2   ! for compatibility with old version (because kerio=7) --> to be removed 
    88          kpj = kpj - 2   ! for compatibility with old version (because kerio=7) --> to be removed 
     87         kpi = NINT( 300.e3 / rn_dx ) - 3  
     88         kpj = NINT( 300.e3 / rn_dy ) - 3 
    8989      ELSE                           ! Global Domain size: add nbghostcells + 1 "land" point on each side 
    9090         kpi  = nbcellsx + 2 * ( nbghostcells + 1 ) 
     
    100100      zly = kpj*rn_dy*1.e-3 
    101101      ! 
    102       IF( Agrif_Root() ) THEN   ;   kperio = 7     ! ICE_AGRIF configuration : bi-periodic basin 
    103       ELSE                      ;   kperio = 0     ! closed periodicity for the zoom 
     102      IF( Agrif_Root() ) THEN   ;   ldIperio =  .TRUE.   ;   ldJperio =  .TRUE.     ! ICE_AGRIF configuration : bi-periodic basin 
     103      ELSE                      ;   ldIperio = .FALSE.   ;   ldJperio = .FALSE.     ! closed periodicity for the zoom 
    104104      ENDIF 
     105      ldNFold  = .FALSE.   ;   cdNFtype = '-' 
     106      ! 
    105107      !                             ! control print 
    106108      IF(lwp) THEN 
     
    119121         WRITE(numout,*) '         Coriolis:', ln_corio 
    120122         WRITE(numout,*) '   ' 
    121          WRITE(numout,*) '   Lateral boundary condition of the global domain' 
    122          WRITE(numout,*) '      ICE_AGRIF : bi-periodic basin            jperio = ', kperio 
    123123      ENDIF 
    124124      ! 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/ICE_AGRIF/MY_SRC/usrdef_sbc.F90

    r13472 r14770  
    2020   USE ice, ONLY       : at_i_b, a_i_b 
    2121   USE icethd_dh       ! for CALL ice_thd_snwblow 
     22   USE sbc_phy, ONLY : pp_cldf 
    2223   ! 
    2324   USE in_out_manager  ! I/O manager 
     
    118119      emp_oce (:,:)   = 0._wp   ! uniform value for freshwater budget (E-P) 
    119120      qsr_oce (:,:)   = 0._wp   ! uniform value for     solar radiation 
    120       qns_oce (:,:)   = 0._wp   ! uniform value for non-solar radiation 
     121      qns_oce (:,:)   = 0._wp   ! uniform value for non-solar heat flux 
    121122 
    122123      ! ice variables 
    123124      alb_ice (:,:,:) = 0.7_wp  ! useless 
    124125      qsr_ice (:,:,:) = 0._wp   ! uniform value for     solar radiation 
    125       qns_ice (:,:,:) = 0._wp   ! uniform value for non-solar radiation 
     126      qns_ice (:,:,:) = 0._wp   ! uniform value for non-solar heat flux 
     127      dqns_ice(:,:,:) = 0._wp   ! uniform value for non solar heat flux sensitivity for ice 
    126128      sprecip (:,:)   = 0._wp   ! uniform value for snow precip 
    127129      evap_ice(:,:,:) = 0._wp   ! uniform value for sublimation 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/ICE_AGRIF/cpp_ICE_AGRIF.fcm

    r10516 r14770  
    1 bld::tool::fppkeys key_agrif key_si3 key_mpp_mpi key_iomput 
     1bld::tool::fppkeys key_agrif key_si3 key_linssh key_xios 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/ISOMIP+/EXPREF/namelist_cfg

    r13731 r14770  
    528528!!                  ***  Miscellaneous namelists  ***                 !! 
    529529!!                                                                    !! 
    530 !!   nammpp            Massively Parallel Processing                    ("key_mpp_mpi") 
     530!!   nammpp            Massively Parallel Processing 
    531531!!   namctl            Control prints                                   (default: OFF) 
    532532!!   namsto            Stochastic parametrization of EOS                (default: OFF) 
     
    534534! 
    535535!----------------------------------------------------------------------- 
    536 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi") 
     536&nammpp        !   Massively Parallel Processing 
    537537!----------------------------------------------------------------------- 
    538538/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/ISOMIP+/MY_SRC/dtatsd.F90

    r13583 r14770  
    1818   USE phycst          ! physical constants 
    1919   USE dom_oce         ! ocean space and time domain 
     20   USE domtile 
    2021   USE fldread         ! read input fields 
    2122   ! 
     
    163164      INTEGER                              , INTENT(in   ) ::   kt     ! ocean time-step 
    164165      CHARACTER(LEN=3)                     , INTENT(in   ) ::   cddta  ! dmp or ini 
    165       REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(  out) ::   ptsd   ! T & S data 
     166      REAL(wp), DIMENSION(A2D(nn_hls),jpk,jpts), INTENT(  out) ::   ptsd   ! T & S data 
    166167      ! 
    167168      INTEGER ::   ji, jj, jk, jl, jkk   ! dummy loop indicies 
    168169      INTEGER ::   ik, il0, il1, ii0, ii1, ij0, ij1   ! local integers 
     170      INTEGER ::   itile 
    169171      REAL(wp)::   zl, zi                             ! local scalars 
    170172      REAL(wp), DIMENSION(jpk) ::  ztp, zsp   ! 1D workspace 
    171173      !!---------------------------------------------------------------------- 
    172174      ! 
     175      IF( ntile == 0 .OR. ntile == 1 )  THEN                                         ! Do only for the full domain 
     176         itile = ntile 
     177         IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 )            ! Use full domain 
     178 
     179         SELECT CASE(cddta) 
     180         CASE('ini') 
     181            CALL fld_read( kt, 1, sf_tsdini ) !==   read T & S data at kt time step   ==! 
     182         CASE('dmp') 
     183            CALL fld_read( kt, 1, sf_tsddmp ) !==   read T & S data at kt time step   ==! 
     184         CASE DEFAULT 
     185            CALL ctl_stop('STOP', 'dta_tsd: cddta case unknown') 
     186         END SELECT 
     187 
     188         IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = itile )            ! Revert to tile domain 
     189      ENDIF 
     190      ! 
    173191      SELECT CASE(cddta) 
    174       CASE('ini')  
    175          CALL fld_read( kt, 1, sf_tsdini ) !==   read T & S data at kt time step   ==! 
    176          ptsd(:,:,:,jp_tem) = sf_tsdini(jp_tem)%fnow(:,:,:)    ! NO mask 
    177          ptsd(:,:,:,jp_sal) = sf_tsdini(jp_sal)%fnow(:,:,:)  
     192      CASE('ini') 
     193         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpk ) 
     194            ptsd(ji,jj,jk,jp_tem) = sf_tsdini(jp_tem)%fnow(ji,jj,jk)    ! NO mask 
     195            ptsd(ji,jj,jk,jp_sal) = sf_tsdini(jp_sal)%fnow(ji,jj,jk) 
     196         END_3D 
    178197      CASE('dmp') 
    179          CALL fld_read( kt, 1, sf_tsddmp ) !==   read T & S data at kt time step   ==! 
    180          ptsd(:,:,:,jp_tem) = sf_tsddmp(jp_tem)%fnow(:,:,:)    ! NO mask 
    181          ptsd(:,:,:,jp_sal) = sf_tsddmp(jp_sal)%fnow(:,:,:)  
     198         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpk ) 
     199            ptsd(ji,jj,jk,jp_tem) = sf_tsddmp(jp_tem)%fnow(ji,jj,jk)    ! NO mask 
     200            ptsd(ji,jj,jk,jp_sal) = sf_tsddmp(jp_sal)%fnow(ji,jj,jk) 
     201         END_3D 
    182202      CASE DEFAULT 
    183203         CALL ctl_stop('STOP', 'dta_tsd: cddta case unknown') 
     
    186206      IF( ln_sco ) THEN                   !==   s- or mixed s-zps-coordinate   ==! 
    187207         ! 
    188          IF( kt == nit000 .AND. lwp )THEN 
    189             WRITE(numout,*) 
    190             WRITE(numout,*) 'dta_tsd: interpolates T & S data onto the s- or mixed s-z-coordinate mesh' 
     208         IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile 
     209            IF( kt == nit000 .AND. lwp )THEN 
     210               WRITE(numout,*) 
     211               WRITE(numout,*) 'dta_tsd: interpolates T & S data onto the s- or mixed s-z-coordinate mesh' 
     212            ENDIF 
    191213         ENDIF 
    192214         ! 
     
    220242      ELSE                                !==   z- or zps- coordinate   ==! 
    221243         !                              
    222          ptsd(:,:,:,jp_tem) = ptsd(:,:,:,jp_tem) * tmask(:,:,:)    ! Mask 
    223          ptsd(:,:,:,jp_sal) = ptsd(:,:,:,jp_sal) * tmask(:,:,:) 
     244         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpk ) 
     245            ptsd(ji,jj,jk,jp_tem) = ptsd(ji,jj,jk,jp_tem) * tmask(ji,jj,jk)    ! Mask 
     246            ptsd(ji,jj,jk,jp_sal) = ptsd(ji,jj,jk,jp_sal) * tmask(ji,jj,jk) 
     247         END_3D 
    224248         ! 
    225249         IF( ln_zps ) THEN                      ! zps-coordinate (partial steps) interpolation at the last ocean level 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/ISOMIP+/MY_SRC/eosbn2.F90

    r13583 r14770  
    3939   !!---------------------------------------------------------------------- 
    4040   USE dom_oce        ! ocean space and time domain 
     41   USE domutl, ONLY : is_tile 
    4142   USE phycst         ! physical constants 
    4243   USE stopar         ! Stochastic T/S fluctuations 
     
    5556   !                  !! * Interface 
    5657   INTERFACE eos 
    57       MODULE PROCEDURE eos_insitu, eos_insitu_pot, eos_insitu_2d 
     58      MODULE PROCEDURE eos_insitu, eos_insitu_pot, eos_insitu_2d, eos_insitu_pot_2d 
    5859   END INTERFACE 
    5960   ! 
     
    9091 
    9192   !                               !!!  simplified eos coefficients (default value: Vallis 2006) 
    92    REAL(wp) ::   rn_a0      = 1.6550e-1_wp     ! thermal expansion coeff.  
    93    REAL(wp) ::   rn_b0      = 7.6554e-1_wp     ! saline  expansion coeff.  
     93   REAL(wp), PUBLIC ::   rn_a0      = 1.6550e-1_wp     ! thermal expansion coeff.  
     94   REAL(wp), PUBLIC ::   rn_b0      = 7.6554e-1_wp     ! saline  expansion coeff.  
    9495   REAL(wp) ::   rn_lambda1 = 5.9520e-2_wp     ! cabbeling coeff. in T^2         
    9596   REAL(wp) ::   rn_lambda2 = 5.4914e-4_wp     ! cabbeling coeff. in S^2         
     
    191192 
    192193   SUBROUTINE eos_insitu( pts, prd, pdep ) 
     194      !! 
     195      REAL(wp), DIMENSION(:,:,:,:), INTENT(in   ) ::   pts   ! 1 : potential temperature  [Celsius] 
     196      !                                                      ! 2 : salinity               [psu] 
     197      REAL(wp), DIMENSION(:,:,:)  , INTENT(  out) ::   prd   ! in situ density            [-] 
     198      REAL(wp), DIMENSION(:,:,:)  , INTENT(in   ) ::   pdep  ! depth                      [m] 
     199      !! 
     200      CALL eos_insitu_t( pts, is_tile(pts), prd, is_tile(prd), pdep, is_tile(pdep) ) 
     201   END SUBROUTINE eos_insitu 
     202 
     203   SUBROUTINE eos_insitu_t( pts, ktts, prd, ktrd, pdep, ktdep ) 
    193204      !!---------------------------------------------------------------------- 
    194205      !!                   ***  ROUTINE eos_insitu  *** 
     
    228239      !!                TEOS-10 Manual, 2010 
    229240      !!---------------------------------------------------------------------- 
    230       REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(in   ) ::   pts   ! 1 : potential temperature  [Celsius] 
     241      INTEGER                                 , INTENT(in   ) ::   ktts, ktrd, ktdep 
     242      REAL(wp), DIMENSION(A2D_T(ktts) ,JPK,JPTS), INTENT(in   ) ::   pts   ! 1 : potential temperature  [Celsius] 
    231243      !                                                               ! 2 : salinity               [psu] 
    232       REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(  out) ::   prd   ! in situ density            [-] 
    233       REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(in   ) ::   pdep  ! depth                      [m] 
     244      REAL(wp), DIMENSION(A2D_T(ktrd) ,JPK     ), INTENT(  out) ::   prd   ! in situ density            [-] 
     245      REAL(wp), DIMENSION(A2D_T(ktdep),JPK     ), INTENT(in   ) ::   pdep  ! depth                      [m] 
    234246      ! 
    235247      INTEGER  ::   ji, jj, jk                ! dummy loop indices 
     
    312324      IF( ln_timing )   CALL timing_stop('eos-insitu') 
    313325      ! 
    314    END SUBROUTINE eos_insitu 
     326   END SUBROUTINE eos_insitu_t 
    315327 
    316328 
    317329   SUBROUTINE eos_insitu_pot( pts, prd, prhop, pdep ) 
     330      !! 
     331      REAL(wp), DIMENSION(:,:,:,:), INTENT(in   ) ::   pts    ! 1 : potential temperature  [Celsius] 
     332      !                                                       ! 2 : salinity               [psu] 
     333      REAL(wp), DIMENSION(:,:,:)  , INTENT(  out) ::   prd    ! in situ density            [-] 
     334      REAL(wp), DIMENSION(:,:,:)  , INTENT(  out) ::   prhop  ! potential density (surface referenced) 
     335      REAL(wp), DIMENSION(:,:,:)  , INTENT(in   ) ::   pdep   ! depth                      [m] 
     336      !! 
     337      CALL eos_insitu_pot_t( pts, is_tile(pts), prd, is_tile(prd), prhop, is_tile(prhop), pdep, is_tile(pdep) ) 
     338   END SUBROUTINE eos_insitu_pot 
     339 
     340 
     341   SUBROUTINE eos_insitu_pot_t( pts, ktts, prd, ktrd, prhop, ktrhop, pdep, ktdep ) 
    318342      !!---------------------------------------------------------------------- 
    319343      !!                  ***  ROUTINE eos_insitu_pot  *** 
     
    328352      !! 
    329353      !!---------------------------------------------------------------------- 
    330       REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(in   ) ::   pts    ! 1 : potential temperature  [Celsius] 
     354      INTEGER                                  , INTENT(in   ) ::   ktts, ktrd, ktrhop, ktdep 
     355      REAL(wp), DIMENSION(A2D_T(ktts)  ,JPK,JPTS), INTENT(in   ) ::   pts    ! 1 : potential temperature  [Celsius] 
    331356      !                                                                ! 2 : salinity               [psu] 
    332       REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(  out) ::   prd    ! in situ density            [-] 
    333       REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(  out) ::   prhop  ! potential density (surface referenced) 
    334       REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(in   ) ::   pdep   ! depth                      [m] 
     357      REAL(wp), DIMENSION(A2D_T(ktrd)  ,JPK     ), INTENT(  out) ::   prd    ! in situ density            [-] 
     358      REAL(wp), DIMENSION(A2D_T(ktrhop),JPK     ), INTENT(  out) ::   prhop  ! potential density (surface referenced) 
     359      REAL(wp), DIMENSION(A2D_T(ktdep) ,JPK     ), INTENT(in   ) ::   pdep   ! depth                      [m] 
    335360      ! 
    336361      INTEGER  ::   ji, jj, jk, jsmp             ! dummy loop indices 
     
    482507      IF( ln_timing )   CALL timing_stop('eos-pot') 
    483508      ! 
    484    END SUBROUTINE eos_insitu_pot 
     509   END SUBROUTINE eos_insitu_pot_t 
    485510 
    486511 
    487512   SUBROUTINE eos_insitu_2d( pts, pdep, prd ) 
     513      !! 
     514      REAL(wp), DIMENSION(:,:,:), INTENT(in   ) ::   pts   ! 1 : potential temperature  [Celsius] 
     515      !                                                    ! 2 : salinity               [psu] 
     516      REAL(wp), DIMENSION(:,:)  , INTENT(in   ) ::   pdep  ! depth                      [m] 
     517      REAL(wp), DIMENSION(:,:)  , INTENT(  out) ::   prd   ! in situ density 
     518      !! 
     519      CALL eos_insitu_2d_t( pts, is_tile(pts), pdep, is_tile(pdep), prd, is_tile(prd) ) 
     520   END SUBROUTINE eos_insitu_2d 
     521 
     522 
     523   SUBROUTINE eos_insitu_2d_t( pts, ktts, pdep, ktdep, prd, ktrd ) 
    488524      !!---------------------------------------------------------------------- 
    489525      !!                  ***  ROUTINE eos_insitu_2d  *** 
     
    496532      !! 
    497533      !!---------------------------------------------------------------------- 
    498       REAL(wp), DIMENSION(jpi,jpj,jpts), INTENT(in   ) ::   pts   ! 1 : potential temperature  [Celsius] 
     534      INTEGER                            , INTENT(in   ) ::   ktts, ktdep, ktrd 
     535      REAL(wp), DIMENSION(A2D_T(ktts),JPTS), INTENT(in   ) ::   pts   ! 1 : potential temperature  [Celsius] 
    499536      !                                                           ! 2 : salinity               [psu] 
    500       REAL(wp), DIMENSION(jpi,jpj)     , INTENT(in   ) ::   pdep  ! depth                      [m] 
    501       REAL(wp), DIMENSION(jpi,jpj)     , INTENT(  out) ::   prd   ! in situ density 
     537      REAL(wp), DIMENSION(A2D_T(ktdep)    ), INTENT(in   ) ::   pdep  ! depth                      [m] 
     538      REAL(wp), DIMENSION(A2D_T(ktrd)     ), INTENT(  out) ::   prd   ! in situ density 
    502539      ! 
    503540      INTEGER  ::   ji, jj, jk                ! dummy loop indices 
     
    584621      IF( ln_timing )   CALL timing_stop('eos2d') 
    585622      ! 
    586    END SUBROUTINE eos_insitu_2d 
     623   END SUBROUTINE eos_insitu_2d_t 
     624 
     625 
     626   SUBROUTINE eos_insitu_pot_2d( pts, prhop ) 
     627      !!---------------------------------------------------------------------- 
     628      !!                  ***  ROUTINE eos_insitu_pot  *** 
     629      !! 
     630      !! ** Purpose :   Compute the in situ density (ratio rho/rho0) and the 
     631      !!      potential volumic mass (Kg/m3) from potential temperature and 
     632      !!      salinity fields using an equation of state selected in the 
     633      !!     namelist. 
     634      !! 
     635      !! ** Action  : 
     636      !!              - prhop, the potential volumic mass (Kg/m3) 
     637      !! 
     638      !!---------------------------------------------------------------------- 
     639      REAL(wp), DIMENSION(jpi,jpj,jpts), INTENT(in   ) ::   pts    ! 1 : potential temperature  [Celsius] 
     640      !                                                                ! 2 : salinity               [psu] 
     641      REAL(wp), DIMENSION(jpi,jpj     ), INTENT(  out) ::   prhop  ! potential density (surface referenced) 
     642      ! 
     643      INTEGER  ::   ji, jj, jk, jsmp             ! dummy loop indices 
     644      INTEGER  ::   jdof 
     645      REAL(wp) ::   zt , zh , zstemp, zs , ztm   ! local scalars 
     646      REAL(wp) ::   zn , zn0, zn1, zn2, zn3      !   -      - 
     647      REAL(wp), DIMENSION(:), ALLOCATABLE :: zn0_sto, zn_sto, zsign    ! local vectors 
     648      !!---------------------------------------------------------------------- 
     649      ! 
     650      IF( ln_timing )   CALL timing_start('eos-pot') 
     651      ! 
     652      SELECT CASE ( neos ) 
     653      ! 
     654      CASE( np_teos10, np_eos80 )                !==  polynomial TEOS-10 / EOS-80 ==! 
     655         ! 
     656            DO_2D( 1, 1, 1, 1 ) 
     657               ! 
     658               zt  = pts (ji,jj,jp_tem) * r1_T0                           ! temperature 
     659               zs  = SQRT( ABS( pts(ji,jj,jp_sal) + rdeltaS ) * r1_S0 )   ! square root salinity 
     660               ztm = tmask(ji,jj,1)                                         ! tmask 
     661               ! 
     662               zn0 = (((((EOS060*zt   & 
     663                  &   + EOS150*zs+EOS050)*zt   & 
     664                  &   + (EOS240*zs+EOS140)*zs+EOS040)*zt   & 
     665                  &   + ((EOS330*zs+EOS230)*zs+EOS130)*zs+EOS030)*zt   & 
     666                  &   + (((EOS420*zs+EOS320)*zs+EOS220)*zs+EOS120)*zs+EOS020)*zt   & 
     667                  &   + ((((EOS510*zs+EOS410)*zs+EOS310)*zs+EOS210)*zs+EOS110)*zs+EOS010)*zt   & 
     668                  &   + (((((EOS600*zs+EOS500)*zs+EOS400)*zs+EOS300)*zs+EOS200)*zs+EOS100)*zs+EOS000 
     669                  ! 
     670               ! 
     671               prhop(ji,jj) = zn0 * ztm                           ! potential density referenced at the surface 
     672               ! 
     673            END_2D 
     674 
     675      CASE( np_seos )                !==  simplified EOS  ==! 
     676         ! 
     677         DO_2D( 1, 1, 1, 1 ) 
     678            zt  = pts  (ji,jj,jp_tem) - 10._wp 
     679            zs  = pts  (ji,jj,jp_sal) - 35._wp 
     680            ztm = tmask(ji,jj,1) 
     681            !                                                     ! potential density referenced at the surface 
     682            zn =  - rn_a0 * ( 1._wp + 0.5_wp*rn_lambda1*zt ) * zt   & 
     683               &  + rn_b0 * ( 1._wp - 0.5_wp*rn_lambda2*zs ) * zs   & 
     684               &  - rn_nu * zt * zs 
     685            prhop(ji,jj) = ( rho0 + zn ) * ztm 
     686            ! 
     687         END_2D 
     688         ! 
     689      CASE( np_leos )                !==  ISOMIP EOS  ==! 
     690         ! 
     691         DO_2D( 1, 1, 1, 1 ) 
     692            ! 
     693            zt    = pts  (ji,jj,jp_tem)  - (-1._wp) 
     694            zs    = pts  (ji,jj,jp_sal)  - 34.2_wp 
     695            !zh    = pdep (ji,jj)                         ! depth at the partial step level 
     696            ! 
     697            zn =  rho0 * ( - rn_a0 * zt + rn_b0 * zs ) 
     698            ! 
     699            prhop(ji,jj) = zn * r1_rho0               ! unmasked in situ density anomaly 
     700            ! 
     701         END_2D 
     702         ! 
     703      END SELECT 
     704      ! 
     705      IF(sn_cfctl%l_prtctl)   CALL prt_ctl( tab2d_1=prhop, clinfo1=' eos-pot: ' ) 
     706      ! 
     707      IF( ln_timing )   CALL timing_stop('eos-pot') 
     708      ! 
     709   END SUBROUTINE eos_insitu_pot_2d 
    587710 
    588711 
    589712   SUBROUTINE rab_3d( pts, pab, Kmm ) 
     713      !! 
     714      INTEGER                     , INTENT(in   ) ::   Kmm   ! time level index 
     715      REAL(wp), DIMENSION(:,:,:,:), INTENT(in   ) ::   pts   ! pot. temperature & salinity 
     716      REAL(wp), DIMENSION(:,:,:,:), INTENT(  out) ::   pab   ! thermal/haline expansion ratio 
     717      !! 
     718      CALL rab_3d_t( pts, is_tile(pts), pab, is_tile(pab), Kmm ) 
     719   END SUBROUTINE rab_3d 
     720 
     721 
     722   SUBROUTINE rab_3d_t( pts, ktts, pab, ktab, Kmm ) 
    590723      !!---------------------------------------------------------------------- 
    591724      !!                 ***  ROUTINE rab_3d  *** 
     
    598731      !!---------------------------------------------------------------------- 
    599732      INTEGER                              , INTENT(in   ) ::   Kmm   ! time level index 
    600       REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(in   ) ::   pts   ! pot. temperature & salinity 
    601       REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(  out) ::   pab   ! thermal/haline expansion ratio 
     733      INTEGER                                , INTENT(in   ) ::   ktts, ktab 
     734      REAL(wp), DIMENSION(A2D_T(ktts),JPK,JPTS), INTENT(in   ) ::   pts   ! pot. temperature & salinity 
     735      REAL(wp), DIMENSION(A2D_T(ktab),JPK,JPTS), INTENT(  out) ::   pab   ! thermal/haline expansion ratio 
    602736      ! 
    603737      INTEGER  ::   ji, jj, jk                ! dummy loop indices 
     
    706840      IF( ln_timing )   CALL timing_stop('rab_3d') 
    707841      ! 
    708    END SUBROUTINE rab_3d 
     842   END SUBROUTINE rab_3d_t 
    709843 
    710844 
    711845   SUBROUTINE rab_2d( pts, pdep, pab, Kmm ) 
     846      !! 
     847      INTEGER                   , INTENT(in   ) ::   Kmm   ! time level index 
     848      REAL(wp), DIMENSION(:,:,:), INTENT(in   ) ::   pts    ! pot. temperature & salinity 
     849      REAL(wp), DIMENSION(:,:)  , INTENT(in   ) ::   pdep   ! depth                  [m] 
     850      REAL(wp), DIMENSION(:,:,:), INTENT(  out) ::   pab    ! thermal/haline expansion ratio 
     851      !! 
     852      CALL rab_2d_t(pts, is_tile(pts), pdep, is_tile(pdep), pab, is_tile(pab), Kmm) 
     853   END SUBROUTINE rab_2d 
     854 
     855 
     856   SUBROUTINE rab_2d_t( pts, ktts, pdep, ktdep, pab, ktab, Kmm ) 
    712857      !!---------------------------------------------------------------------- 
    713858      !!                 ***  ROUTINE rab_2d  *** 
     
    718863      !!---------------------------------------------------------------------- 
    719864      INTEGER                              , INTENT(in   ) ::   Kmm   ! time level index 
    720       REAL(wp), DIMENSION(jpi,jpj,jpts)    , INTENT(in   ) ::   pts    ! pot. temperature & salinity 
    721       REAL(wp), DIMENSION(jpi,jpj)         , INTENT(in   ) ::   pdep   ! depth                  [m] 
    722       REAL(wp), DIMENSION(jpi,jpj,jpts)    , INTENT(  out) ::   pab    ! thermal/haline expansion ratio 
     865      INTEGER                            , INTENT(in   ) ::   ktts, ktdep, ktab 
     866      REAL(wp), DIMENSION(A2D_T(ktts),JPTS), INTENT(in   ) ::   pts    ! pot. temperature & salinity 
     867      REAL(wp), DIMENSION(A2D_T(ktdep)    ), INTENT(in   ) ::   pdep   ! depth                  [m] 
     868      REAL(wp), DIMENSION(A2D_T(ktab),JPTS), INTENT(  out) ::   pab    ! thermal/haline expansion ratio 
    723869      ! 
    724870      INTEGER  ::   ji, jj, jk                ! dummy loop indices 
     
    829975      IF( ln_timing )   CALL timing_stop('rab_2d') 
    830976      ! 
    831    END SUBROUTINE rab_2d 
     977   END SUBROUTINE rab_2d_t 
    832978 
    833979 
     
    9421088 
    9431089   SUBROUTINE bn2( pts, pab, pn2, Kmm ) 
     1090      !! 
     1091      INTEGER                              , INTENT(in   ) ::  Kmm   ! time level index 
     1092      REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(in   ) ::  pts   ! pot. temperature and salinity   [Celsius,psu] 
     1093      REAL(wp), DIMENSION(:,:,:,:)         , INTENT(in   ) ::  pab   ! thermal/haline expansion coef.  [Celsius-1,psu-1] 
     1094      REAL(wp), DIMENSION(:,:,:)           , INTENT(  out) ::  pn2   ! Brunt-Vaisala frequency squared [1/s^2] 
     1095      !! 
     1096      CALL bn2_t( pts, pab, is_tile(pab), pn2, is_tile(pn2), Kmm ) 
     1097   END SUBROUTINE bn2 
     1098 
     1099 
     1100   SUBROUTINE bn2_t( pts, pab, ktab, pn2, ktn2, Kmm ) 
    9441101      !!---------------------------------------------------------------------- 
    9451102      !!                  ***  ROUTINE bn2  *** 
     
    9561113      !!---------------------------------------------------------------------- 
    9571114      INTEGER                              , INTENT(in   ) ::   Kmm   ! time level index 
     1115      INTEGER                                , INTENT(in   ) ::  ktab, ktn2 
    9581116      REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(in   ) ::  pts   ! pot. temperature and salinity   [Celsius,psu] 
    959       REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(in   ) ::  pab   ! thermal/haline expansion coef.  [Celsius-1,psu-1] 
    960       REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(  out) ::  pn2   ! Brunt-Vaisala frequency squared [1/s^2] 
     1117      REAL(wp), DIMENSION(A2D_T(ktab),JPK,JPTS), INTENT(in   ) ::  pab   ! thermal/haline expansion coef.  [Celsius-1,psu-1] 
     1118      REAL(wp), DIMENSION(A2D_T(ktn2),JPK     ), INTENT(  out) ::  pn2   ! Brunt-Vaisala frequency squared [1/s^2] 
    9611119      ! 
    9621120      INTEGER  ::   ji, jj, jk      ! dummy loop indices 
     
    9821140      IF( ln_timing )   CALL timing_stop('bn2') 
    9831141      ! 
    984    END SUBROUTINE bn2 
     1142   END SUBROUTINE bn2_t 
    9851143 
    9861144 
     
    10431201 
    10441202   SUBROUTINE  eos_fzp_2d( psal, ptf, pdep ) 
     1203      !! 
     1204      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   )           ::   psal   ! salinity   [psu] 
     1205      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ), OPTIONAL ::   pdep   ! depth      [m] 
     1206      REAL(wp), DIMENSION(:,:)    , INTENT(out  )           ::   ptf    ! freezing temperature [Celsius] 
     1207      !! 
     1208      CALL eos_fzp_2d_t( psal, ptf, is_tile(ptf), pdep ) 
     1209   END SUBROUTINE eos_fzp_2d 
     1210 
     1211 
     1212   SUBROUTINE  eos_fzp_2d_t( psal, ptf, kttf, pdep ) 
    10451213      !!---------------------------------------------------------------------- 
    10461214      !!                 ***  ROUTINE eos_fzp  *** 
     
    10541222      !! Reference  :   UNESCO tech. papers in the marine science no. 28. 1978 
    10551223      !!---------------------------------------------------------------------- 
     1224      INTEGER                       , INTENT(in   )           ::   kttf 
    10561225      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   )           ::   psal   ! salinity   [psu] 
    10571226      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ), OPTIONAL ::   pdep   ! depth      [m] 
    1058       REAL(wp), DIMENSION(jpi,jpj), INTENT(out  )           ::   ptf    ! freezing temperature [Celsius] 
     1227      REAL(wp), DIMENSION(A2D_T(kttf)), INTENT(out  )           ::   ptf    ! freezing temperature [Celsius] 
    10591228      ! 
    10601229      INTEGER  ::   ji, jj          ! dummy loop indices 
     
    10891258      END SELECT       
    10901259      ! 
    1091   END SUBROUTINE eos_fzp_2d 
     1260  END SUBROUTINE eos_fzp_2d_t 
    10921261 
    10931262 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/ISOMIP+/MY_SRC/istate.F90

    r13583 r14770  
    117117            CALL dta_tsd( nit000, 'ini', ts(:,:,:,:,Kbb) )       ! read 3D T and S data at nit000 
    118118            ! 
    119             ssh(:,:,Kbb)   = 0._wp               ! set the ocean at rest 
    120             uu  (:,:,:,Kbb) = 0._wp 
    121             vv  (:,:,:,Kbb) = 0._wp   
     119            uu (:,:,:,Kbb) = 0._wp 
     120            vv (:,:,:,Kbb) = 0._wp 
    122121            ! 
    123             IF( ll_wd ) THEN 
    124                ssh(:,:,Kbb) =  -ssh_ref  ! Added in 30 here for bathy that adds 30 as Iterative test CEOD  
    125                ! 
    126                ! Apply minimum wetdepth criterion 
    127                ! 
    128                DO_2D( 1, 1, 1, 1 ) 
    129                   IF( ht_0(ji,jj) + ssh(ji,jj,Kbb)  < rn_wdmin1 ) THEN 
    130                      ssh(ji,jj,Kbb) = tmask(ji,jj,1)*( rn_wdmin1 - (ht_0(ji,jj)) ) 
    131                   ENDIF 
    132                END_2D 
    133             ENDIF  
    134              ! 
    135122         ELSE                                 ! user defined initial T and S 
    136123            DO jk = 1, jpk 
    137124               zgdept(:,:,jk) = gdept(:,:,jk,Kbb) 
    138125            END DO 
    139             CALL usr_def_istate( zgdept, tmask, ts(:,:,:,:,Kbb), uu(:,:,:,Kbb), vv(:,:,:,Kbb), ssh(:,:,Kbb)  )          
     126            CALL usr_def_istate( zgdept, tmask, ts(:,:,:,:,Kbb), uu(:,:,:,Kbb), vv(:,:,:,Kbb)  )          
    140127         ENDIF 
    141128         ts  (:,:,:,:,Kmm) = ts (:,:,:,:,Kbb)       ! set now values from to before ones 
    142          ssh (:,:,Kmm)     = ssh(:,:,Kbb)    
    143129         uu   (:,:,:,Kmm)   = uu  (:,:,:,Kbb) 
    144130         vv   (:,:,:,Kmm)   = vv  (:,:,:,Kbb) 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/ISOMIP+/MY_SRC/tradmp.F90

    r13295 r14770  
    9595      ! 
    9696      INTEGER ::   ji, jj, jk, jn   ! dummy loop indices 
    97       REAL(wp), DIMENSION(jpi,jpj,jpk,jpts)     ::  zts_dta 
     97      REAL(wp), DIMENSION(A2D(nn_hls),jpk,jpts)     ::  zts_dta 
    9898      REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE ::  ztrdts 
    9999      !!---------------------------------------------------------------------- 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/ISOMIP+/cpp_ISOMIP+.fcm

    r11889 r14770  
    1  bld::tool::fppkeys   key_iomput key_mpp_mpi  
     1 bld::tool::fppkeys   key_xios  
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/ISOMIP/EXPREF/namelist_cfg

    r13731 r14770  
    488488!!                  ***  Miscellaneous namelists  ***                 !! 
    489489!!                                                                    !! 
    490 !!   nammpp            Massively Parallel Processing                    ("key_mpp_mpi") 
     490!!   nammpp            Massively Parallel Processing 
    491491!!   namctl            Control prints                                   (default: OFF) 
    492492!!   namsto            Stochastic parametrization of EOS                (default: OFF) 
     
    494494! 
    495495!----------------------------------------------------------------------- 
    496 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi") 
     496&nammpp        !   Massively Parallel Processing 
    497497!----------------------------------------------------------------------- 
    498498/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/ISOMIP/MY_SRC/usrdef_hgr.F90

    r13295 r14770  
    7777      ! 
    7878      !                       !==  grid point position  ==!   (in degrees) 
    79       DO_2D( 1, 1, 1, 1 ) 
     79      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    8080         !                       ! longitude   (west coast at lon=0°) 
    81          plamt(ji,jj) = rn_e1deg * (  - 0.5 + REAL( mig0_oldcmp(ji)-1 , wp )  )   
    82          plamu(ji,jj) = rn_e1deg * (          REAL( mig0_oldcmp(ji)-1 , wp )  ) 
     81         plamt(ji,jj) = rn_e1deg * (  - 0.5 + REAL( mig0(ji)-1 , wp )  )   
     82         plamu(ji,jj) = rn_e1deg * (          REAL( mig0(ji)-1 , wp )  ) 
    8383         plamv(ji,jj) = plamt(ji,jj) 
    8484         plamf(ji,jj) = plamu(ji,jj) 
    85          !                       ! latitude   (south coast at lat= 81°) 
    86          pphit(ji,jj) = rn_e2deg * (  - 0.5 + REAL( mjg0_oldcmp(jj)-1 , wp )  ) - 80._wp 
     85         !                       ! latitude   (south coast at lat=-80°) 
     86         pphit(ji,jj) = rn_e2deg * (  - 0.5 + REAL( mjg0(jj)-1 , wp )  ) - 80._wp 
    8787         pphiu(ji,jj) = pphit(ji,jj) 
    88          pphiv(ji,jj) = rn_e2deg * (          REAL( mjg0_oldcmp(jj)-1 , wp )  ) - 80_wp 
     88         pphiv(ji,jj) = rn_e2deg * (          REAL( mjg0(jj)-1 , wp )  ) - 80._wp 
    8989         pphif(ji,jj) = pphiv(ji,jj) 
    9090      END_2D 
    9191      ! 
    9292      !                       !==  Horizontal scale factors  ==!   (in meters) 
    93       DO_2D( 1, 1, 1, 1 ) 
     93      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    9494         !                       ! e1   (zonal) 
    9595         pe1t(ji,jj) = ra * rad * COS( rad * pphit(ji,jj) ) * rn_e1deg 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/ISOMIP/MY_SRC/usrdef_istate.F90

    r10074 r14770  
    99   !! History :  NEMO ! 2016-11 (S. Flavoni)             Original code 
    1010   !!                 ! 2017-02 (P. Mathiot, S. Flavoni) Adapt code to ISOMIP case 
     11   !!                 ! 2020-11 (S. Techene, G. Madec) separate tsuv from ssh 
    1112   !!---------------------------------------------------------------------- 
    1213 
     
    2425   PRIVATE 
    2526 
    26    PUBLIC   usr_def_istate   ! called by istate.F90 
     27   PUBLIC   usr_def_istate       ! called by istate.F90 
     28   PUBLIC   usr_def_istate_ssh   ! called by domqco.F90 
    2729 
    2830   !!---------------------------------------------------------------------- 
     
    3335CONTAINS 
    3436   
    35    SUBROUTINE usr_def_istate( pdept, ptmask, pts, pu, pv, pssh ) 
     37   SUBROUTINE usr_def_istate( pdept, ptmask, pts, pu, pv ) 
    3638      !!---------------------------------------------------------------------- 
    3739      !!                   ***  ROUTINE usr_def_istate  *** 
     
    4850      REAL(wp), DIMENSION(jpi,jpj,jpk)     , INTENT(  out) ::   pu      ! i-component of the velocity  [m/s]  
    4951      REAL(wp), DIMENSION(jpi,jpj,jpk)     , INTENT(  out) ::   pv      ! j-component of the velocity  [m/s]  
    50       REAL(wp), DIMENSION(jpi,jpj)         , INTENT(  out) ::   pssh    ! sea-surface height 
    51       ! 
    52       INTEGER  ::   jk     ! dummy loop indices 
    5352      !!---------------------------------------------------------------------- 
    5453      ! 
     
    5857      pu  (:,:,:) = 0._wp        ! ocean at rest 
    5958      pv  (:,:,:) = 0._wp 
    60       pssh(:,:)   = 0._wp 
    61       ! 
    6259      !                          ! T & S profiles 
    6360      pts(:,:,:,jp_tem) = - 1.9 * ptmask(:,:,:)          ! ISOMIP configuration : start from constant T+S fields 
     
    6663   END SUBROUTINE usr_def_istate 
    6764 
     65 
     66   SUBROUTINE usr_def_istate_ssh( ptmask, pssh ) 
     67      !!---------------------------------------------------------------------- 
     68      !!                   ***  ROUTINE usr_def_istate_ssh  *** 
     69      !!  
     70      !! ** Purpose :   Initialization of ssh 
     71      !!                Here ISOMIP configuration  
     72      !! 
     73      !! ** Method  :   set ssh to 0 
     74      !!---------------------------------------------------------------------- 
     75      REAL(wp), DIMENSION(jpi,jpj,jpk)     , INTENT(in   ) ::   ptmask  ! t-point ocean mask   [m] 
     76      REAL(wp), DIMENSION(jpi,jpj)         , INTENT(  out) ::   pssh    ! sea-surface height   [m] 
     77      !!---------------------------------------------------------------------- 
     78      ! 
     79      IF(lwp) WRITE(numout,*) 
     80      IF(lwp) WRITE(numout,*) 'usr_def_istate_ssh : ISOMIP configuration, analytical definition of initial state' 
     81      ! 
     82      pssh(:,:)   = 0._wp 
     83      ! 
     84   END SUBROUTINE usr_def_istate_ssh 
     85 
    6886   !!====================================================================== 
    6987END MODULE usrdef_istate 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/ISOMIP/MY_SRC/usrdef_nam.F90

    r13286 r14770  
    4141CONTAINS 
    4242 
    43    SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     43   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 
    4444      !!---------------------------------------------------------------------- 
    4545      !!                     ***  ROUTINE dom_nam  *** 
     
    5353      !! ** input   : - namusr_def namelist found in namelist_cfg 
    5454      !!---------------------------------------------------------------------- 
    55       CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    56       INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
    57       INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes  
    58       INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
     55      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name 
     56      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution 
     57      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes 
     58      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity 
     59      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding 
     60      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F 
    5961      ! 
    6062      INTEGER ::   ios   ! Local integer 
     
    7779      ! 
    7880      !                             ! Set the lateral boundary condition of the global domain 
    79       kperio = 0                    ! ISOMIP configuration : close basin 
     81      ldIperio = .FALSE.   ;   ldJperio = .FALSE.   ! ISOMIP configuration : closed domain 
     82      ldNFold  = .FALSE.   ;   cdNFtype = '-' 
    8083      ! 
    8184      !                             ! control print 
     
    98101         WRITE(numout,*) '                                               jpkglo   = ', kpk 
    99102         WRITE(numout,*) '   ' 
    100          WRITE(numout,*) '   Lateral boundary condition of the global domain' 
    101          WRITE(numout,*) '      ISOMIP : closed basin                    jperio   = ', kperio 
    102103      ENDIF 
    103104      ! 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/ISOMIP/cpp_ISOMIP.fcm

    r10425 r14770  
    1  bld::tool::fppkeys   key_iomput key_mpp_mpi  
     1 bld::tool::fppkeys   key_xios  
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT2_flux_cen2_cfg

    r13476 r14770  
    190190/ 
    191191!----------------------------------------------------------------------- 
    192 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi) 
     192&nammpp        !   Massively Parallel Processing 
    193193!----------------------------------------------------------------------- 
    194194/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT2_flux_ubs_cfg

    r13558 r14770  
    201201   ln_dynvor_mix = .false. !  mixed scheme 
    202202   ln_dynvor_een = .false. !  energy & enstrophy scheme 
    203       nn_een_e3f = 0             !  e3f = masked averaging of e3t divided by 4 (=0) or by the sum of mask (=1) 
    204203/ 
    205204!----------------------------------------------------------------------- 
     
    290289!!                  ***  Miscellaneous namelists  ***                 !! 
    291290!!                                                                    !! 
    292 !!   nammpp            Massively Parallel Processing                    ("key_mpp_mpi") 
     291!!   nammpp            Massively Parallel Processing 
    293292!!   namctl            Control prints                                   (default: OFF) 
    294293!!   namsto            Stochastic parametrization of EOS                (default: OFF) 
     
    296295! 
    297296!----------------------------------------------------------------------- 
    298 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi) 
     297&nammpp        !   Massively Parallel Processing 
    299298!----------------------------------------------------------------------- 
    300299/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT2_vect_eenH_cfg

    r13476 r14770  
    189189/ 
    190190!----------------------------------------------------------------------- 
    191 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi) 
     191&nammpp        !   Massively Parallel Processing 
    192192!----------------------------------------------------------------------- 
    193193/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT2_vect_een_cfg

    r13476 r14770  
    188188/ 
    189189!----------------------------------------------------------------------- 
    190 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi) 
     190&nammpp        !   Massively Parallel Processing 
    191191!----------------------------------------------------------------------- 
    192192/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT2_vect_ene_cfg

    r13476 r14770  
    188188/ 
    189189!----------------------------------------------------------------------- 
    190 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi) 
     190&nammpp        !   Massively Parallel Processing 
    191191!----------------------------------------------------------------------- 
    192192/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT2_vect_ens_cfg

    r13476 r14770  
    129129   ln_dynvor_mix = .false. !  mixed scheme 
    130130   ln_dynvor_een = .false. !  energy & enstrophy scheme 
    131       nn_een_e3f = 0             !  e3f = masked averaging of e3t divided by 4 (=0) or by the sum of mask (=1) 
    132131/ 
    133132!----------------------------------------------------------------------- 
     
    189188/ 
    190189!----------------------------------------------------------------------- 
    191 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi) 
     190&nammpp        !   Massively Parallel Processing 
    192191!----------------------------------------------------------------------- 
    193192/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT4_flux_cen2_cfg

    r13476 r14770  
    189189/ 
    190190!----------------------------------------------------------------------- 
    191 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi) 
     191&nammpp        !   Massively Parallel Processing 
    192192!----------------------------------------------------------------------- 
    193193/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT4_flux_ubs_cfg

    r13476 r14770  
    189189/ 
    190190!----------------------------------------------------------------------- 
    191 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi) 
     191&nammpp        !   Massively Parallel Processing 
    192192!----------------------------------------------------------------------- 
    193193/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT4_vect_eenH_cfg

    r13476 r14770  
    188188/ 
    189189!----------------------------------------------------------------------- 
    190 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi) 
     190&nammpp        !   Massively Parallel Processing 
    191191!----------------------------------------------------------------------- 
    192192/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT4_vect_een_cfg

    r13476 r14770  
    189189/ 
    190190!----------------------------------------------------------------------- 
    191 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi) 
     191&nammpp        !   Massively Parallel Processing 
    192192!----------------------------------------------------------------------- 
    193193/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT4_vect_ene_cfg

    r13476 r14770  
    190190/ 
    191191!----------------------------------------------------------------------- 
    192 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi) 
     192&nammpp        !   Massively Parallel Processing 
    193193!----------------------------------------------------------------------- 
    194194/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT4_vect_ens_cfg

    r13476 r14770  
    189189/ 
    190190!----------------------------------------------------------------------- 
    191 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi) 
     191&nammpp        !   Massively Parallel Processing 
    192192!----------------------------------------------------------------------- 
    193193/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/LOCK_EXCHANGE/MY_SRC/usrdef_hgr.F90

    r13295 r14770  
    7474      !                       !==  grid point position  ==!   (in kilometers) 
    7575      zfact = rn_dx * 1.e-3         ! conversion in km 
    76       DO_2D( 1, 1, 1, 1 ) 
    77          !                       ! longitude 
    78          plamt(ji,jj) = zfact * (  - 0.5 + REAL( mig0_oldcmp(ji)-1 , wp )  )   
    79          plamu(ji,jj) = zfact * (          REAL( mig0_oldcmp(ji)-1 , wp )  ) 
     76      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
     77         !                       ! longitude   (west coast at lon=0°) 
     78         plamt(ji,jj) = zfact * (  - 0.5 + REAL( mig0(ji)-1 , wp )  )   
     79         plamu(ji,jj) = zfact * (          REAL( mig0(ji)-1 , wp )  ) 
    8080         plamv(ji,jj) = plamt(ji,jj) 
    8181         plamf(ji,jj) = plamu(ji,jj) 
    82          !                       ! latitude 
    83          pphit(ji,jj) = zfact * (  - 0.5 + REAL( mjg0_oldcmp(jj)-1 , wp )  ) 
     82         !                       ! latitude   (south coast at lat= 0°) 
     83         pphit(ji,jj) = zfact * (  - 0.5 + REAL( mjg0(jj)-1 , wp )  ) 
    8484         pphiu(ji,jj) = pphit(ji,jj) 
    85          pphiv(ji,jj) = zfact * (          REAL( mjg0_oldcmp(jj)-1 , wp )  ) 
     85         pphiv(ji,jj) = zfact * (          REAL( mjg0(jj)-1 , wp )  ) 
    8686         pphif(ji,jj) = pphiv(ji,jj) 
    8787      END_2D 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/LOCK_EXCHANGE/MY_SRC/usrdef_istate.F90

    r12489 r14770  
    88   !!====================================================================== 
    99   !! History :  NEMO ! 2016-03  (S. Flavoni, G. Madec) Original code 
     10   !!                 ! 2020-11  (S. Techene, G. Madec) separate tsuv from ssh 
    1011   !!---------------------------------------------------------------------- 
    1112 
     
    2324   PRIVATE 
    2425 
    25    PUBLIC   usr_def_istate   ! called by istate.F90 
     26   PUBLIC   usr_def_istate       ! called by istate.F90 
     27   PUBLIC   usr_def_istate_ssh   ! called by domqco.F90 
    2628 
    2729   !!---------------------------------------------------------------------- 
     
    3234CONTAINS 
    3335   
    34    SUBROUTINE usr_def_istate( pdept, ptmask, pts, pu, pv, pssh ) 
     36   SUBROUTINE usr_def_istate( pdept, ptmask, pts, pu, pv ) 
    3537      !!---------------------------------------------------------------------- 
    3638      !!                   ***  ROUTINE usr_def_istate  *** 
     
    4749      REAL(wp), DIMENSION(jpi,jpj,jpk)     , INTENT(  out) ::   pu      ! i-component of the velocity  [m/s]  
    4850      REAL(wp), DIMENSION(jpi,jpj,jpk)     , INTENT(  out) ::   pv      ! j-component of the velocity  [m/s]  
    49       REAL(wp), DIMENSION(jpi,jpj)         , INTENT(  out) ::   pssh    ! sea-surface height 
    5051      ! 
    5152      INTEGER  ::   jk     ! dummy loop indices 
     
    6566      pu  (:,:,:) = 0._wp        ! ocean at rest 
    6667      pv  (:,:,:) = 0._wp 
    67       pssh(:,:)   = 0._wp 
    6868      ! 
    6969      !                          ! T & S profiles 
     
    7878   END SUBROUTINE usr_def_istate 
    7979 
     80 
     81   SUBROUTINE usr_def_istate_ssh( ptmask, pssh ) 
     82      !!---------------------------------------------------------------------- 
     83      !!                   ***  ROUTINE usr_def_istate_ssh  *** 
     84      !!  
     85      !! ** Purpose :   Initialization of ssh 
     86      !!                Here LOCK_EXCHANGE configuration  
     87      !! 
     88      !! ** Method  :   set ssh to 0 
     89      !!---------------------------------------------------------------------- 
     90      REAL(wp), DIMENSION(jpi,jpj,jpk)     , INTENT(in   ) ::   ptmask  ! t-point ocean mask   [m] 
     91      REAL(wp), DIMENSION(jpi,jpj)         , INTENT(  out) ::   pssh    ! sea-surface height   [m] 
     92      !!---------------------------------------------------------------------- 
     93      ! 
     94      IF(lwp) WRITE(numout,*) 
     95      IF(lwp) WRITE(numout,*) 'usr_def_istate_ssh : LOCK_EXCHANGE configuration, analytical definition of initial state' 
     96      ! 
     97      pssh(:,:)   = 0._wp 
     98      ! 
     99   END SUBROUTINE usr_def_istate_ssh 
     100 
    80101   !!====================================================================== 
    81102END MODULE usrdef_istate 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/LOCK_EXCHANGE/MY_SRC/usrdef_nam.F90

    r13286 r14770  
    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      kpk = INT(  20.  / rn_dz ) + 1 
    7476      !                             ! Set the lateral boundary condition of the global domain 
    75       kperio = 0                    ! LOCK_EXCHANGE configuration : closed domain 
     77      ldIperio = .FALSE.   ;   ldJperio = .FALSE.   ! LOCK_EXCHANGE configuration : closed domain 
     78      ldNFold  = .FALSE.   ;   cdNFtype = '-' 
    7679      ! 
    7780      !                             ! control print 
     
    8891         WRITE(numout,*) '                                               jpkglo = ', kpk 
    8992         WRITE(numout,*) '   ' 
    90          WRITE(numout,*) '   Lateral boundary condition of the global domain' 
    91          WRITE(numout,*) '      closed                                   jperio = ', kperio 
    9293      ENDIF 
    9394      ! 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/LOCK_EXCHANGE/MY_SRC/usrdef_zgr.F90

    r12377 r14770  
    8484      ! 
    8585      ! no ocean cavities : top ocean level is ONE, except over land 
    86       ! the ocean basin surrounded by land (1 grid-point) set through lbc_lnk call as jperio=0  
     86      ! the ocean basin surrounded by land (1+nn_hls grid-points) set through lbc_lnk call 
    8787      z2d(:,:) = 1._wp                    ! surface ocean is the 1st level 
    88       CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )        ! closed basin since jperio = 0 (see userdef_nam.F90) 
     88      CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )        ! closed basin, see userdef_nam.F90 
    8989      k_top(:,:) = NINT( z2d(:,:) ) 
    9090      ! 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/LOCK_EXCHANGE/cpp_LOCK_EXCHANGE.fcm

    r10425 r14770  
    1  bld::tool::fppkeys   key_iomput key_mpp_mpi  
     1 bld::tool::fppkeys   key_qco key_xios  
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/OVERFLOW/EXPREF/namelist_sco_FCT2_flux_cen-ahm1000_cfg

    r13558 r14770  
    139139   ln_dynvor_mix = .false. !  mixed scheme 
    140140   ln_dynvor_een = .false. !  energy & enstrophy scheme 
    141       nn_een_e3f = 0             !  e3f = masked averaging of e3t divided by 4 (=0) or by the sum of mask (=1) 
    142141/ 
    143142!----------------------------------------------------------------------- 
     
    214213/ 
    215214!----------------------------------------------------------------------- 
    216 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi) 
     215&nammpp        !   Massively Parallel Processing 
    217216!----------------------------------------------------------------------- 
    218217/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/OVERFLOW/EXPREF/namelist_sco_FCT2_flux_ubs_cfg

    r13558 r14770  
    139139   ln_dynvor_mix = .false. !  mixed scheme 
    140140   ln_dynvor_een = .false. !  energy & enstrophy scheme 
    141       nn_een_e3f = 0             !  e3f = masked averaging of e3t divided by 4 (=0) or by the sum of mask (=1) 
    142141/ 
    143142!----------------------------------------------------------------------- 
     
    214213/ 
    215214!----------------------------------------------------------------------- 
    216 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi) 
     215&nammpp        !   Massively Parallel Processing 
    217216!----------------------------------------------------------------------- 
    218217/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/OVERFLOW/EXPREF/namelist_sco_FCT4_flux_cen-ahm1000_cfg

    r13558 r14770  
    139139   ln_dynvor_mix = .false. !  mixed scheme 
    140140   ln_dynvor_een = .false. !  energy & enstrophy scheme 
    141       nn_een_e3f = 0             !  e3f = masked averaging of e3t divided by 4 (=0) or by the sum of mask (=1) 
    142141/ 
    143142!----------------------------------------------------------------------- 
     
    214213/ 
    215214!----------------------------------------------------------------------- 
    216 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi) 
     215&nammpp        !   Massively Parallel Processing 
    217216!----------------------------------------------------------------------- 
    218217/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/OVERFLOW/EXPREF/namelist_sco_FCT4_flux_ubs_cfg

    r13558 r14770  
    139139   ln_dynvor_mix = .false. !  mixed scheme 
    140140   ln_dynvor_een = .false. !  energy & enstrophy scheme 
    141       nn_een_e3f = 0             !  e3f = masked averaging of e3t divided by 4 (=0) or by the sum of mask (=1) 
    142141/ 
    143142!----------------------------------------------------------------------- 
     
    214213/ 
    215214!----------------------------------------------------------------------- 
    216 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi) 
     215&nammpp        !   Massively Parallel Processing 
    217216!----------------------------------------------------------------------- 
    218217/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/OVERFLOW/EXPREF/namelist_zps_FCT2_flux_ubs_cfg

    r13558 r14770  
    139139   ln_dynvor_mix = .false. !  mixed scheme 
    140140   ln_dynvor_een = .false. !  energy & enstrophy scheme 
    141       nn_een_e3f = 0             !  e3f = masked averaging of e3t divided by 4 (=0) or by the sum of mask (=1) 
    142141/ 
    143142!----------------------------------------------------------------------- 
     
    215214/ 
    216215!----------------------------------------------------------------------- 
    217 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi) 
     216&nammpp        !   Massively Parallel Processing 
    218217!----------------------------------------------------------------------- 
    219218/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/OVERFLOW/EXPREF/namelist_zps_FCT4_flux_ubs_cfg

    r13558 r14770  
    201201   ln_dynvor_mix = .false. !  mixed scheme 
    202202   ln_dynvor_een = .false. !  energy & enstrophy scheme 
    203       nn_een_e3f = 0             !  e3f = masked averaging of e3t divided by 4 (=0) or by the sum of mask (=1) 
    204203/ 
    205204!----------------------------------------------------------------------- 
     
    308307!!                  ***  Miscellaneous namelists  ***                 !! 
    309308!!                                                                    !! 
    310 !!   nammpp            Massively Parallel Processing                    ("key_mpp_mpi") 
     309!!   nammpp            Massively Parallel Processing 
    311310!!   namctl            Control prints                                   (default: OFF) 
    312311!!   namsto            Stochastic parametrization of EOS                (default: OFF) 
     
    314313! 
    315314!----------------------------------------------------------------------- 
    316 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi) 
     315&nammpp        !   Massively Parallel Processing 
    317316!----------------------------------------------------------------------- 
    318317/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/OVERFLOW/EXPREF/namelist_zps_FCT4_vect_een_cfg

    r13558 r14770  
    139139   ln_dynvor_mix = .false. !  mixed scheme 
    140140   ln_dynvor_een = .true. !  energy & enstrophy scheme 
    141       nn_een_e3f = 0             !  e3f = masked averaging of e3t divided by 4 (=0) or by the sum of mask (=1) 
    142141/ 
    143142!----------------------------------------------------------------------- 
     
    214213/ 
    215214!----------------------------------------------------------------------- 
    216 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi) 
     215&nammpp        !   Massively Parallel Processing 
    217216!----------------------------------------------------------------------- 
    218217/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/OVERFLOW/MY_SRC/usrdef_hgr.F90

    r13295 r14770  
    7474      !                       !==  grid point position  ==!   (in kilometers) 
    7575      zfact = rn_dx * 1.e-3         ! conversion in km 
    76       DO_2D( 1, 1, 1, 1 ) 
    77          !                       ! longitude 
    78          plamt(ji,jj) = zfact * (  - 0.5 + REAL( mig0_oldcmp(ji)-1 , wp )  )   
    79          plamu(ji,jj) = zfact * (          REAL( mig0_oldcmp(ji)-1 , wp )  ) 
     76      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
     77         !                       ! longitude   (west coast at lon=0°) 
     78         plamt(ji,jj) = zfact * (  - 0.5 + REAL( mig0(ji)-1 , wp )  )   
     79         plamu(ji,jj) = zfact * (          REAL( mig0(ji)-1 , wp )  ) 
    8080         plamv(ji,jj) = plamt(ji,jj) 
    8181         plamf(ji,jj) = plamu(ji,jj) 
    82          !                       ! latitude 
    83          pphit(ji,jj) = zfact * (  - 0.5 + REAL( mjg0_oldcmp(jj)-1 , wp )  ) 
     82         !                       ! latitude   (south coast at lat= 0°) 
     83         pphit(ji,jj) = zfact * (  - 0.5 + REAL( mjg0(jj)-1 , wp )  ) 
    8484         pphiu(ji,jj) = pphit(ji,jj) 
    85          pphiv(ji,jj) = zfact * (          REAL( mjg0_oldcmp(jj)-1 , wp )  ) 
     85         pphiv(ji,jj) = zfact * (          REAL( mjg0(jj)-1 , wp )  ) 
    8686         pphif(ji,jj) = pphiv(ji,jj) 
    8787      END_2D 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/OVERFLOW/MY_SRC/usrdef_istate.F90

    r12489 r14770  
    88   !!============================================================================== 
    99   !! History :  NEMO ! 2016-03  (S. Flavoni, G. Madec) Original code 
     10   !!                 ! 2020-11  (S. Techene, G. Madec) separate tsuv from ssh 
    1011   !!---------------------------------------------------------------------- 
    1112 
     
    2324   PRIVATE 
    2425 
    25    PUBLIC   usr_def_istate   ! called by istate.F90 
    26  
     26   PUBLIC   usr_def_istate       ! called by istate.F90 
     27   PUBLIC   usr_def_istate_ssh   ! called by domqco.F90 
     28    
    2729   !!---------------------------------------------------------------------- 
    2830   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     
    3234CONTAINS 
    3335   
    34    SUBROUTINE usr_def_istate( pdept, ptmask, pts, pu, pv, pssh ) 
     36   SUBROUTINE usr_def_istate( pdept, ptmask, pts, pu, pv ) 
    3537      !!---------------------------------------------------------------------- 
    3638      !!                   ***  ROUTINE usr_def_istate  *** 
     
    4749      REAL(wp), DIMENSION(jpi,jpj,jpk)     , INTENT(  out) ::   pu      ! i-component of the velocity  [m/s]  
    4850      REAL(wp), DIMENSION(jpi,jpj,jpk)     , INTENT(  out) ::   pv      ! j-component of the velocity  [m/s]  
    49       REAL(wp), DIMENSION(jpi,jpj)         , INTENT(  out) ::   pssh    ! sea-surface height 
    5051      ! 
    5152      INTEGER  ::   jk     ! dummy loop indices 
     
    6566      pu  (:,:,:) = 0._wp        ! ocean at rest 
    6667      pv  (:,:,:) = 0._wp 
    67       pssh(:,:)   = 0._wp 
    6868      ! 
    6969      !                          ! T & S profiles 
     
    7878   END SUBROUTINE usr_def_istate 
    7979 
     80 
     81   SUBROUTINE usr_def_istate_ssh( ptmask, pssh ) 
     82      !!---------------------------------------------------------------------- 
     83      !!                   ***  ROUTINE usr_def_istate_ssh  *** 
     84      !!  
     85      !! ** Purpose :   Initialization of the ssh 
     86      !!                Here  OVERFLOW configuration  
     87      !! 
     88      !! ** Method  :   set ssh to 0 
     89      !!---------------------------------------------------------------------- 
     90      REAL(wp), DIMENSION(jpi,jpj,jpk)     , INTENT(in   ) ::   ptmask  ! t-point ocean mask   [m] 
     91      REAL(wp), DIMENSION(jpi,jpj)         , INTENT(  out) ::   pssh    ! sea-surface height   [m] 
     92      !!---------------------------------------------------------------------- 
     93      ! 
     94      IF(lwp) WRITE(numout,*) 
     95      IF(lwp) WRITE(numout,*) 'usr_def_istate_ssh : OVERFLOW configuration, analytical definition of initial state' 
     96      ! 
     97      pssh(:,:)   = 0._wp 
     98      ! 
     99   END SUBROUTINE usr_def_istate_ssh 
     100 
    80101   !!====================================================================== 
    81102END MODULE usrdef_istate 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/OVERFLOW/MY_SRC/usrdef_nam.F90

    r13286 r14770  
    3838CONTAINS 
    3939 
    40    SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     40   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 
    4141      !!---------------------------------------------------------------------- 
    4242      !!                     ***  ROUTINE dom_nam  *** 
     
    5050      !! ** input   : - namusr_def namelist found in namelist_cfg 
    5151      !!---------------------------------------------------------------------- 
    52       CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    53       INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
    54       INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes  
    55       INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
     52      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name 
     53      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution 
     54      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes 
     55      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity 
     56      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding 
     57      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F 
    5658      ! 
    5759      INTEGER ::   ios   ! Local integer 
     
    8890      WRITE(numout,*) '                                               Nj0glo = ', kpj 
    8991      WRITE(numout,*) '                                               jpkglo = ', kpk 
     92      WRITE(numout,*) '   ' 
    9093      ! 
    9194      !                             ! Set the lateral boundary condition of the global domain 
    92       kperio = 0                    ! OVERFLOW configuration : close basin 
    93       ! 
    94       WRITE(numout,*) '   ' 
    95       WRITE(numout,*) '   Lateral boundary condition of the global domain' 
    96       WRITE(numout,*) '      OVERFLOW : closed basin                  jperio = ', kperio 
     95      ldIperio = .FALSE.   ;   ldJperio = .FALSE.   ! OVERFLOW configuration : closed domain 
     96      ldNFold  = .FALSE.   ;   cdNFtype = '-' 
    9797      ! 
    9898   END SUBROUTINE usr_def_nam 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/OVERFLOW/MY_SRC/usrdef_zgr.F90

    r13295 r14770  
    110110      ! 
    111111      ! no ocean cavities : top ocean level is ONE, except over land 
    112       ! the ocean basin surrounded by land (1 grid-point) set through lbc_lnk call as jperio=0  
     112      ! the ocean basin surrounded by land (1+nn_hls grid-points) set through lbc_lnk call 
    113113      z2d(:,:) = 1._wp                    ! surface ocean is the 1st level 
    114       CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )        ! closed basin since jperio = 0 (see userdef_nam.F90) 
     114      CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )        ! closed basin, see userdef_nam.F90 
    115115      k_top(:,:) = NINT( z2d(:,:) ) 
    116116      ! 
     
    193193            pdept(ji,jj,ik+1) = pdepw(ji,jj,ik+1) + pe3t (ji,jj,ik+1) * 0.5_wp 
    194194            pe3w (ji,jj,ik+1) = pdept(ji,jj,ik+1) - pdept(ji,jj,ik)              ! = pe3t (ji,jj,ik  ) 
     195            pe3w (ji,jj,ik  ) = pdept(ji,jj,ik  ) - pdept(ji,jj,ik-1)            ! st caution ik > 1 
    195196         END_2D          
    196197         !                                   ! bottom scale factors and depth at  U-, V-, UW and VW-points 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/OVERFLOW/cpp_OVERFLOW.fcm

    r10425 r14770  
    1 bld::tool::fppkeys   key_mpp_mpi key_iomput  
     1bld::tool::fppkeys   key_qco key_xios  
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/README.rst

    r14091 r14770  
    206206   :labelprefix: T 
    207207 
     208ICE_RHEO 
     209-------- 
     210|  
     211 
     212BENCH 
     213----- 
     214| Benchmark configuration. Allow to run any configuration (including ORCA type or BDY) with idealized grid 
     215  and initial state so it does not need any input file other than the namelists. 
     216  As usual, all configuration changes can be done through the namelist.  
     217  We provide 3 example of namelist_cfg to mimic ORCA1, OR025 or ORCA12 configurations. 
     218  By default do not produce any output file. An extensive description of BENCH will be abailable in  
     219  Irrmann et al. 2021. 
     220 
    208221CPL_OASIS 
    209222--------- 
    210223| This test case checks the OASIS interface in OCE/SBC, allowing to set up  
    211 a coupled configuration through OASIS. See CPL_OASIS/README.md for more information. 
     224  a coupled configuration through OASIS. See CPL_OASIS/README.md for more information. 
    212225 
    213226DIA_GPU 
    214227--------- 
    215228| This is a demonstrator of diagnostic DIAHSB ported to GPU using CUDA Fortran.  
    216 Memory communications between host and device are asynchronous given the device has that capability.  
    217 This experiment is target for ORCA2_ICE_PISCES 
    218  
     229  Memory communications between host and device are asynchronous given the device has that capability.  
     230  This experiment is target for ORCA2_ICE_PISCES 
     231 
     232TSUNAMI 
     233--------- 
     234| just use dynspg_ts to simulate the propagation of an ssh anomaly (cosinus) in a box configuration 
     235  with flat bottom and jpk=2. 
     236 
     237DONUT 
     238----- 
     239| Donut shaped configuration to test MPI decomposition with bdy. 
     240 
     241C1D_ASICS 
     242--------- 
     243|  
     244 
     245DOME 
     246---- 
     247|  
     248 
     249ICB 
     250---- 
     251| ICB is a very idealized configuration used to test and debug the icb module. 
     252  The configuration is box with a shallow shelf (40m) on the east and west part of the domain  
     253  with a deep central trough (> 100m). 
     254  ICB are generating using the test capability of the icb model along a E-W line (this can easily be tuned). 
     255 
     256STATION_ASF 
     257----------- 
     258| this demonstration test case can be used to perform a sanity test of the SBCBLK interface of 
     259  NEMO.  It will test all the bulk-parameterization algorithms using an idealized 
     260  forcing that includes a wide range of *SSX / surface atmospheric state* 
     261  conditions to detect potential error / inconsistencies.  Both a short report and 
     262  boolean output: *passed* or *failed* is provided as an output. 
     263 
     264SWG 
     265--- 
     266| Square bassin blown with an analytical wind. Vertical structure allows only one mode 
     267  associated with reduced gravity to develop. This configuration is based on Adcroft & Marshall 1998. 
     268  Also run with RK3 time stepping.  
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/STATION_ASF/EXPREF/file_def_nemo-oce.xml

    r13132 r14770  
    11<?xml version="1.0"?> 
    2 <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1mo" min_digits="4"> 
    32 
    4   <file_group id="1ts" output_freq="1ts"  output_level="10" enabled=".TRUE."/> <!-- 1 time step files --> 
     3<file_definition type="one_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1mo" min_digits="4"> 
     4 
    55 
    66  <file_group id="1h" output_freq="1h"  output_level="10" enabled=".TRUE."> <!-- 1h files --> 
     
    1616      <field field_ref="dt_skin"      name="dt_skin"  /> 
    1717      <!--    --> 
    18       <field field_ref="qt_oce"       name="qt"   /> 
    19       <field field_ref="qsr_oce"      name="qsr"  /> 
    20       <field field_ref="qns_oce"      name="qns"  /> 
    21       <field field_ref="qla_oce"      name="qla"  /> 
    22       <field field_ref="qsb_oce"      name="qsb"  /> 
    23       <field field_ref="qlw_oce"      name="qlw"  /> 
    24       <field field_ref="qemp_oce"     name="qemp" /> 
     18      <field field_ref="qt_oce"       name="qt_oce"   /> 
     19      <field field_ref="qsr_oce"      name="qsr_oce"  /> 
     20      <field field_ref="qns_oce"      name="qns_oce"  /> 
     21      <field field_ref="qla_oce"      name="qla_oce"  /> 
     22      <field field_ref="qsb_oce"      name="qsb_oce"  /> 
     23      <field field_ref="qlw_oce"      name="qlw_oce"  /> 
     24      <field field_ref="qemp_oce"     name="qemp_oce" /> 
    2525      <!-- --> 
    26       <field field_ref="evap_oce"     name="evap" /> 
     26      <field field_ref="evap_oce"     name="evap_oce" /> 
    2727      <field field_ref="precip"       name="precip" /> 
    28       <field field_ref="empmr"        name="empmr" /> 
     28      <!-- <field field_ref="empmr"   name="empmr" /> --> 
    2929      <!-- --> 
    30       <field field_ref="taum"         name="taum"   /> 
     30      <field field_ref="taum_oce"     name="taum"   /> 
     31      <field field_ref="utau_oce"     name="utau"   /> 
     32      <field field_ref="vtau_oce"     name="vtau"   /> 
    3133      <field field_ref="wspd"         name="windsp" /> 
    3234      <!-- --> 
     
    3436      <field field_ref="Ce_oce"       name="Ce_oce" /> 
    3537      <field field_ref="Ch_oce"       name="Ch_oce" /> 
     38      <!-- --> 
    3639      <field field_ref="theta_zt"     name="theta_zt" /> 
    3740      <field field_ref="q_zt"         name="q_zt" /> 
     
    4245    </file> 
    4346 
    44     <file id="file2" name_suffix="_gridU" description="ocean U grid variables" compression_level="3" > 
    45       <field field_ref="utau"         name="tauuo"    /> 
    46     </file> 
    47  
    48     <file id="file3" name_suffix="_gridV" description="ocean V grid variables" compression_level="3" > 
    49       <field field_ref="vtau"         name="tauvo"    /> 
    50     </file> 
    51  
    5247  </file_group> 
    5348 
    54   <file_group id="2h" output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files --> 
    55   <file_group id="3h" output_freq="3h"  output_level="10" enabled=".TRUE."/> <!-- 3h files --> 
    56   <file_group id="4h" output_freq="4h"  output_level="10" enabled=".TRUE."/> <!-- 4h files --> 
    57   <file_group id="6h" output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files --> 
    58   <file_group id="1d" output_freq="1d"  output_level="10" enabled=".TRUE."/> <!-- 1d files --> 
    59   <file_group id="3d" output_freq="3d"  output_level="10" enabled=".TRUE."/> <!-- 3d files --> 
    60   <file_group id="5d" output_freq="5d"  output_level="10" enabled=".TRUE."/> <!-- 5d files --> 
    61   <file_group id="1m" output_freq="1mo" output_level="10" enabled=".TRUE."/> <!-- real monthly files --> 
     49  <file_group id="1ts" output_freq="1ts" output_level="10" enabled=".TRUE."/> <!-- 1 time step files --> 
     50  <file_group id="2h"  output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files --> 
     51  <file_group id="3h"  output_freq="3h"  output_level="10" enabled=".TRUE."/> <!-- 3h files --> 
     52  <file_group id="4h"  output_freq="4h"  output_level="10" enabled=".TRUE."/> <!-- 4h files --> 
     53  <file_group id="6h"  output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files --> 
     54  <file_group id="1d"  output_freq="1d"  output_level="10" enabled=".TRUE."/> <!-- 1d files --> 
     55  <file_group id="3d"  output_freq="3d"  output_level="10" enabled=".TRUE."/> <!-- 3d files --> 
     56  <file_group id="5d"  output_freq="5d"  output_level="10" enabled=".TRUE."/> <!-- 5d files --> 
     57  <file_group id="1m"  output_freq="1mo" output_level="10" enabled=".TRUE."/> <!-- real monthly files --> 
    6258  <file_group id="2y"  output_freq="2y" output_level="10" enabled=".TRUE."/> <!-- real 2y files --> 
    6359  <file_group id="5y"  output_freq="5y" output_level="10" enabled=".TRUE."/> <!-- real 5y files --> 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/STATION_ASF/MY_SRC/diawri.F90

    r12615 r14770  
    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() 
     
    387387      CALL iom_rstput( 0, 0, inum, 'sozotaux', utau              )    ! i-wind stress 
    388388      CALL iom_rstput( 0, 0, inum, 'sometauy', vtau              )    ! j-wind stress 
    389  
     389      ! 
     390      CALL iom_close( inum ) 
     391      ! 
    390392#if defined key_si3 
    391393      IF( nn_ice == 2 ) THEN   ! condition needed in case agrif + ice-model but no-ice in child grid 
     394         CALL iom_open( TRIM(cdfile_name)//'_ice', inum, ldwrt = .TRUE., kdlev = jpl, cdcomp = 'ICE' ) 
    392395         CALL ice_wri_state( inum ) 
    393       ENDIF 
     396         CALL iom_close( inum ) 
     397      ENDIF 
     398      ! 
    394399#endif 
    395       ! 
    396       CALL iom_close( inum ) 
    397       ! 
    398400   END SUBROUTINE dia_wri_state 
    399401 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/STATION_ASF/MY_SRC/nemogcm.F90

    r13286 r14770  
    3030   USE step_c1d       ! Time stepping loop for the 1D configuration 
    3131   ! 
    32    USE prtctl         ! Print control 
    3332   USE in_out_manager ! I/O manager 
    3433   USE lib_mpp        ! distributed memory computing 
    3534   USE mppini         ! shared/distributed memory setting (mpp_init routine) 
    3635   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 
    37 #if defined key_iomput 
     36#if defined key_xios 
    3837   USE xios           ! xIOserver 
    3938#endif 
     
    4746   CHARACTER(lc) ::   cform_aaa="( /, 'AAAAAAAA', / ) "     ! flag for output listing 
    4847 
     48#if ! defined key_mpi_off 
     49   ! need MPI_Wtime 
     50   INCLUDE 'mpif.h' 
     51#endif 
     52 
    4953   !!---------------------------------------------------------------------- 
    5054   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
    51    !! $Id: nemogcm.F90 12489 2020-02-28 15:55:11Z davestorkey $ 
     55   !! $Id: nemogcm.F90 13286 2020-07-09 15:48:29Z smasson $ 
    5256   !! Software governed by the CeCILL license (see ./LICENSE) 
    5357   !!---------------------------------------------------------------------- 
     
    109113      CALL nemo_closefile 
    110114      ! 
    111 #if defined key_iomput 
    112                                     CALL xios_finalize  ! end mpp communications with xios 
     115#if defined key_xios 
     116      CALL xios_finalize  ! end mpp communications with xios 
    113117#else 
    114118      IF( lk_mpp )                  CALL mppstop      ! end mpp communications 
     
    144148      !                             !-------------------------------------------------! 
    145149      ! 
    146 #if defined key_iomput 
     150#if defined key_xios 
    147151      IF( Agrif_Root() ) THEN 
    148             CALL xios_initialize( "for_xios_mpi_id", return_comm=ilocal_comm )   ! nemo local communicator given by xios 
     152         CALL xios_initialize( "for_xios_mpi_id", return_comm=ilocal_comm )   ! nemo local communicator given by xios 
    149153      ENDIF 
    150154      CALL mpp_start( ilocal_comm ) 
    151155#else 
    152          CALL mpp_start( ) 
     156      CALL mpp_start( ) 
    153157#endif 
    154158      ! 
     
    163167      IF( lwm )   CALL ctl_opn(     numout,        'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    164168      ! open reference and configuration namelist files 
    165                   CALL load_nml( numnam_ref,        'namelist_ref',                                           -1, lwm ) 
    166                   CALL load_nml( numnam_cfg,        'namelist_cfg',                                           -1, lwm ) 
     169      CALL load_nml( numnam_ref,        'namelist_ref',                                           -1, lwm ) 
     170      CALL load_nml( numnam_cfg,        'namelist_cfg',                                           -1, lwm ) 
    167171      IF( lwm )   CALL ctl_opn(     numond, 'output.namelist.dyn', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    168172      ! open /dev/null file to be able to supress output write easily 
    169173      IF( Agrif_Root() ) THEN 
    170                   CALL ctl_opn(     numnul,           '/dev/null', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
     174         CALL ctl_opn(     numnul,           '/dev/null', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 
    171175#ifdef key_agrif 
    172176      ELSE 
    173                   numnul = Agrif_Parent(numnul)    
    174 #endif 
    175       ENDIF 
    176       ! 
     177         numnul = Agrif_Parent(numnul) 
     178#endif 
     179      ENDIF 
    177180      !                             !--------------------! 
    178181      !                             ! Open listing units !  -> need sn_cfctl from namctl to define lwp 
     
    215218         WRITE(numout,*) "     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ " 
    216219         WRITE(numout,*) 
     220 
     221         ! Print the working precision to ocean.output 
     222         IF (wp == dp) THEN 
     223            WRITE(numout,*) "Working precision = double-precision" 
     224         ELSE 
     225            WRITE(numout,*) "Working precision = single-precision" 
     226         ENDIF 
     227         WRITE(numout,*) 
    217228         ! 
    218229         WRITE(numout,cform_aaa)                                        ! Flag AAAAAAA 
     
    229240903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namcfg in reference namelist' ) 
    230241      READ  ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) 
    231 904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namcfg in configuration namelist' )    
     242904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namcfg in configuration namelist' ) 
    232243      ! 
    233244      IF( ln_read_cfg ) THEN            ! Read sizes in domain configuration file 
    234          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 ) 
    235246      ELSE                              ! user-defined namelist 
    236          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 ) 
    237248      ENDIF 
    238249      ! 
     
    263274                           CALL     eos_init        ! Equation of state 
    264275      IF( lk_c1d       )   CALL     c1d_init        ! 1D column configuration 
    265                            CALL     dom_init( Nbb, Nnn, Naa, "OPA") ! Domain 
     276                           CALL     dom_init( Nbb, Nnn, Naa ) ! Domain 
    266277      IF( sn_cfctl%l_prtctl )   & 
    267278         &                 CALL prt_ctl_init        ! Print control 
    268       ! 
    269        
     279 
    270280                           CALL  istate_init( Nbb, Nnn, Naa )    ! ocean initial state (Dynamics and tracers) 
    271281 
    272       !                                      ! external forcing  
     282      !                                      ! external forcing 
    273283                           CALL     sbc_init( Nbb, Nnn, Naa )    ! surface boundary conditions (including sea-ice) 
     284 
     285      !#LB: 
     286#if defined key_si3 
     287      IF(lwp) WRITE(numout,*) 'LOLO: nemo_init@nemogcm.F90: shape of fr_i ==>', SIZE(fr_i,1), SIZE(fr_i,2) 
     288      fr_i(:,:) = 0._wp 
     289#endif 
     290      !#LB. 
    274291 
    275292      ! 
     
    302319         WRITE(numout,*) '                              sn_cfctl%l_prttrc  = ', sn_cfctl%l_prttrc 
    303320         WRITE(numout,*) '                              sn_cfctl%l_oasout  = ', sn_cfctl%l_oasout 
    304          WRITE(numout,*) '                              sn_cfctl%procmin   = ', sn_cfctl%procmin   
    305          WRITE(numout,*) '                              sn_cfctl%procmax   = ', sn_cfctl%procmax   
    306          WRITE(numout,*) '                              sn_cfctl%procincr  = ', sn_cfctl%procincr  
    307          WRITE(numout,*) '                              sn_cfctl%ptimincr  = ', sn_cfctl%ptimincr  
     321         WRITE(numout,*) '                              sn_cfctl%procmin   = ', sn_cfctl%procmin 
     322         WRITE(numout,*) '                              sn_cfctl%procmax   = ', sn_cfctl%procmax 
     323         WRITE(numout,*) '                              sn_cfctl%procincr  = ', sn_cfctl%procincr 
     324         WRITE(numout,*) '                              sn_cfctl%ptimincr  = ', sn_cfctl%ptimincr 
    308325         WRITE(numout,*) '      timing by routine               ln_timing  = ', ln_timing 
    309326         WRITE(numout,*) '      CFL diagnostics                 ln_diacfl  = ', ln_diacfl 
     
    356373      !!                     ***  ROUTINE nemo_alloc  *** 
    357374      !! 
    358       !! ** Purpose :   Allocate all the dynamic arrays of the OPA modules 
     375      !! ** Purpose :   Allocate all the dynamic arrays of the OCE modules 
    359376      !! 
    360377      !! ** Method  : 
     
    366383      !!---------------------------------------------------------------------- 
    367384      ! 
    368       ierr =        oce_alloc    ()    ! ocean  
     385      ierr =        oce_alloc    ()    ! ocean 
    369386      ierr = ierr + dia_wri_alloc() 
    370387      ierr = ierr + dom_oce_alloc()    ! ocean domain 
     
    375392   END SUBROUTINE nemo_alloc 
    376393 
    377     
     394 
    378395   SUBROUTINE nemo_set_cfctl(sn_cfctl, setto ) 
    379396      !!---------------------------------------------------------------------- 
     
    399416   !!====================================================================== 
    400417END MODULE nemogcm 
    401  
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/STATION_ASF/MY_SRC/sbcssm.F90

    r12629 r14770  
    1919   USE lbclnk         ! ocean lateral boundary conditions (or mpp link) 
    2020   ! 
     21#if defined key_si3 
     22   USE ice            !#LB: we need to fill the "tm_su"   array! 
     23   USE sbc_ice        !#LB: we need to fill the "alb_ice" array! 
     24#endif 
     25   ! 
    2126   USE in_out_manager ! I/O manager 
    2227   USE iom            ! I/O library 
     
    4853   INTEGER     ::   jf_e3t         ! index of first T level thickness 
    4954   INTEGER     ::   jf_frq         ! index of fraction of qsr absorbed in the 1st T level 
     55#if defined key_si3 
     56   INTEGER     ::   jf_ifr         ! index of sea-ice concentration !#LB 
     57   INTEGER     ::   jf_tic         ! index of sea-ice surface temperature !#LB 
     58   INTEGER     ::   jf_ial         ! index of sea-ice surface albedo !#LB 
     59#endif 
    5060 
    5161   TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_ssm_3d  ! structure of input fields (file information, fields read) 
     
    5464   !!---------------------------------------------------------------------- 
    5565   !! NEMO/SAS 4.0 , NEMO Consortium (2018) 
    56    !! $Id: sbcssm.F90 12615 2020-03-26 15:18:49Z laurent $ 
     66   !! $Id: sbcssm.F90 13286 2020-07-09 15:48:29Z smasson $ 
    5767   !! Software governed by the CeCILL license (see ./LICENSE) 
    5868   !!---------------------------------------------------------------------- 
     
    7383      ! (not needed for SAS but needed to keep a consistent interface in sbcmod.F90) 
    7484      ! 
    75       INTEGER  ::   ji, jj    ! dummy loop indices 
     85      INTEGER  ::   ji, jj, jl ! dummy loop indices 
    7686      REAL(wp) ::   ztinta     ! ratio applied to after  records when doing time interpolation 
    7787      REAL(wp) ::   ztintb     ! ratio applied to before records when doing time interpolation 
     
    8494         IF( nfld_2d > 0 ) CALL fld_read( kt, 1, sf_ssm_2d )      !==   read data at kt time step   ==! 
    8595         ! 
    86          IF( ln_3d_uve ) THEN 
    87             IF( .NOT. ln_linssh ) THEN 
    88                e3t_m(:,:) = sf_ssm_3d(jf_e3t)%fnow(:,:,1) * tmask(:,:,1) ! vertical scale factor 
    89             ELSE 
    90                e3t_m(:,:) = e3t_0(:,:,1)                                 ! vertical scale factor 
    91             ENDIF 
    92             ssu_m(:,:) = sf_ssm_3d(jf_usp)%fnow(:,:,1) * umask(:,:,1)    ! u-velocity 
    93             ssv_m(:,:) = sf_ssm_3d(jf_vsp)%fnow(:,:,1) * vmask(:,:,1)    ! v-velocity 
    94          ELSE 
    95             IF( .NOT. ln_linssh ) THEN 
    96                e3t_m(:,:) = sf_ssm_2d(jf_e3t)%fnow(:,:,1) * tmask(:,:,1) ! vertical scale factor 
    97             ELSE 
    98                e3t_m(:,:) = e3t_0(:,:,1)                                 ! vertical scale factor 
    99             ENDIF 
    100             ssu_m(:,:) = sf_ssm_2d(jf_usp)%fnow(:,:,1) * umask(:,:,1)    ! u-velocity 
    101             ssv_m(:,:) = sf_ssm_2d(jf_vsp)%fnow(:,:,1) * vmask(:,:,1)    ! v-velocity 
    102          ENDIF 
    103          ! 
     96         e3t_m(:,:) = e3t_0(:,:,1)                                 ! vertical scale factor 
     97         ssu_m(:,:) = sf_ssm_2d(jf_usp)%fnow(:,:,1) * umask(:,:,1)    ! u-velocity 
     98         ssv_m(:,:) = sf_ssm_2d(jf_vsp)%fnow(:,:,1) * vmask(:,:,1)    ! v-velocity 
     99         ! 
     100         !#LB: 
     101#if defined key_si3 
     102         !IF(lwp) WRITE(numout,*) 'LOLO: sbc_ssm()@sbcssm.F90 => fill "tm_su" and other fields at kt =', kt 
     103         !IF(lwp) WRITE(numout,*) 'LOLO: sbc_ssm()@sbcssm.F90 => shape of at_i ==>', SIZE(at_i,1), SIZE(at_i,2) 
     104         at_i (:,:) = sf_ssm_2d(jf_ifr)%fnow(:,:,1) * tmask(:,:,1)    ! sea-ice concentration [fraction] 
     105         tm_su(:,:) = sf_ssm_2d(jf_tic)%fnow(:,:,1) * tmask(:,:,1)    ! sea-ice surface temperature, read in [K] !#LB 
     106         sst_m(:,:) = sf_ssm_2d(jf_ial)%fnow(:,:,1) * tmask(:,:,1)    ! !!!sst_m AS TEMPORARY ARRAY !!! sea-ice albedo [fraction] 
     107         DO jl = 1, jpl 
     108            !IF(lwp) WRITE(numout,*) 'LOLO: sbc_ssm()@sbcssm.F90 => fill "t_su" for ice cat =', jl 
     109            a_i    (:,:,jl) = at_i (:,:) 
     110            a_i_b  (:,:,jl) = at_i (:,:) 
     111            t_su   (:,:,jl) = tm_su(:,:) 
     112            alb_ice(:,:,jl) = sst_m(:,:) 
     113         END DO 
     114         !IF(lwp) WRITE(numout,*) '' 
     115#endif 
     116         !#LB. 
    104117         sst_m(:,:) = sf_ssm_2d(jf_tem)%fnow(:,:,1) * tmask(:,:,1)    ! temperature 
    105118         sss_m(:,:) = sf_ssm_2d(jf_sal)%fnow(:,:,1) * tmask(:,:,1)    ! salinity 
    106119         ssh_m(:,:) = sf_ssm_2d(jf_ssh)%fnow(:,:,1) * tmask(:,:,1)    ! sea surface height 
    107          IF( ln_read_frq ) THEN 
    108             frq_m(:,:) = sf_ssm_2d(jf_frq)%fnow(:,:,1) * tmask(:,:,1) ! solar penetration 
    109          ELSE 
    110             frq_m(:,:) = 1._wp 
    111          ENDIF 
     120         frq_m(:,:) = 1._wp 
    112121      ELSE 
    113122         sss_m(:,:) = 35._wp                             ! =35. to obtain a physical value for the freezing point 
     
    116125         ssv_m(:,:) = 0._wp 
    117126         ssh_m(:,:) = 0._wp 
    118          IF( .NOT. ln_linssh ) e3t_m(:,:) = e3t_0(:,:,1) !clem: necessary at least for sas2D 
    119127         frq_m(:,:) = 1._wp                              !              - - 
    120128         ssh  (:,:,Kmm) = 0._wp                              !              - - 
     
    136144         CALL prt_ctl(tab2d_1=ssv_m, clinfo1=' ssv_m   - : ', mask1=vmask   ) 
    137145         CALL prt_ctl(tab2d_1=ssh_m, clinfo1=' ssh_m   - : ', mask1=tmask   ) 
    138          IF( .NOT.ln_linssh )   CALL prt_ctl(tab2d_1=ssh_m, clinfo1=' e3t_m   - : ', mask1=tmask   ) 
    139          IF( ln_read_frq    )   CALL prt_ctl(tab2d_1=frq_m, clinfo1=' frq_m   - : ', mask1=tmask   ) 
    140146      ENDIF 
    141147      ! 
     
    146152         CALL iom_put( 'sss_m', sss_m ) 
    147153         CALL iom_put( 'ssh_m', ssh_m ) 
    148          IF( .NOT.ln_linssh )   CALL iom_put( 'e3t_m', e3t_m ) 
    149          IF( ln_read_frq    )   CALL iom_put( 'frq_m', frq_m ) 
    150154      ENDIF 
    151155      ! 
     
    175179      TYPE(FLD_N) ::   sn_ssh, sn_e3t, sn_frq 
    176180      !! 
     181      TYPE(FLD_N) ::   sn_ifr, sn_tic, sn_ial 
     182      !! 
    177183      NAMELIST/namsbc_sas/ l_sasread, cn_dir, ln_3d_uve, ln_read_frq,   & 
    178          &                 sn_tem, sn_sal, sn_usp, sn_vsp, sn_ssh, sn_e3t, sn_frq 
     184         &                 sn_tem, sn_sal, sn_usp, sn_vsp, sn_ssh, sn_e3t, sn_frq, & 
     185         &                 sn_ifr, sn_tic, sn_ial 
    179186      !!---------------------------------------------------------------------- 
    180187      ! 
     
    196203         WRITE(numout,*) '   Namelist namsbc_sas' 
    197204         WRITE(numout,*) '      Initialisation using an input file                                 l_sasread   = ', l_sasread 
    198          WRITE(numout,*) '      Are we supplying a 3D u,v and e3 field                             ln_3d_uve   = ', ln_3d_uve 
    199          WRITE(numout,*) '      Are we reading frq (fraction of qsr absorbed in the 1st T level)   ln_read_frq = ', ln_read_frq 
    200205      ENDIF 
    201206      ! 
     
    218223         IF( lwp ) WRITE(numout,*) '         ==>>>   No freshwater budget adjustment needed with StandAlone Surface scheme' 
    219224         nn_fwb = 0 
     225      ENDIF 
     226      IF( ln_closea ) THEN 
     227         IF( lwp ) WRITE(numout,*) '         ==>>>   No closed seas adjustment needed with StandAlone Surface scheme' 
     228         ln_closea = .false. 
    220229      ENDIF 
    221230 
     
    230239         !! and the rest of the logic should still work 
    231240         ! 
    232          jf_tem = 1   ;   jf_ssh = 3   ! default 2D fields index 
    233          jf_sal = 2   ;   jf_frq = 4   ! 
    234          ! 
    235          IF( ln_3d_uve ) THEN 
    236             jf_usp = 1   ;   jf_vsp = 2   ;   jf_e3t = 3     ! define 3D fields index 
    237             nfld_3d  = 2 + COUNT( (/.NOT.ln_linssh/) )       ! number of 3D fields to read 
    238             nfld_2d  = 3 + COUNT( (/ln_read_frq/) )          ! number of 2D fields to read 
    239          ELSE 
    240             jf_usp = 4   ;   jf_e3t = 6                      ! update 2D fields index 
    241             jf_vsp = 5   ;   jf_frq = 6 + COUNT( (/.NOT.ln_linssh/) ) 
    242             ! 
    243             nfld_3d  = 0                                     ! no 3D fields to read 
    244             nfld_2d  = 5 + COUNT( (/.NOT.ln_linssh/) ) + COUNT( (/ln_read_frq/) )    ! number of 2D fields to read 
    245          ENDIF 
     241         !#LB: 
     242         jf_tem = 1 
     243         jf_sal = 2 
     244         jf_ssh = 3 
     245         jf_usp = 4 
     246         jf_vsp = 5 
     247         ! 
     248         nfld_3d  = 0 
     249         nfld_2d  = 5 
     250         ! 
     251#if defined key_si3 
     252         jf_ifr = jf_vsp + 1 
     253         jf_tic = jf_vsp + 2 
     254         jf_ial = jf_vsp + 3 
     255         nfld_2d = nfld_2d + 3 
     256 
     257         !IF(lwp) WRITE(numout,*) 'LOLO: nfld_2d =', nfld_2d 
     258         !IF(lwp) WRITE(numout,*) 'LOLO: jf_tem =', jf_tem 
     259         !IF(lwp) WRITE(numout,*) 'LOLO: jf_sal =', jf_sal 
     260         !IF(lwp) WRITE(numout,*) 'LOLO: jf_ssh =', jf_ssh 
     261         !IF(lwp) WRITE(numout,*) 'LOLO: jf_usp =', jf_usp 
     262         !IF(lwp) WRITE(numout,*) 'LOLO: jf_vsp =', jf_vsp 
     263         !IF(lwp) WRITE(numout,*) 'LOLO: jf_ifr =', jf_ifr 
     264         !IF(lwp) WRITE(numout,*) 'LOLO: jf_tic =', jf_tic 
     265         !IF(lwp) WRITE(numout,*) 'LOLO: jf_ial =', jf_ial 
     266         !IF(lwp) WRITE(numout,*) '' 
     267#endif 
     268         !#LB. 
    246269         ! 
    247270         IF( nfld_3d > 0 ) THEN 
     
    252275            slf_3d(jf_usp) = sn_usp 
    253276            slf_3d(jf_vsp) = sn_vsp 
    254             IF( .NOT.ln_linssh )   slf_3d(jf_e3t) = sn_e3t 
    255277         ENDIF 
    256278         ! 
     
    261283            ENDIF 
    262284            slf_2d(jf_tem) = sn_tem   ;   slf_2d(jf_sal) = sn_sal   ;   slf_2d(jf_ssh) = sn_ssh 
    263             IF( ln_read_frq )   slf_2d(jf_frq) = sn_frq 
    264             IF( .NOT. ln_3d_uve ) THEN 
    265                slf_2d(jf_usp) = sn_usp ; slf_2d(jf_vsp) = sn_vsp 
    266                IF( .NOT.ln_linssh )   slf_2d(jf_e3t) = sn_e3t 
    267             ENDIF 
     285            slf_2d(jf_usp) = sn_usp ; slf_2d(jf_vsp) = sn_vsp 
    268286         ENDIF 
     287         ! 
     288#if defined key_si3 
     289         slf_2d(jf_ifr) = sn_ifr   !#LB 
     290         slf_2d(jf_tic) = sn_tic   !#LB 
     291         slf_2d(jf_ial) = sn_ial   !#LB 
     292#endif 
    269293         ! 
    270294         ierr1 = 0    ! default definition if slf_?d(ifpr)%ln_tint = .false. 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/STATION_ASF/MY_SRC/step_c1d.F90

    r13226 r14770  
    77   !!             3.0  !  2008-04  (G. Madec)  redo the adaptation to include SBC 
    88   !!             4.1  !  2019-08  (A. Coward, D. Storkey) rewrite in preparation for new timestepping scheme 
    9    !!             4.1  !  2019-12  (L. Brodeau) STATION_ASF test-case 
     9   !!             4.x  !  2020-11  (L. Brodeau) STATION_ASF test-case 
    1010   !!---------------------------------------------------------------------- 
    1111#if defined key_c1d 
     
    2222   PRIVATE 
    2323 
    24    PUBLIC stp_c1d   ! called by nemogcm.F90 
     24   PUBLIC stp_c1d      ! called by nemogcm.F90 
    2525 
    2626   !!---------------------------------------------------------------------- 
    2727   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
    28    !! $Id: step_c1d.F90 12377 2020-02-12 14:39:06Z acc $ 
     28   !! $Id: step_c1d.F90 13802 2020-11-17 09:21:55Z gsamson $ 
    2929   !! Software governed by the CeCILL license (see ./LICENSE) 
    3030   !!---------------------------------------------------------------------- 
     
    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      !! 
     
    5151      ! 
    5252      INTEGER ::   jk       ! dummy loop indice 
    53       INTEGER ::   indic    ! error indicator if < 0 
    5453      !! --------------------------------------------------------------------- 
    55  
    56       indic = 0                ! reset to no error condition 
    5754      IF( kstp == nit000 )   CALL iom_init( "nemo")   ! iom_put initialization (must be done after nemo_init for AGRIF+XIOS+OASIS) 
    5855      IF( kstp /= nit000 )   CALL day( kstp )         ! Calendar (day was already called at nit000 in day_init) 
    59       CALL iom_setkt( kstp - nit000 + 1, "nemo" )   ! say to iom that we are at time step kstp 
     56                             CALL iom_setkt( kstp - nit000 + 1, "nemo" )   ! say to iom that we are at time step kstp 
    6057 
    6158      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    6259      ! Update data, open boundaries, surface boundary condition (including sea-ice) 
    6360      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    64       CALL sbc    ( kstp, Nbb, Nnn )  ! Sea Boundary Condition (including sea-ice) 
     61                         CALL sbc    ( kstp, Nbb, Nnn )  ! Sea Boundary Condition (including sea-ice) 
    6562 
    6663      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    6764      ! diagnostics and outputs 
    6865      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    69       CALL dia_wri( kstp, Nnn )  ! ocean model: outputs 
     66                         CALL dia_wri( kstp, Nnn )  ! ocean model: outputs 
    7067 
    7168      ! Swap time levels 
     
    7875      ! Control and restarts 
    7976      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    80       CALL stp_ctl( kstp, Nnn ) 
    81  
     77                             CALL stp_ctl( kstp, Nnn ) 
    8278      IF( kstp == nit000 )   CALL iom_close( numror )          ! close input  ocean restart file 
    8379      IF( lrst_oce       )   CALL rst_write( kstp, Nbb, Nnn )  ! write output ocean restart file 
    8480      ! 
    85 #if defined key_iomput 
     81#if defined key_xios 
    8682      IF( kstp == nitend .OR. nstop > 0 )   CALL xios_context_finalize()   ! needed for XIOS 
    8783      ! 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/STATION_ASF/MY_SRC/stpctl.F90

    r13616 r14770  
    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) 
     
    4344      !!---------------------------------------------------------------------- 
    4445      !!                    ***  ROUTINE stp_ctl  *** 
    45       !!                      
     46      !! 
    4647      !! ** Purpose :   Control the run 
    4748      !! 
     
    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      INTEGER , DIMENSION(jptst)      ::   iareasum, iareamin, iareamax 
     66      INTEGER , DIMENSION(3,jptst)    ::   iloc                                  ! min/max loc indices 
    6567      REAL(wp)                        ::   zzz                                   ! local real  
    66       REAL(wp), DIMENSION(4)          ::   zmax, zmaxlocal 
     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 
     
    7275      ! 
    7376      ll_wrtstp  = ( MOD( kt-nit000, sn_cfctl%ptimincr ) == 0 ) .OR. ( kt == nitend ) 
    74       ll_colruns = ll_wrtstp .AND. sn_cfctl%l_runstat .AND. jpnij > 1  
     77      ll_colruns = ll_wrtstp .AND. sn_cfctl%l_runstat .AND. jpnij > 1 
    7578      ll_wrtruns = ( ll_colruns .OR. jpnij == 1 ) .AND. lwm 
    7679      ! 
     
    98101            istatus = NF90_ENDDEF(nrunid) 
    99102         ENDIF 
    100          !     
     103         ! 
    101104      ENDIF 
    102105      ! 
     
    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 
     
    158160            IF( lwm .AND. kt /= nitend )   istatus = NF90_CLOSE(nrunid) 
    159161            ! get global loc on the min/max 
    160             CALL mpp_maxloc( 'stpctl',    taum(:,:)  , llmsk, zzz, iloc(1:2,1) )   ! mpp_maxloc ok if mask = F  
     162            CALL mpp_maxloc( 'stpctl',    taum(:,:)  , llmsk, zzz, iloc(1:2,1) )   ! mpp_maxloc ok if mask = F 
    161163            CALL mpp_maxloc( 'stpctl',ABS( qns(:,:) ), llmsk, zzz, iloc(1:2,2) ) 
    162164            CALL mpp_minloc( 'stpctl',ABS( emp(:,:) ), llmsk, zzz, iloc(1:2,3) ) 
    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 
     
    194196         CALL dia_wri_state( Kmm, 'output.abort' )     ! create an output.abort file 
    195197         ! 
    196          IF( ll_colruns .or. jpnij == 1 ) THEN   ! all processes synchronized -> use lwp to print in opened ocean.output files 
     198         IF( ll_colruns .OR. jpnij == 1 ) THEN   ! all processes synchronized -> use lwp to print in opened ocean.output files 
    197199            IF(lwp) THEN   ;   CALL ctl_stop( ctmp1, ' ', ctmp2, ctmp3, ctmp4, ctmp5, ' ', ctmp6 ) 
    198200            ELSE           ;   nstop = MAX(1, nstop)   ! make sure nstop > 0 (automatically done when calling ctl_stop) 
     
    235237      !!---------------------------------------------------------------------- 
    236238      WRITE(clkt , '(i9)') kt 
    237        
     239 
    238240      WRITE(clfmt, '(i1)') INT(LOG10(REAL(jpnij  ,wp))) + 1     ! how many digits to we need to write ? (we decide max = 9) 
    239241      !!! WRITE(clsum, '(i'//clfmt//')') ksum                   ! this is creating a compilation error with AGRIF 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/STATION_ASF/MY_SRC/usrdef_hgr.F90

    r13286 r14770  
    1212 
    1313   !!---------------------------------------------------------------------- 
    14    !!   usr_def_hgr   : initialize the horizontal mesh  
     14   !!   usr_def_hgr   : initialize the horizontal mesh 
    1515   !!---------------------------------------------------------------------- 
     16   USE dom_oce  , ONLY: nimpp, njmpp       ! ocean space and time domain 
    1617   USE c1d      ,  ONLY: rn_lon1d, rn_lat1d ! ocean lon/lat define by namelist 
    1718   USE par_oce        ! ocean space and time domain 
     
    2122   USE in_out_manager ! I/O manager 
    2223   USE lib_mpp        ! MPP library 
    23     
     24 
    2425   IMPLICIT NONE 
    2526   PRIVATE 
     
    2930   !!---------------------------------------------------------------------- 
    3031   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
    31    !! $Id: usrdef_hgr.F90 12489 2020-02-28 15:55:11Z davestorkey $  
     32   !! $Id: usrdef_hgr.F90 13216 2020-07-02 09:25:49Z rblod $ 
    3233   !! Software governed by the CeCILL license (see ./LICENSE) 
    3334   !!---------------------------------------------------------------------- 
     
    4849      !! 
    4950      !!                Here STATION_ASF configuration : 
    50       !!          Rectangular 3x3 domain  
     51      !!          Rectangular 3x3 domain 
    5152      !!          - Located at 150E-50N 
    52       !!          - a constant horizontal resolution   
     53      !!          - a constant horizontal resolution 
    5354      !! 
    54       !! ** Action  : - define longitude & latitude of t-, u-, v- and f-points (in degrees)  
     55      !! ** Action  : - define longitude & latitude of t-, u-, v- and f-points (in degrees) 
    5556      !!              - define coriolis parameter at f-point if the domain in not on the sphere (on beta-plane) 
    5657      !!              - define i- & j-scale factors at t-, u-, v- and f-points (in meters) 
     
    6364      REAL(wp), DIMENSION(:,:), INTENT(out) ::   pe1t, pe1u, pe1v, pe1f       ! i-scale factors                             [m] 
    6465      REAL(wp), DIMENSION(:,:), INTENT(out) ::   pe2t, pe2u, pe2v, pe2f       ! j-scale factors                             [m] 
    65       INTEGER                 , INTENT(out) ::   ke1e2u_v                     ! =1 u- & v-surfaces computed here, =0 otherwise  
     66      INTEGER                 , INTENT(out) ::   ke1e2u_v                     ! =1 u- & v-surfaces computed here, =0 otherwise 
    6667      REAL(wp), DIMENSION(:,:), INTENT(out) ::   pe1e2u, pe1e2v               ! u- & v-surfaces (if reduction in strait)   [m2] 
    6768      ! 
     
    7778      !                       ! longitude 
    7879      plamt(:,:) = rn_lon1d 
    79       plamu(:,:) = rn_lon1d  
     80      plamu(:,:) = rn_lon1d 
    8081      plamv(:,:) = rn_lon1d 
    8182      plamf(:,:) = rn_lon1d 
     
    9394      pe1f(:,:) = 100.  ;   pe2f(:,:) = 100. 
    9495      ! 
    95       !                                         ! NO reduction of grid size in some straits  
     96      !                                         ! NO reduction of grid size in some straits 
    9697      ke1e2u_v = 0                              !    ==>> u_ & v_surfaces will be computed in dom_ghr routine 
    9798      pe1e2u(:,:) = 0._wp                       !    CAUTION: set to zero to avoid error with some compilers that 
     
    100101      ! 
    101102      !                       !==  Coriolis parameter  ==! 
    102       zf0   = 2._wp * omega * SIN( rad * rn_lat1d )       
     103      zf0   = 2._wp * omega * SIN( rad * rn_lat1d ) 
    103104      pff_f(:,:) = zf0 
    104       pff_t(:,:) = zf0       
     105      pff_t(:,:) = zf0 
    105106      kff = 1                 !  indicate to skip computing Coriolis parameter afterward 
    106107      ! 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/STATION_ASF/MY_SRC/usrdef_nam.F90

    r13286 r14770  
    1313   !!---------------------------------------------------------------------- 
    1414   !!   usr_def_nam   : read user defined namelist and set global domain size 
    15    !!   usr_def_hgr   : initialize the horizontal mesh  
     15   !!   usr_def_hgr   : initialize the horizontal mesh 
    1616   !!---------------------------------------------------------------------- 
     17   USE dom_oce  , ONLY: nimpp, njmpp       ! ocean space and time domain 
    1718   USE par_oce        ! ocean space and time domain 
    1819   USE phycst         ! physical constants 
     
    2021   USE in_out_manager ! I/O manager 
    2122   USE lib_mpp        ! MPP library 
    22     
     23 
    2324   IMPLICIT NONE 
    2425   PRIVATE 
     
    3132   !!---------------------------------------------------------------------- 
    3233   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
    33    !! $Id: usrdef_nam.F90 12377 2020-02-12 14:39:06Z acc $  
     34   !! $Id: usrdef_nam.F90 13216 2020-07-02 09:25:49Z rblod $ 
    3435   !! Software governed by the CeCILL license (see ./LICENSE) 
    3536   !!---------------------------------------------------------------------- 
    3637CONTAINS 
    3738 
    38    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 ) 
    3940      !!---------------------------------------------------------------------- 
    4041      !!                     ***  ROUTINE dom_nam  *** 
    41       !!                     
     42      !! 
    4243      !! ** Purpose :   read user defined namelist and define the domain size 
    4344      !! 
     
    4849      !! ** input   : - namusr_def namelist found in namelist_cfg 
    4950      !!---------------------------------------------------------------------- 
    50       CHARACTER(len=*), INTENT(out) ::   cd_cfg          ! configuration name 
    51       INTEGER         , INTENT(out) ::   kk_cfg          ! configuration resolution 
    52       INTEGER         , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes  
    53       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 
    5457      ! 
    5558      INTEGER ::   ios   ! Local integer 
     
    7275      ! 
    7376      !                             ! Set the lateral boundary condition of the global domain 
    74       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 = '-' 
    7579      ! 
    7680      !                             ! control print 
     
    8488         WRITE(numout,*) '      number of model levels                              kpk = ', kpk 
    8589         WRITE(numout,*) '   ' 
    86          WRITE(numout,*) '   Lateral b.c. of the domain set to       jperio = ', kperio 
    8790      ENDIF 
    8891      ! 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/STATION_ASF/MY_SRC/usrdef_zgr.F90

    r12629 r14770  
    1313   !!---------------------------------------------------------------------- 
    1414   !!   usr_def_zgr   : user defined vertical coordinate system 
    15    !!      zgr_z      : reference 1D z-coordinate  
     15   !!      zgr_z      : reference 1D z-coordinate 
    1616   !!      zgr_top_bot: ocean top and bottom level indices 
    1717   !!      zgr_zco    : 3D verticl coordinate in pure z-coordinate case 
     
    3131   !!---------------------------------------------------------------------- 
    3232   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
    33    !! $Id: usrdef_zgr.F90 12377 2020-02-12 14:39:06Z acc $ 
     33   !! $Id: usrdef_zgr.F90 13226 2020-07-02 14:24:31Z orioltp $ 
    3434   !! Software governed by the CeCILL license (see ./LICENSE) 
    3535   !!---------------------------------------------------------------------- 
     
    5454      REAL(wp), DIMENSION(:,:,:), INTENT(out) ::   pdept, pdepw                ! grid-point depth        [m] 
    5555      REAL(wp), DIMENSION(:,:,:), INTENT(out) ::   pe3t , pe3u , pe3v , pe3f   ! vertical scale factors  [m] 
    56       REAL(wp), DIMENSION(:,:,:), INTENT(out) ::   pe3w , pe3uw, pe3vw         ! i-scale factors  
     56      REAL(wp), DIMENSION(:,:,:), INTENT(out) ::   pe3w , pe3uw, pe3vw         ! i-scale factors 
    5757      INTEGER , DIMENSION(:,:)  , INTENT(out) ::   k_top, k_bot                ! first & last ocean level 
    5858      !!---------------------------------------------------------------------- 
     
    8585      pe3uw(:,:,1) = rn_dept1  ! LB??? 
    8686      pe3vw(:,:,1) = rn_dept1  ! LB??? 
    87        
     87 
    8888      !! 2nd level, technically useless (only for the sake of code stability) 
    8989      pdept_1d(2) = 3._wp*rn_dept1 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/STATION_ASF/cpp_STATION_ASF.fcm

    r11853 r14770  
    1  bld::tool::fppkeys   key_c1d key_iomput 
     1 bld::tool::fppkeys   key_si3 key_c1d key_qco key_xios 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/VORTEX/EXPREF/1_namelist_cfg

    r13558 r14770  
    195195   ln_dynvor_mix = .false. !  mixed scheme 
    196196   ln_dynvor_een = .true.  !  energy & enstrophy scheme 
    197       nn_een_e3f = 0             !  e3f = masked averaging of e3t divided by 4 (=0) or by the sum of mask (=1) 
    198197/ 
    199198!----------------------------------------------------------------------- 
     
    285284!!                  ***  Miscellaneous namelists  ***                 !! 
    286285!!                                                                    !! 
    287 !!   nammpp            Massively Parallel Processing                    ("key_mpp_mpi") 
     286!!   nammpp            Massively Parallel Processing 
    288287!!   namctl            Control prints                                   (default: OFF) 
    289288!!   namsto            Stochastic parametrization of EOS                (default: OFF) 
     
    291290! 
    292291!----------------------------------------------------------------------- 
    293 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi") 
     292&nammpp        !   Massively Parallel Processing 
    294293!----------------------------------------------------------------------- 
    295294/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/VORTEX/EXPREF/namelist_cfg

    r13558 r14770  
    188188   ln_dynvor_mix = .false. !  mixed scheme 
    189189   ln_dynvor_een = .true.  !  energy & enstrophy scheme 
    190       nn_een_e3f = 0             !  e3f = masked averaging of e3t divided by 4 (=0) or by the sum of mask (=1) 
    191190/ 
    192191!----------------------------------------------------------------------- 
     
    278277!!                  ***  Miscellaneous namelists  ***                 !! 
    279278!!                                                                    !! 
    280 !!   nammpp            Massively Parallel Processing                    ("key_mpp_mpi") 
     279!!   nammpp            Massively Parallel Processing 
    281280!!   namctl            Control prints                                   (default: OFF) 
    282281!!   namsto            Stochastic parametrization of EOS                (default: OFF) 
     
    284283! 
    285284!----------------------------------------------------------------------- 
    286 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi") 
     285&nammpp        !   Massively Parallel Processing 
    287286!----------------------------------------------------------------------- 
    288287/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/VORTEX/MY_SRC/usrdef_hgr.F90

    r13295 r14770  
    8080      IF( Agrif_Root() ) THEN 
    8181#endif 
    82          ! Compatibility WITH old version:  
    83          ! jperio = 0 =>  Ni0glo = jpigo_old_version 
    84          !            =>  jpiglo-1 replaced by Ni0glo-1 
    85          zlam0 = -REAL( (Ni0glo-1)/2, wp) * 1.e-3 * rn_dx 
    86          zphi0 = -REAL( (Nj0glo-1)/2, wp) * 1.e-3 * rn_dy  
     82         zlam0 = -REAL(Ni0glo, wp) * 0.5 * 1.e-3 * rn_dx 
     83         zphi0 = -REAL(Nj0glo, wp) * 0.5 * 1.e-3 * rn_dy 
    8784#if defined key_agrif 
    8885      ELSE 
    8986         ! ! let lower left longitude and latitude from parent 
    90          ! Compatibility WITH old version:  
    91          ! jperio = 0 =>  Ni0glo = jpigo_old_version 
    92          !            =>  Agrif_parent(jpiglo)-1 replaced by  Agrif_parent(Ni0glo)-1 
    93          zlam0 = ( 0.5_wp - REAL( ( Agrif_parent(Ni0glo)-1 ) / 2, wp) ) * 1.e-3 * Agrif_irhox() * rn_dx  & 
     87         zlam0 = ( 0.5_wp - REAL(Ni0glo, wp) * 0.5 ) * 1.e-3 * Agrif_irhox() * rn_dx  & 
    9488            &  + ( Agrif_Ix() + nbghostcells - 1 ) * Agrif_irhox() * rn_dx * 1.e-3 - ( 0.5_wp + nbghostcells ) * rn_dx * 1.e-3 
    95          zphi0 = ( 0.5_wp - REAL( ( Agrif_parent(Nj0glo)-1 ) / 2, wp) ) * 1.e-3 * Agrif_irhoy() * rn_dy  & 
     89         zphi0 = ( 0.5_wp - REAL(Nj0glo, wp) * 0.5 ) * 1.e-3 * Agrif_irhoy() * rn_dy  & 
    9690            &  + ( Agrif_Iy() + nbghostcells - 1 ) * Agrif_irhoy() * rn_dy * 1.e-3 - ( 0.5_wp + nbghostcells ) * rn_dy * 1.e-3 
    9791      ENDIF  
    9892#endif 
    9993          
    100       DO_2D( 1, 1, 1, 1 ) 
    101          zti = REAL( mig0_oldcmp(ji) - 1, wp )   ! start at i=0 in the global grid without halos 
    102          ztj = REAL( mjg0_oldcmp(jj) - 1, wp )   ! start at j=0 in the global grid without halos 
     94      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
     95         zti = REAL( mig0(ji), wp ) - 0.5_wp  ! start at i=0.5 in the global grid without halos 
     96         ztj = REAL( mjg0(jj), wp ) - 0.5_wp  ! start at j=0.5 in the global grid without halos 
    10397          
    10498         plamt(ji,jj) = zlam0 + rn_dx * 1.e-3 *   zti 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/VORTEX/MY_SRC/usrdef_istate.F90

    r13295 r14770  
    88   !!====================================================================== 
    99   !! History :  NEMO ! 2017-11  (J. Chanut) Original code 
     10   !!                 ! 2020-11  (S. Techene, G. Madec) separate tsuv from ssh 
    1011   !!---------------------------------------------------------------------- 
    1112 
     
    1617   USE dom_oce , ONLY : glamt, gphit, glamu, gphiu, glamv, gphiv   
    1718   USE phycst         ! physical constants 
     19   USE eosbn2  , ONLY : rn_a0 
    1820   ! 
    1921   USE in_out_manager ! I/O manager 
     
    2628   PRIVATE 
    2729 
    28    PUBLIC   usr_def_istate   ! called by istate.F90 
     30   PUBLIC   usr_def_istate       ! called by istate.F90 
     31   PUBLIC   usr_def_istate_ssh   ! called by domqco.F90 
    2932 
    3033   !! * Substitutions 
     
    3740CONTAINS 
    3841   
    39    SUBROUTINE usr_def_istate( pdept, ptmask, pts, pu, pv, pssh ) 
     42   SUBROUTINE usr_def_istate( pdept, ptmask, pts, pu, pv ) 
    4043      !!---------------------------------------------------------------------- 
    4144      !!                   ***  ROUTINE usr_def_istate  *** 
     
    5255      REAL(wp), DIMENSION(jpi,jpj,jpk)     , INTENT(  out) ::   pu      ! i-component of the velocity  [m/s]  
    5356      REAL(wp), DIMENSION(jpi,jpj,jpk)     , INTENT(  out) ::   pv      ! j-component of the velocity  [m/s]  
    54       REAL(wp), DIMENSION(jpi,jpj)         , INTENT(  out) ::   pssh    ! sea-surface height 
    5557      ! 
    5658      INTEGER  :: ji, jj, jk  ! dummy loop indices 
     
    6769      zf0   = 2._wp * omega * SIN( rad * rn_ppgphi0 ) 
    6870      zumax = 1._wp * SIGN(1._wp, zf0) ! Here Anticyclonic: set zumax=-1 for cyclonic 
    69       zlambda = SQRT(2._wp)*60.e3      ! Horizontal scale in meters  
     71      zlambda = SQRT(2._wp)*60.e3      ! Horizontal scale in meters 
    7072      zn2 = 3.e-3**2 
    7173      zH = 0.5_wp * 5000._wp 
    7274      ! 
    7375      zP0 = rho0 * zf0 * zumax * zlambda * SQRT(EXP(1._wp)/2._wp) 
    74       ! 
    75       ! Sea level: 
    76       za = -zP0 * (1._wp-EXP(-zH)) / (grav*(zH-1._wp + EXP(-zH))) 
    77       DO_2D( 1, 1, 1, 1 ) 
    78          zx = glamt(ji,jj) * 1.e3 
    79          zy = gphit(ji,jj) * 1.e3 
    80          zrho1 = rho0 + za * EXP(-(zx**2+zy**2)/zlambda**2) 
    81          pssh(ji,jj) = zP0 * EXP(-(zx**2+zy**2)/zlambda**2)/(zrho1*grav) * ptmask(ji,jj,1) 
    82       END_2D 
    8376      ! 
    8477      ! temperature:          
     
    9386                  & * EXP(-(zx**2+zy**2)/zlambda**2) / (grav*(zH -1._wp + EXP(-zH))); 
    9487            ENDIF 
    95             pts(ji,jj,jk,jp_tem) = (20._wp + (rho0-zrho1) / 0.28_wp) * ptmask(ji,jj,jk) 
     88            pts(ji,jj,jk,jp_tem) = (20._wp + (rho0-zrho1) / rn_a0 ) * ptmask(ji,jj,jk) 
    9689         END DO 
    9790      END_2D 
    9891      ! 
    9992      ! salinity:   
    100       pts(:,:,:,jp_sal) = 35._wp  
     93      pts(:,:,:,jp_sal) = 35._wp * ptmask(:,:,:)  
    10194      ! 
    10295      ! velocities: 
     
    130123      END_2D 
    131124      ! 
    132       CALL lbc_lnk_multi( 'usrdef_istate', pu, 'U', -1., pv, 'V', -1. ) 
     125      CALL lbc_lnk( 'usrdef_istate', pu, 'U', -1., pv, 'V', -1. ) 
    133126      !    
    134127   END SUBROUTINE usr_def_istate 
    135128 
     129 
     130   SUBROUTINE usr_def_istate_ssh( ptmask, pssh ) 
     131      !!---------------------------------------------------------------------- 
     132      !!                   ***  ROUTINE usr_def_istate  *** 
     133      !!  
     134      !! ** Purpose :   Initialization of ssh 
     135      !!                Here VORTEX configuration  
     136      !! 
     137      !! ** Method  :   Set ssh according to a gaussian anomaly of pressure and associated 
     138      !!                geostrophic velocities 
     139      !!---------------------------------------------------------------------- 
     140      REAL(wp), DIMENSION(jpi,jpj,jpk)     , INTENT(in   ) ::   ptmask  ! t-point ocean mask   [m] 
     141      REAL(wp), DIMENSION(jpi,jpj)         , INTENT(  out) ::   pssh    ! sea-surface height   [m] 
     142      ! 
     143      INTEGER  :: ji, jj ! dummy loop indices 
     144      REAL(wp) :: zx, zy, zP0, zumax, zlambda, zf0, zH, zrho1, za 
     145      !!---------------------------------------------------------------------- 
     146      ! 
     147      IF(lwp) WRITE(numout,*) 
     148      IF(lwp) WRITE(numout,*) 'usr_def_istate_ssh : VORTEX configuration, analytical definition of initial state' 
     149      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~   ' 
     150      ! 
     151      ! 
     152      ! 
     153      zf0   = 2._wp * omega * SIN( rad * rn_ppgphi0 ) 
     154      zumax = 1._wp * SIGN(1._wp, zf0) ! Here Anticyclonic: set zumax=-1 for cyclonic 
     155      zlambda = SQRT(2._wp)*60.e3      ! Horizontal scale in meters  
     156      zH = 0.5_wp * 5000._wp 
     157      ! 
     158      zP0 = rho0 * zf0 * zumax * zlambda * SQRT(EXP(1._wp)/2._wp) 
     159      ! 
     160      ! Sea level: 
     161      za = -zP0 * (1._wp-EXP(-zH)) / (grav*(zH-1._wp + EXP(-zH))) 
     162      DO_2D( 1, 1, 1, 1 ) 
     163         zx = glamt(ji,jj) * 1.e3 
     164         zy = gphit(ji,jj) * 1.e3 
     165         zrho1 = rho0 + za * EXP(-(zx**2+zy**2)/zlambda**2) 
     166         pssh(ji,jj) = zP0 * EXP(-(zx**2+zy**2)/zlambda**2)/(zrho1*grav) * ptmask(ji,jj,1) 
     167      END_2D 
     168       
     169   END SUBROUTINE usr_def_istate_ssh 
     170 
    136171   !!====================================================================== 
    137172END MODULE usrdef_istate 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/VORTEX/MY_SRC/usrdef_nam.F90

    r13286 r14770  
    4040CONTAINS 
    4141 
    42    SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     42   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 
    4343      !!---------------------------------------------------------------------- 
    4444      !!                     ***  ROUTINE dom_nam  *** 
     
    5252      !! ** input   : - namusr_def namelist found in namelist_cfg 
    5353      !!---------------------------------------------------------------------- 
    54       CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    55       INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
    56       INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes  
    57       INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
     54      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name 
     55      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution 
     56      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes 
     57      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity 
     58      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding 
     59      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F 
    5860      ! 
    5961      INTEGER ::   ios          ! Local integer 
     
    7173         rn_dx = Agrif_Parent(rn_dx)/Agrif_Rhox() 
    7274         rn_dy = Agrif_Parent(rn_dy)/Agrif_Rhoy() 
    73          rn_dz = Agrif_Parent(rn_dz) 
     75!         rn_dz = Agrif_Parent(rn_dz) 
    7476         rn_ppgphi0 = Agrif_Parent(rn_ppgphi0) 
    7577      ENDIF 
     
    9698      zh  = (kpk-1)*rn_dz 
    9799      !                             ! Set the lateral boundary condition of the global domain 
    98       kperio = 0                    ! VORTEX configuration : closed basin 
     100      ldIperio = .FALSE.   ;   ldJperio = .FALSE.   ! VORTEX configuration : closed domain 
     101      ldNFold  = .FALSE.   ;   cdNFtype = '-' 
     102      ! 
    99103      !                             ! control print 
    100104      IF(lwp) THEN 
     
    115119         WRITE(numout,*) '      Reference latitude            rn_ppgphi0 = ', rn_ppgphi0 
    116120         WRITE(numout,*) '   ' 
    117          WRITE(numout,*) '   Lateral boundary condition of the global domain' 
    118          WRITE(numout,*) '      VORTEX : closed basin            jperio = ', kperio 
    119121      ENDIF 
    120122      ! 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/VORTEX/MY_SRC/usrdef_zgr.F90

    r12740 r14770  
    190190      z2d(:,:) = REAL( jpkm1 , wp )          ! flat bottom 
    191191      ! 
    192       CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )           ! set surrounding land to zero (here jperio=0 ==>> closed) 
     192      CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )           ! set surrounding land to zero (closed boundaries) 
    193193      ! 
    194194      k_bot(:,:) = NINT( z2d(:,:) )          ! =jpkm1 over the ocean point, =0 elsewhere 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/VORTEX/cpp_VORTEX.fcm

    r12208 r14770  
    1  bld::tool::fppkeys key_iomput key_mpp_mpi key_agrif 
     1 bld::tool::fppkeys key_xios key_agrif key_qco  
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/WAD/EXPREF/namelist_cfg

    r13558 r14770  
    330330   ln_dynvor_mix = .false. !  mixed scheme 
    331331   ln_dynvor_een = .true.  !  energy & enstrophy scheme 
    332       nn_een_e3f = 0             !  e3f = masked averaging of e3t divided by 4 (=0) or by the sum of mask (=1) 
    333332/ 
    334333!----------------------------------------------------------------------- 
     
    457456!!                  ***  Miscellaneous namelists  ***                 !! 
    458457!!                                                                    !! 
    459 !!   nammpp            Massively Parallel Processing                    ("key_mpp_mpi") 
     458!!   nammpp            Massively Parallel Processing 
    460459!!   namctl            Control prints                                   (default: OFF) 
    461460!!   namsto            Stochastic parametrization of EOS                (default: OFF) 
     
    463462! 
    464463!----------------------------------------------------------------------- 
    465 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi") 
     464&nammpp        !   Massively Parallel Processing 
    466465!----------------------------------------------------------------------- 
    467466/ 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/WAD/MY_DOCS/WAD_doc.tex

    • Property svn:executable deleted
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/WAD/MY_SRC/usrdef_hgr.F90

    r13295 r14770  
    7474      !                       !==  grid point position  ==!   (in kilometers) 
    7575      zfact = rn_dx * 1.e-3         ! conversion in km 
    76       DO_2D( 1, 1, 1, 1 ) 
    77          !                       ! longitude 
    78          plamt(ji,jj) = zfact * (  - 0.5 + REAL( mig0_oldcmp(ji)-1 , wp )  )   
    79          plamu(ji,jj) = zfact * (          REAL( mig0_oldcmp(ji)-1 , wp )  ) 
     76      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
     77         !                       ! longitude   (west coast at lon=0°) 
     78         plamt(ji,jj) = zfact * (  - 0.5 + REAL( mig0(ji)-1 , wp )  )   
     79         plamu(ji,jj) = zfact * (          REAL( mig0(ji)-1 , wp )  ) 
    8080         plamv(ji,jj) = plamt(ji,jj) 
    8181         plamf(ji,jj) = plamu(ji,jj) 
    82          !                       ! latitude 
    83          pphit(ji,jj) = zfact * (  - 0.5 + REAL( mjg0_oldcmp(jj)-1 , wp )  ) 
     82         !                       ! latitude   (south coast at lat= 0°) 
     83         pphit(ji,jj) = zfact * (  - 0.5 + REAL( mjg0(jj)-1 , wp )  ) 
    8484         pphiu(ji,jj) = pphit(ji,jj) 
    85          pphiv(ji,jj) = zfact * (          REAL( mjg0_oldcmp(jj)-1 , wp )  ) 
     85         pphiv(ji,jj) = zfact * (          REAL( mjg0(jj)-1 , wp )  ) 
    8686         pphif(ji,jj) = pphiv(ji,jj) 
    8787      END_2D 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/WAD/MY_SRC/usrdef_istate.F90

    r13295 r14770  
    77   !! User defined : set the initial state of a user configuration 
    88   !!====================================================================== 
    9    !! History :  4.0 ! 2016-03  (S. Flavoni) Original code 
     9   !! History :  4.0  ! 2016-03  (S. Flavoni) Original code 
     10   !!                 ! 2020-11  (S. Techene, G. Madec) separate tsuv from ssh 
    1011   !!---------------------------------------------------------------------- 
    1112 
     
    2425   PRIVATE 
    2526 
    26    PUBLIC   usr_def_istate   ! called in istate.F90 
     27   PUBLIC   usr_def_istate       ! called in istate.F90 
     28   PUBLIC   usr_def_istate_ssh   ! called in sshwzv.F90 
    2729 
    2830   !! * Substitutions 
     
    3436   !!---------------------------------------------------------------------- 
    3537CONTAINS 
    36    
    37    SUBROUTINE usr_def_istate( pdept, ptmask, pts, pu, pv, pssh ) 
     38 
     39 
     40   SUBROUTINE usr_def_istate( pdept, ptmask, pts, pu, pv ) 
    3841      !!---------------------------------------------------------------------- 
    3942      !!                   ***  ROUTINE usr_def_istate  *** 
     
    4245      !!                Here WAD_TEST_CASES configuration  
    4346      !! 
    44       !! ** Method  : - set temprature field 
     47q      !! ** Method  : - set temprature field 
    4548      !!              - set salinity   field 
    4649      !!---------------------------------------------------------------------- 
     
    5053      REAL(wp), DIMENSION(jpi,jpj,jpk)     , INTENT(  out) ::   pu      ! i-component of the velocity  [m/s]  
    5154      REAL(wp), DIMENSION(jpi,jpj,jpk)     , INTENT(  out) ::   pv      ! j-component of the velocity  [m/s]  
    52       REAL(wp), DIMENSION(jpi,jpj)         , INTENT(  out) ::   pssh    ! sea-surface height 
    5355      INTEGER  ::   ji, jj            ! dummy loop indices 
    5456      REAL(wp) ::   zi, zj 
     
    6668      pu  (:,:,:) = 0._wp        ! ocean at rest 
    6769      pv  (:,:,:) = 0._wp 
    68       pssh(:,:)   = 0._wp 
    69       ! 
    7070      !                          ! T & S profiles 
    7171      pts(:,:,:,jp_tem) = 10._wp * ptmask(:,:,:) 
     
    8383         CASE ( 1 )                               ! WAD 1 configuration 
    8484            !                                     ! ==================== 
    85             ! 
    8685            IF(lwp) WRITE(numout,*) 
    8786            IF(lwp) WRITE(numout,*) 'usr_def_istate : WAD Closed box with EW linear bottom slope' 
    8887            IF(lwp) WRITE(numout,*) '~~~~~~~~~~' 
    89             ! 
    90             do ji = 1,jpi 
    91              pssh(ji,:) = ( -5.5_wp + 7.4_wp*glamt(ji,1)/50._wp)*ptmask(ji,:,1) 
    92             end do 
    9388            !                                     ! ==================== 
    9489         CASE ( 2, 8 )                            ! WAD 2 configuration 
    9590            !                                     ! ==================== 
    96             ! 
    9791            IF(lwp) WRITE(numout,*) 
    9892            IF(lwp) WRITE(numout,*) 'usr_def_istate : WAD Parobolic EW channel, mid-range initial ssh slope' 
    9993            IF(lwp) WRITE(numout,*) '~~~~~~~~~~' 
    100             ! 
    101             do ji = 1,jpi 
    102              pssh(ji,:) = ( -1.5_wp + 5.0_wp*glamt(ji,1)/50._wp)*ptmask(ji,:,1) 
    103             end do 
    10494            !                                     ! ==================== 
    10595         CASE ( 3 )                               ! WAD 3 configuration 
    10696            !                                     ! ==================== 
    107             ! 
    10897            IF(lwp) WRITE(numout,*) 
    10998            IF(lwp) WRITE(numout,*) 'usr_def_istate : WAD Parobolic EW channel, extreme initial ssh slope'  
    11099            IF(lwp) WRITE(numout,*) '~~~~~~~~~~' 
    111             ! 
    112             do ji = 1,jpi 
    113              pssh(ji,:) = ( -4.5_wp + 6.8_wp*glamt(ji,1)/50._wp)*ptmask(ji,:,1) 
    114             end do 
     100            !                                     ! ==================== 
     101         CASE ( 4 )                               ! WAD 4 configuration 
     102            !                                     ! ==================== 
     103            IF(lwp) WRITE(numout,*) 
     104            IF(lwp) WRITE(numout,*) 'usr_def_istate : WAD Parobolic bowl, mid-range initial ssh slope'  
     105            IF(lwp) WRITE(numout,*) '~~~~~~~~~~' 
     106            !                                    ! =========================== 
     107         CASE ( 5, 7 )                           ! WAD 5 and 7 configurations 
     108            !                                    ! =========================== 
     109            IF(lwp) WRITE(numout,*) 
     110            IF(lwp) WRITE(numout,*) 'usr_def_istate : WAD Double slope with shelf' 
     111            IF(lwp) WRITE(numout,*) '~~~~~~~~~~' 
     112            !                                     ! ==================== 
     113         CASE ( 6 )                               ! WAD 6 configuration 
     114            !                                     ! ==================== 
     115            IF(lwp) WRITE(numout,*) 
     116            IF(lwp) WRITE(numout,*) 'usr_def_istate : WAD Parobolic EW channel with gaussian ridge'  
     117            IF(lwp) WRITE(numout,*) '~~~~~~~~~~' 
     118            ! 
     119            DO ji = mi0(jpiglo/2), mi0(jpiglo) 
     120               pts(ji,:,:,jp_sal) = 30._wp 
     121            END DO 
     122            ! 
     123            ! 
     124            !                                    ! =========================== 
     125         CASE DEFAULT                            ! NONE existing configuration 
     126            !                                    ! =========================== 
     127            WRITE(ctmp1,*) 'WAD test with a ', nn_cfg,' option is not coded' 
     128            ! 
     129            CALL ctl_stop( ctmp1 ) 
     130            ! 
     131      END SELECT 
     132      ! 
     133   END SUBROUTINE usr_def_istate 
     134 
     135      
     136   SUBROUTINE usr_def_istate_ssh( ptmask, pssh ) 
     137      !!---------------------------------------------------------------------- 
     138      !!                   ***  ROUTINE usr_def_istate_ssh  *** 
     139      !!  
     140      !! ** Purpose :   Initialization of the dynamics and tracers 
     141      !!                Here WAD_TEST_CASES configuration  
     142      !! 
     143      !! ** Method  : - set ssh 
     144      !!---------------------------------------------------------------------- 
     145      REAL(wp), DIMENSION(jpi,jpj,jpk)     , INTENT(in   ) ::   ptmask  ! t-point ocean mask             [m] 
     146      REAL(wp), DIMENSION(jpi,jpj)         , INTENT(  out) ::   pssh    ! sea-surface height 
     147      INTEGER  ::   ji, jj            ! dummy loop indices 
     148      REAL(wp) ::   zi, zj 
     149      ! 
     150      INTEGER  ::   jk     ! dummy loop indices 
     151      REAL(wp) ::   zdam   ! location of dam [Km] 
     152      !!---------------------------------------------------------------------- 
     153      ! 
     154      ! 
     155      SELECT CASE ( nn_cfg )  
     156         !                                        ! ==================== 
     157         CASE ( 1 )                               ! WAD 1 configuration 
     158            !                                     ! ==================== 
     159            ! 
     160            IF(lwp) WRITE(numout,*) 
     161            IF(lwp) WRITE(numout,*) 'usr_def_istate : WAD Closed box with EW linear bottom slope' 
     162            IF(lwp) WRITE(numout,*) '~~~~~~~~~~' 
     163            ! 
     164            DO ji = 1,jpi 
     165               pssh(ji,:) = ( -5.5_wp + 7.4_wp*glamt(ji,1)/50._wp)*ptmask(ji,:,1) 
     166            END DO 
     167            !                                     ! ==================== 
     168         CASE ( 2, 8 )                            ! WAD 2 configuration 
     169            !                                     ! ==================== 
     170            ! 
     171            IF(lwp) WRITE(numout,*) 
     172            IF(lwp) WRITE(numout,*) 'usr_def_istate : WAD Parobolic EW channel, mid-range initial ssh slope' 
     173            IF(lwp) WRITE(numout,*) '~~~~~~~~~~' 
     174            ! 
     175            DO ji = 1,jpi 
     176               pssh(ji,:) = ( -1.5_wp + 5.0_wp*glamt(ji,1)/50._wp)*ptmask(ji,:,1) 
     177            END DO 
     178            !                                     ! ==================== 
     179         CASE ( 3 )                               ! WAD 3 configuration 
     180            !                                     ! ==================== 
     181            ! 
     182            IF(lwp) WRITE(numout,*) 
     183            IF(lwp) WRITE(numout,*) 'usr_def_istate : WAD Parobolic EW channel, extreme initial ssh slope'  
     184            IF(lwp) WRITE(numout,*) '~~~~~~~~~~' 
     185            ! 
     186            DO ji = 1,jpi 
     187               pssh(ji,:) = ( -4.5_wp + 6.8_wp*glamt(ji,1)/50._wp)*ptmask(ji,:,1) 
     188            END DO 
    115189 
    116190            ! 
     
    140214            IF(lwp) WRITE(numout,*) '~~~~~~~~~~' 
    141215            ! 
    142             do ji = 1,jpi 
    143              pssh(ji,:) = ( -2.5_wp + 5.5_wp*glamt(ji,1)/50._wp)*ptmask(ji,:,1) 
    144             end do 
     216            DO ji = 1,jpi 
     217               pssh(ji,:) = ( -2.5_wp + 5.5_wp*glamt(ji,1)/50._wp)*ptmask(ji,:,1) 
     218            END DO 
    145219 
    146220            ! 
     
    153227            IF(lwp) WRITE(numout,*) '~~~~~~~~~~' 
    154228            ! 
    155             do ji = 1,jpi 
    156              pssh(ji,:) = ( -2.5_wp + 5.5_wp*(50._wp-glamt(ji,1))/50._wp)*ptmask(ji,:,1) 
    157             end do 
    158             ! 
    159             do ji = mi0(jpiglo/2), mi0(jpiglo) 
    160              pts(ji,:,:,jp_sal) = 30._wp 
    161              pssh(ji,:) = -0.1*ptmask(ji,:,1) 
    162             end do 
     229            DO ji = 1,jpi 
     230               pssh(ji,:) = ( -2.5_wp + 5.5_wp*(50._wp-glamt(ji,1))/50._wp)*ptmask(ji,:,1) 
     231            END DO 
     232            ! 
     233            DO ji = mi0(jpiglo/2), mi0(jpiglo) 
     234               pssh(ji,:) = -0.1*ptmask(ji,:,1) 
     235            END DO 
    163236            ! 
    164237            ! 
     
    182255      END_2D 
    183256      ! 
    184    END SUBROUTINE usr_def_istate 
     257   END SUBROUTINE usr_def_istate_ssh 
    185258 
    186259   !!====================================================================== 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/WAD/MY_SRC/usrdef_nam.F90

    r13286 r14770  
    3838CONTAINS 
    3939 
    40    SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     40   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 
    4141      !!---------------------------------------------------------------------- 
    4242      !!                     ***  ROUTINE dom_nam  *** 
     
    5050      !! ** input   : - namusr_def namelist found in namelist_cfg 
    5151      !!---------------------------------------------------------------------- 
    52       CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    53       INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
    54       INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes  
    55       INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
     52      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name 
     53      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution 
     54      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes 
     55      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity 
     56      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding 
     57      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F 
    5658      ! 
    5759      INTEGER ::   ios   ! Local integer 
     
    7577      kpk = INT(  10.  / rn_dz ) + 1 
    7678      !                             ! Set the lateral boundary condition of the global domain 
    77       kperio = 0                    ! WAD_TEST_CASES configuration : closed domain 
     79      ldIperio = .FALSE.   ;   ldJperio = .FALSE.    ! WAD_TEST_CASES configuration : closed domain 
     80      ldNFold  = .FALSE.   ;   cdNFtype = '-' 
    7881      IF( nn_wad_test == 8 ) THEN 
    79          kperio = 7         ! North-South cyclic test 
     82         ldIperio = .TRUE.   ;   ldJperio = .TRUE.   ! WAD_TEST_CASES configuration : bi-periodic 
    8083         kpi = kpi - 2      ! no closed boundary 
    8184         kpj = kpj - 2      ! no closed boundary 
     
    9598         WRITE(numout,*) '                                               jpkglo = ', kpk 
    9699         WRITE(numout,*) '   ' 
    97          WRITE(numout,*) '   Lateral boundary condition of the global domain' 
    98          WRITE(numout,*) '      closed                                   jperio = ', kperio 
    99100      ENDIF 
    100101      ! 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/WAD/MY_SRC/usrdef_zgr.F90

    r13295 r14770  
    260260      ! 
    261261      ! no ocean cavities : top ocean level is ONE, except over land 
    262       ! the ocean basin surrounnded by land (1 grid-point) set through lbc_lnk call as jperio=0  
     262      ! the ocean basin surrounnded by land (1+nn_hls grid-points) set through lbc_lnk call 
    263263      z2d(:,:) = 1._wp                    ! surface ocean is the 1st level 
    264264      z2d(mi0(1):mi1(1),:) = 0._wp 
     
    267267      z2d(:,mj0(jpjglo):mj1(jpjglo)) = 0._wp 
    268268 
    269  
    270  
    271  
    272  
    273       CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )        ! closed basin since jperio = 0 (see userdef_nam.F90) 
     269      CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )        ! closed basin, see userdef_nam.F90 
    274270      k_top(:,:) = NINT( z2d(:,:) ) 
    275271      ! 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/WAD/cpp_WAD.fcm

    r10425 r14770  
    1  bld::tool::fppkeys   key_iomput key_mpp_mpi  
     1 bld::tool::fppkeys   key_xios key_qco  
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/demo_cfgs.txt

    r14091 r14770  
    33ISOMIP+ OCE 
    44LOCK_EXCHANGE OCE 
    5 OVERFLOW OCE 
     5OVERFLOW OCE NST 
    66ICE_AGRIF OCE NST SAS ICE 
    77ICE_ADV1D OCE SAS ICE 
     
    1010WAD OCE 
    1111BENCH OCE ICE TOP 
    12 STATION_ASF OCE 
     12STATION_ASF OCE ICE 
    1313CPL_OASIS  OCE TOP ICE NST 
    1414DIA_GPU OCE TOP ICE NST ABL 
     15SWG OCE SWE 
     16C1D_ASICS OCE 
     17ICE_RHEO OCE SAS ICE 
     18DOME OCE NST 
     19TSUNAMI OCE 
     20DONUT OCE ICE 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/tests/test_cases.bib

    r12377 r14770  
    1 @book{HAIDVOGEL1999, 
    2    author = {D. B. Haidvogel and A. Beckmann}, 
    3    publisher = {Imperial College Press, London}, 
    4    year = {1999}, 
    5    title = {Numerical ocean circulation modeling} 
     1 
     2@article{         brodeau.barnier.ea_JPO16, 
     3  title         = "Climatologically Significant Effects of Some 
     4                  Approximations in the Bulk Parameterizations of Turbulent 
     5                  Air–Sea Fluxes", 
     6  pages         = "5--28", 
     7  journal       = "Journal of Physical Oceanography", 
     8  volume        = "47", 
     9  number        = "1", 
     10  author        = "Brodeau, Laurent and Barnier, Bernard and Gulev, Sergey K. 
     11                  and Woods, Cian", 
     12  year          = "2016", 
     13  month         = "Dec", 
     14  publisher     = "American Meteorological Society", 
     15  issn          = "1520-0485", 
     16  doi           = "10.1175/jpo-d-16-0169.1" 
    617} 
    718 
    8 @book{BURCHARD2002, 
    9    title={GETM: A General Estuarine Transport Model; Scientific Documentation}, 
    10    author={Burchard, Hans and Bolding, Karsten}, 
    11    year={2002}, 
    12    publisher={European Commission, Joint Research Centre, Institute for Environment and Sustainability} 
     19@techreport{      burchard.bolding_trpt02, 
     20  title         = "GETM, A General Estuarine Transport Model: Scientific 
     21                  Documentation", 
     22  pages         = "", 
     23  series        = "Tech. Rep. EUR 20253 EN", 
     24  author        = "Burchard, Hans and Bolding, Karsten", 
     25  institution   = "European Commission", 
     26  year          = "2002", 
     27  month         = "01" 
    1328} 
    1429 
    15 @article{ILICAK2012, 
    16    title = "Spurious dianeutral mixing and the role of momentum closure", 
    17    journal = "Ocean Modelling", 
    18    volume = "45-46", 
    19    pages = "37 - 58", 
    20    year = "2012", 
    21    issn = "1463-5003", 
    22    doi = "10.1016/j.ocemod.2011.10.003", 
    23    author = "Mehmet Ilicak and Alistair J. Adcroft and Stephen M. Griffies and Robert W. Hallberg", 
    24    keywords = "Spurious dianeutral transport, Cabbeling, Overflows, Exchange-flow, Ocean models, Momentum transport, Tracer advection, Reference potential energy" 
     30@article{         haidvogel.beckmann_SESM99, 
     31  title         = "Numerical Ocean Circulation Modeling", 
     32  journal       = "Series on Environmental Science and Management", 
     33  author        = "Haidvogel, Dale B and Beckmann, Aike", 
     34  year          = "1999", 
     35  month         = "Apr", 
     36  publisher     = "IMPERIAL COLLEGE PRESS", 
     37  issn          = "0219-9793", 
     38  isbn          = "9781860943935", 
     39  doi           = "10.1142/p097" 
    2540} 
    2641 
    27 @article{DEBREU2012, 
    28    title = "Two-way nesting in split-explicit ocean models: Algorithms, implementation and validation", 
    29    journal = "Ocean Modelling", 
    30    volume = "49-50", 
    31    pages = "1 - 21", 
    32    year = "2012", 
    33    issn = "1463-5003", 
    34    doi = "10.1016/j.ocemod.2012.03.003", 
    35    author = "Laurent Debreu and Patrick Marchesiello and Pierrick Penven and Gildas Cambon", 
    36    keywords = "Two-way nesting, Finite difference method, Modeling, Boundary conditions, Coastal upwelling" 
     42@article{         ilıcak.adcroft.ea_OM12, 
     43  title         = "Spurious dianeutral mixing and the role of momentum 
     44                  closure", 
     45  pages         = "37--58", 
     46  journal       = "Ocean Modelling", 
     47  volume        = "45-46", 
     48  author        = "Ilıcak, Mehmet and Adcroft, Alistair J. and Griffies, 
     49                  Stephen M. and Hallberg, Robert W.", 
     50  year          = "2012", 
     51  month         = "Jan", 
     52  publisher     = "Elsevier BV", 
     53  issn          = "1463-5003", 
     54  doi           = "10.1016/j.ocemod.2011.10.003" 
    3755} 
    3856 
    39 @article{PENVEN2006, 
    40    title = "Evaluation and application of the ROMS 1-way embedding procedure to the central california upwelling system", 
    41    journal = "Ocean Modelling", 
    42    volume = "12", 
    43    number = "1", 
    44    pages = "157 - 187", 
    45    year = "2006", 
    46    issn = "1463-5003", 
    47    doi = "10.1016/j.ocemod.2005.05.002", 
    48    author = "Pierrick Penven and Laurent Debreu and Patrick Marchesiello and James C. McWilliams", 
    49    keywords = "Ocean models, Boundary conditions, Embedding, Coastal upwelling, Mesoscale eddies, Eddy kinetic energy, North America, West Coast, Central upwelling system, Monterey Bay, 35–41°N, 128–121°W" 
     57@article{         lipscomb.hunke_MWR04, 
     58  title         = "Modeling Sea Ice Transport Using Incremental Remapping", 
     59  pages         = "1341--1354", 
     60  journal       = "Monthly Weather Review", 
     61  volume        = "132", 
     62  number        = "6", 
     63  author        = "Lipscomb, William H. and Hunke, Elizabeth C.", 
     64  year          = "2004", 
     65  month         = "Jun", 
     66  publisher     = "American Meteorological Society", 
     67  issn          = "1520-0493", 
     68  doi           = "10.1175/1520-0493(2004)132<1341:msitui>2.0.co;2" 
    5069} 
    5170 
    52 @article{SPALL1991, 
    53    author = {Spall, M. A. and Holland, W. R.}, 
    54    title = {A Nested Primitive Equation Model for Oceanic Applications}, 
    55    journal = {Journal of Physical Oceanography}, 
    56    volume = {21}, 
    57    number = {2}, 
    58    pages = {205-220}, 
    59    year = {1991}, 
    60    doi = {10.1175/1520-0485(1991)021<0205:ANPEMF>2.0.CO;2}, 
     71@article{         losch_JGR08, 
     72  title         = "Modeling ice shelf cavities in a z coordinate ocean 
     73                  general circulation model", 
     74  journal       = "Journal of Geophysical Research", 
     75  volume        = "113", 
     76  number        = "C8", 
     77  author        = "Losch, M.", 
     78  year          = "2008", 
     79  month         = "Aug", 
     80  publisher     = "American Geophysical Union (AGU)", 
     81  issn          = "0148-0227", 
     82  doi           = "10.1029/2007jc004368" 
    6183} 
    6284 
    63 @article{MATHIOT2017, 
    64    author = {Mathiot, P. and Jenkins, A. and Harris, C. and Madec, G.}, 
    65    title = {Explicit representation and parametrised impacts of under ice shelf seas in the ${z}^{\ast}$ coordinate ocean model NEMO 3.6}, 
    66    journal = {Geoscientific Model Development}, 
    67    volume = {10}, 
    68    year = {2017}, 
    69    number = {7}, 
    70    pages = {2849--2874}, 
    71    url = {https://www.geosci-model-dev.net/10/2849/2017/}, 
    72    doi = {10.5194/gmd-10-2849-2017} 
     85@article{         mathiot.jenkins.ea_GMD17, 
     86  title         = "Explicit representation and parametrised impacts of under 
     87                  ice shelf seas in the ${z}^{\ast}$ coordinate ocean model 
     88                  NEMO 3.6", 
     89  pages         = "2849--2874", 
     90  journal       = "Geoscientific Model Development", 
     91  volume        = "10", 
     92  number        = "7", 
     93  author        = "Mathiot, Pierre and Jenkins, Adrian and Harris, 
     94                  Christopher and Madec, Gurvan", 
     95  year          = "2017", 
     96  month         = "Jul", 
     97  publisher     = "Copernicus GmbH", 
     98  issn          = "1991-9603", 
     99  doi           = "10.5194/gmd-10-2849-2017" 
    73100} 
    74101 
    75 @article{LOSCH2008, 
    76    author = {Losch, M.}, 
    77    title = {Modeling ice shelf cavities in a z coordinate ocean general circulation model}, 
    78    journal = {Journal of Geophysical Research: Oceans}, 
    79    volume = {113}, 
    80    year = {2008}, 
    81    number = {C8}, 
    82    pages = {}, 
    83    keywords = {Ice shelf cavities, numerical ocean modeling, z coordinates}, 
    84    doi = {10.1029/2007JC004368}, 
    85    url = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2007JC004368}, 
    86    eprint = {https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/2007JC004368}, 
    87    abstract = {Processes at the ice shelf-ocean interface and in particular in ice shelf cavities around Antarctica have an observable effect on the solutions of basin scale to global coupled ice-ocean models. Despite this, these processes are not routinely represented in global ocean and climate models. It is shown that a new ice shelf cavity model for z coordinate models can reproduce results from an intercomparison project of earlier approaches with vertical ?~C or isopycnic coordinates. As a proof of concept, ice shelves are incorporated in a 100-year global integration of a z coordinate model. In this simulation, glacial meltwater can be traced as far as north as 15??S. The observed effects of processes in the ice shelf cavities agree with previous results from a ?~C coordinate model, notably the increase in sea ice thickness. However, melt rates are overestimated probably because the parameterization of basal melting does not suit the low resolution of this configuration.} 
     102@article{         schär.smolarkiewicz_JCP96, 
     103  title         = "A Synchronous and Iterative Flux-Correction Formalism for 
     104                  Coupled Transport Equations", 
     105  pages         = "101--120", 
     106  journal       = "Journal of Computational Physics", 
     107  volume        = "128", 
     108  number        = "1", 
     109  author        = "Schär, Christoph and Smolarkiewicz, Piotr K.", 
     110  year          = "1996", 
     111  month         = "Oct", 
     112  publisher     = "Elsevier BV", 
     113  issn          = "0021-9991", 
     114  doi           = "10.1006/jcph.1996.0198" 
    88115} 
    89  
    90 @article{LIPSCOMB2004, 
    91    author = {Lipscomb, William H. and Hunke, Elizabeth C.}, 
    92    title = {Modeling Sea Ice Transport Using Incremental Remapping}, 
    93    journal = {Monthly Weather Review}, 
    94    volume = {132}, 
    95    number = {6}, 
    96    pages = {1341-1354}, 
    97    year = {2004}, 
    98    doi = {10.1175/1520-0493(2004)132<1341:MSITUI>2.0.CO;2}, 
    99    URL = {https://doi.org/10.1175/1520-0493(2004)132<1341:MSITUI>2.0.CO;2}, 
    100    eprint = {https://doi.org/10.1175/1520-0493(2004)132<1341:MSITUI>2.0.CO;2}, 
    101    abstract = { Abstract Sea ice models contain transport equations for the area, volume, and energy of ice and snow in various thickness categories. These equations typically are solved with first-order-accurate upwind schemes, which are very diffusive; with second-order-accurate centered schemes, which are highly oscillatory; or with more sophisticated second-order schemes that are computationally costly if many quantities must be transported [e.g., multidimensional positive-definite advection transport algorithm (MPDATA)]. Here an incremental remapping scheme, originally designed for horizontal transport in ocean models, is adapted for sea ice transport. This scheme has several desirable features: it preserves the monotonicity of both conserved quantities and tracers; it is second-order accurate except where the accuracy is reduced locally to preserve monotonicity; and it efficiently solves the large number of equations in sea ice models with multiple thickness categories and tracers. Remapping outperforms the first-order upwind scheme and basic MPDATA scheme in several simple test problems. In realistic model runs, remapping is less diffusive than the upwind scheme and about twice as fast as MPDATA. } 
    102 } 
    103  
    104 @article{SCHAR1996, 
    105    author = {Christoph Schär and Piotr K. Smolarkiewicz}, 
    106    title = {A Synchronous and Iterative Flux-Correction Formalism for Coupled Transport Equations}, 
    107    journal = {Journal of Computational Physics}, 
    108    volume = {128}, 
    109    number = {1}, 
    110    pages = {101 - 120}, 
    111    year = {1996}, 
    112    issn = {0021-9991}, 
    113    doi = {https://doi.org/10.1006/jcph.1996.0198}, 
    114    url = {http://www.sciencedirect.com/science/article/pii/S0021999196901989}, 
    115    abstract = {Many problems of fluid dynamics involve the coupled transport of several, density-like, dependent variables (for instance, densities of mass and momenta in elastic flows). In this paper, a conservative and synchronous flux-corrected transport (FCT) formalism is developed which aims at a consistent transport of such variables. The technique differs from traditional FCT algorithms in two respects. First, the limiting of transportive fluxes of the primary variables (e.g., mass and momentum) does not derive from smooth estimates of the variables, but it derives from analytic constraints implied by the Lagrangian form of the governing continuity equations, which are imposed on the specific mixing ratios of the variables (e.g., velocity components). Second, the traditional FCT limiting based on sufficiency conditions is augmented by an iterative procedure which approaches the necessity requirements. This procedure can also be used in the framework of traditional FCT schemes, and a demonstration is provided that it can significantly reduce some of the pathological behaviors of FCT algorithms. Although the approach derived is applicable to the transport of arbitrary conserved quantities, it is particularly useful for the synchronous transport of mass and momenta in elastic flows, where it assures intrinsic stability of the algorithm regardless of the magnitude of the mass-density variable. This latter property becomes especially important in fluids with large density variations, or in models with a material “vertical” coordinate (e.g., geophysical hydrostatic stratified flows in isopycnic/isentropic coordinates), where material surfaces can collapse to zero-mass layers admitting, therefore, arbitrarily large local Courant numbers.} 
    116 } 
    117  
    118 @article{Brodeau_al_2017, 
    119 author={Laurent Brodeau and Bernard Barnier and Sergey Gulev and Cian Woods}, 
    120 title={Climatologically significant effects of some approximations in the bulk parameterizations of turbulent air-sea fluxes}, 
    121 journal={J. Phys. Oceanogr.}, 
    122 doi={10.1175/JPO-D-16-0169.1}, 
    123 year={2017}, 
    124 pages = {5-28}, 
    125 volume={47}, 
    126 number={1} 
    127 } 
Note: See TracChangeset for help on using the changeset viewer.