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

Changeset 13558 for NEMO/trunk/src


Ignore:
Timestamp:
2020-10-02T17:30:22+02:00 (4 years ago)
Author:
smasson
Message:

trunk: pass sette tests with debugging option -init=arrays,snan,huge, see #2535

Location:
NEMO/trunk/src
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/ICE/icestp.F90

    r13546 r13558  
    263263      CALL ice_thd_init                ! set ice thermodynics parameters (clem: important to call it first for melt ponds) 
    264264      ! 
    265       !                                ! Initial sea-ice state 
    266       CALL ice_istate_init 
     265      CALL ice_sbc_init                ! set ice-ocean and ice-atm. coupling parameters 
     266      ! 
     267      CALL ice_istate_init             ! Initial sea-ice state 
    267268      IF ( ln_rstart .OR. nn_iceini_file == 2 ) THEN 
    268269         CALL ice_rst_read( Kbb, Kmm, Kaa )         ! start from a restart file 
     
    272273      CALL ice_var_glo2eqv 
    273274      CALL ice_var_agg(1) 
    274       ! 
    275       CALL ice_sbc_init                ! set ice-ocean and ice-atm. coupling parameters 
    276275      ! 
    277276      CALL ice_dyn_init                ! set ice dynamics parameters 
  • NEMO/trunk/src/OCE/DIU/diu_bulk.F90

    r13295 r13558  
    2222    
    2323   ! Namelist parameters 
    24    LOGICAL, PUBLIC :: ln_diurnal 
    25    LOGICAL, PUBLIC :: ln_diurnal_only 
     24   LOGICAL, PUBLIC :: ln_diurnal      = .false.   ! force definition if diurnal_sst_bulk_init is not called 
     25   LOGICAL, PUBLIC :: ln_diurnal_only = .false.   ! force definition if diurnal_sst_bulk_init is not called 
    2626 
    2727   ! Parameters 
  • NEMO/trunk/src/OCE/DOM/closea.F90

    r13286 r13558  
    3838   LOGICAL, PUBLIC :: ln_clo_rnf       !: closed sea treated as runoff (update rnf mask) 
    3939 
    40    LOGICAL, PUBLIC :: l_sbc_clo  !: T => net evap/precip over closed seas spread outover the globe/river mouth 
    41    LOGICAL, PUBLIC :: l_clo_rnf  !: T => Some closed seas output freshwater (RNF) to specified runoff points. 
    42  
    43    INTEGER, PUBLIC :: ncsg      !: number of closed seas global mappings (inferred from closea_mask_glo field) 
    44    INTEGER, PUBLIC :: ncsr      !: number of closed seas rnf    mappings (inferred from closea_mask_rnf field) 
    45    INTEGER, PUBLIC :: ncse      !: number of closed seas empmr  mappings (inferred from closea_mask_emp field) 
     40   ! WARNING: keep default definitions in the following lines as dom_clo is called only if ln_closea = .true. 
     41   LOGICAL, PUBLIC :: l_sbc_clo = .FALSE.   !: T => net evap/precip over closed seas spread outover the globe/river mouth 
     42   LOGICAL, PUBLIC :: l_clo_rnf = .FALSE.   !: T => Some closed seas output freshwater (RNF) to specified runoff points. 
     43 
     44   INTEGER, PUBLIC :: ncsg = 0   !: number of closed seas global mappings (inferred from closea_mask_glo field) 
     45   INTEGER, PUBLIC :: ncsr = 0   !: number of closed seas rnf    mappings (inferred from closea_mask_rnf field) 
     46   INTEGER, PUBLIC :: ncse = 0   !: number of closed seas empmr  mappings (inferred from closea_mask_emp field) 
    4647 
    4748   INTEGER, PUBLIC, SAVE, ALLOCATABLE, DIMENSION(:,:) :: mask_opnsea, mask_csundef  !: mask defining the open sea and the undefined closed sea 
  • NEMO/trunk/src/OCE/DOM/daymod.F90

    r13286 r13558  
    8282      ndt05   = NINT( 0.5 * rn_Dt  ) 
    8383 
    84       IF( .NOT. l_offline )   CALL day_rst( nit000, 'READ' ) 
    85  
     84      lrst_oce = .NOT. l_offline   ! force definition of offline 
     85      IF( lrst_oce )   CALL day_rst( nit000, 'READ' ) 
     86       
    8687      ! set the calandar from ndastp (read in restart file and namelist) 
    8788      nyear   =   ndastp / 10000 
  • NEMO/trunk/src/OCE/DOM/domain.F90

    r13472 r13558  
    120120         WRITE(numout,*)     '         cn_cfg = ', TRIM( cn_cfg ), '   nn_cfg = ', nn_cfg 
    121121      ENDIF 
    122       nn_wxios = 0 
    123       ln_xios_read = .FALSE. 
    124122      ! 
    125123      !           !==  Reference coordinate system  ==! 
  • NEMO/trunk/src/OCE/DYN/divhor.F90

    r13497 r13558  
    7878      ! 
    7979      DO_3D( 0, 0, 0, 0, 1, jpkm1 )                                    !==  Horizontal divergence  ==! 
    80          hdiv(ji,jj,jk) = (  e2u(ji  ,jj) * e3u(ji  ,jj,jk,Kmm) * uu(ji  ,jj,jk,Kmm)      & 
     80         hdiv(ji,jj,jk) = (   e2u(ji  ,jj) * e3u(ji  ,jj,jk,Kmm) * uu(ji  ,jj,jk,Kmm)      & 
    8181            &               - e2u(ji-1,jj) * e3u(ji-1,jj,jk,Kmm) * uu(ji-1,jj,jk,Kmm)      & 
    8282            &               + e1v(ji,jj  ) * e3v(ji,jj  ,jk,Kmm) * vv(ji,jj  ,jk,Kmm)      & 
  • NEMO/trunk/src/OCE/DYN/wet_dry.F90

    r13497 r13558  
    5757   REAL(wp), PUBLIC  ::   ssh_ref     !: height of z=0 with respect to the geoid;  
    5858 
    59    LOGICAL,  PUBLIC  ::   ll_wd       !: Wetting/drying activation switch if either ln_wd_il or ln_wd_dl 
     59   LOGICAL,  PUBLIC  ::   ll_wd = .FALSE. !: Wetting/drying activation switch (ln_wd_il or ln_wd_dl) <- default def if wad_init not called 
    6060 
    6161   PUBLIC   wad_init                  ! initialisation routine called by step.F90 
     
    111111 
    112112      r_rn_wdmin1 = 1 / rn_wdmin1 
    113       ll_wd = .FALSE. 
    114113      IF( ln_wd_il .OR. ln_wd_dl ) THEN 
    115114         ll_wd = .TRUE. 
  • NEMO/trunk/src/OCE/FLO/flo_oce.F90

    r11536 r13558  
    1919   !! ---------------- 
    2020   LOGICAL, PUBLIC ::   ln_floats   !: Activate floats or not 
    21    INTEGER, PUBLIC ::   jpnfl       !: total number of floats during the run 
     21   INTEGER, PUBLIC ::   jpnfl = 0   !: total number of floats during the run 
    2222   INTEGER, PUBLIC ::   jpnnewflo   !: number of floats added in a new run 
    2323   INTEGER, PUBLIC ::   jpnrstflo   !: number of floats for the restart 
  • NEMO/trunk/src/OCE/ICB/icbtrj.F90

    r13062 r13558  
    3535   PUBLIC   icb_trj_end     ! routine called in icbstp.F90 module 
    3636 
    37    INTEGER ::   num_traj 
     37   INTEGER ::   num_traj = 0 
    3838   INTEGER ::   n_dim, m_dim 
    3939   INTEGER ::   ntrajid 
  • NEMO/trunk/src/OCE/IOM/iom_def.F90

    r13286 r13558  
    3333   INTEGER, PUBLIC            ::   iom_open_init = 0   !: used to initialize iom_file(:)%nfid to 0 
    3434!XIOS write restart    
    35    LOGICAL, PUBLIC            ::   lwxios          !: write single file restart using XIOS 
    36    INTEGER, PUBLIC            ::   nxioso          !: type of restart file when writing using XIOS 1 - single, 2 - multiple 
     35   LOGICAL, PUBLIC            ::   lwxios = .FALSE.    !: write single file restart using XIOS 
     36   INTEGER, PUBLIC            ::   nxioso = 0          !: type of restart file when writing using XIOS 1 - single, 2 - multiple 
    3737!XIOS read restart    
    38    LOGICAL, PUBLIC            ::   lrxios          !: read single file restart using XIOS 
     38   LOGICAL, PUBLIC            ::   lrxios = .FALSE.     !: read single file restart using XIOS 
    3939   LOGICAL, PUBLIC            ::   lxios_sini = .FALSE. ! is restart in a single file 
    4040   LOGICAL, PUBLIC            ::   lxios_set  = .FALSE.  
  • NEMO/trunk/src/OCE/ISF/isf_oce.F90

    r12077 r13558  
    7474   ! 
    7575   ! 2.1 -------- ice shelf cavity parameter -------------- 
    76    LOGICAL , PUBLIC            :: l_isfoasis 
     76   LOGICAL , PUBLIC            :: l_isfoasis = .FALSE. 
    7777   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)    ::   risfload                    !: ice shelf load 
    7878   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)    ::   fwfisf_oasis 
  • NEMO/trunk/src/OCE/LDF/ldftra.F90

    r13497 r13558  
    246246      ENDIF 
    247247      ! 
    248       IF( ln_ldfeiv .AND. .NOT.( ln_traldf_iso .OR. ln_traldf_triad ) )                & 
    249            &            CALL ctl_stop( 'ln_ldfeiv=T requires iso-neutral laplacian diffusion' ) 
    250       IF( ln_isfcav .AND. ln_traldf_triad ) & 
    251            &            CALL ctl_stop( ' ice shelf cavity and traldf_triad not tested' ) 
     248      IF( ln_isfcav .AND. ln_traldf_triad )   CALL ctl_stop( ' ice shelf cavity and traldf_triad not tested' ) 
    252249           ! 
    253250      IF(  nldf_tra == np_lap_i .OR. nldf_tra == np_lap_it .OR. & 
     
    541538         IF( ln_traldf_blp )   CALL ctl_stop( 'ldf_eiv_init: eddy induced velocity ONLY with laplacian diffusivity' ) 
    542539         ! 
     540         IF( .NOT.( ln_traldf_iso .OR. ln_traldf_triad ) )   & 
     541           &                  CALL ctl_stop( 'ln_ldfeiv=T requires iso-neutral laplacian diffusion' ) 
    543542         !                                != allocate the aei arrays 
    544543         ALLOCATE( aeiu(jpi,jpj,jpk), aeiv(jpi,jpj,jpk), STAT=ierr ) 
  • NEMO/trunk/src/OCE/ZDF/zdfdrg.F90

    r13497 r13558  
    383383      IF(ll_bot)   zmsk_boost(:,:) = zmsk_boost(:,:) * ssmask(:,:)                         ! x seafloor mask 
    384384      ! 
     385      l_log_not_linssh = .FALSE.    ! default definition 
    385386      ! 
    386387      SELECT CASE( ndrg ) 
  • NEMO/trunk/src/OCE/ZDF/zdfgls.F90

    r13546 r13558  
    815815         WRITE(numout,*) '      Ice-ocean roughness (used if nn_z0_ice/=0)    rn_hsri        = ', rn_hsri 
    816816         WRITE(numout,*) 
    817          WRITE(numout,*) '   Namelist namdrg_top/_bot:   used values:' 
    818          WRITE(numout,*) '      top    ocean cavity roughness (m)             rn_z0(_top)   = ', r_z0_top 
    819          WRITE(numout,*) '      Bottom seafloor     roughness (m)             rn_z0(_bot)   = ', r_z0_bot 
    820          WRITE(numout,*) 
    821817      ENDIF 
    822818 
  • NEMO/trunk/src/OCE/ZDF/zdfphy.F90

    r13472 r13558  
    337337      ! 
    338338   END SUBROUTINE zdf_phy 
     339 
     340 
    339341   INTEGER FUNCTION zdf_phy_alloc() 
    340342      !!---------------------------------------------------------------------- 
  • NEMO/trunk/src/OCE/ZDF/zdftke.F90

    r13530 r13558  
    678678            CALL ctl_stop( 'zdf_tke_init: wrong value for nn_eice, should be 0,1,2, or 3') 
    679679         END SELECT       
    680          IF( .NOT.ln_drg_OFF ) THEN 
    681             WRITE(numout,*) 
    682             WRITE(numout,*) '   Namelist namdrg_top/_bot:   used values:' 
    683             WRITE(numout,*) '      top    ocean cavity roughness (m)          rn_z0(_top)= ', r_z0_top 
    684             WRITE(numout,*) '      Bottom seafloor     roughness (m)          rn_z0(_bot)= ', r_z0_bot 
    685          ENDIF 
    686680         WRITE(numout,*) 
    687681         WRITE(numout,*) '   ==>>>   critical Richardson nb with your parameters  ri_cri = ', ri_cri 
  • NEMO/trunk/src/OCE/nemogcm.F90

    r13286 r13558  
    5454   USE asminc         ! assimilation increments      
    5555   USE asmbkg         ! writing out state trajectory 
    56    USE diaptr         ! poleward transports           (dia_ptr_init routine) 
    5756   USE diadct         ! sections transports           (dia_dct_init routine) 
    5857   USE diaobs         ! Observation diagnostics       (dia_obs_init routine) 
     
    472471      !                                         ! Lateral physics 
    473472                           CALL ldf_tra_init      ! Lateral ocean tracer physics 
    474                            CALL ldf_eiv_init      ! eddy induced velocity param. 
     473                           CALL ldf_eiv_init      ! eddy induced velocity param. must be done after ldf_tra_init 
    475474                           CALL ldf_dyn_init      ! Lateral ocean momentum physics 
    476475 
     
    510509                           CALL     flo_init( Nnn )    ! drifting Floats 
    511510      IF( ln_diacfl    )   CALL dia_cfl_init    ! Initialise CFL diagnostics 
    512 !                           CALL dia_ptr_init    ! Poleward TRansports initialization 
    513511                           CALL dia_dct_init    ! Sections tranports 
    514512                           CALL dia_hsb_init( Nnn )    ! heat content, salt content and volume budgets 
  • NEMO/trunk/src/OCE/timing.F90

    r13538 r13558  
    424424         s_timer => s_timer_root 
    425425         DO WHILE ( ASSOCIATED( s_timer%next ) ) 
    426          IF (.NOT. ASSOCIATED(s_timer%next)) EXIT 
     426            IF (.NOT. ASSOCIATED(s_timer%next)) EXIT 
    427427            IF ( s_timer%tsum_clock < s_timer%next%tsum_clock ) THEN  
    428428               ALLOCATE(s_wrk) 
     
    432432               ll_ord = .FALSE. 
    433433               CYCLE             
    434             ENDIF            
    435          IF( ASSOCIATED(s_timer%next) ) s_timer => s_timer%next 
    436          END DO          
     434            ENDIF 
     435            IF( ASSOCIATED(s_timer%next) ) s_timer => s_timer%next 
     436         END DO 
    437437         IF( ll_ord ) EXIT 
    438438      END DO 
     
    447447      clfmt = '(1x,a,4x,f12.3,6x,f12.3,x,f12.3,2x,f12.3,6x,f7.3,2x,i9)' 
    448448      DO WHILE ( ASSOCIATED(s_timer) ) 
    449          WRITE(numtime,TRIM(clfmt))   s_timer%cname,   & 
    450          &   s_timer%tsum_clock,s_timer%tsum_clock*100./t_elaps(2),            & 
    451          &   s_timer%tsum_cpu  ,s_timer%tsum_cpu*100./t_cpu(2)    ,            & 
    452          &   s_timer%tsum_cpu/s_timer%tsum_clock, s_timer%niter 
     449         IF( s_timer%tsum_clock > 0._wp )                                & 
     450            WRITE(numtime,TRIM(clfmt))   s_timer%cname,                  & 
     451            &   s_timer%tsum_clock,s_timer%tsum_clock*100./t_elaps(2),   & 
     452            &   s_timer%tsum_cpu  ,s_timer%tsum_cpu*100./t_cpu(2)    ,   & 
     453            &   s_timer%tsum_cpu/s_timer%tsum_clock, s_timer%niter 
    453454         s_timer => s_timer%next 
    454455      END DO 
     
    613614         clfmt = '((A),E15.7,2x,f6.2,5x,f12.2,5x,f6.2,5x,f7.2,2x,f12.2,4x,f6.2,2x,f9.2)' 
    614615         DO WHILE ( ASSOCIATED(sl_timer_ave) ) 
    615             WRITE(numtime,TRIM(clfmt))   sl_timer_ave%cname(1:18),                            & 
    616             &   sl_timer_ave%tsum_clock,sl_timer_ave%tsum_clock*100.*jpnij/tot_etime,   & 
    617             &   sl_timer_ave%tsum_cpu  ,sl_timer_ave%tsum_cpu*100.*jpnij/tot_ctime  ,   & 
    618             &   sl_timer_ave%tsum_cpu/sl_timer_ave%tsum_clock,                          & 
    619             &   sl_timer_ave%tmax_clock*100.*jpnij/tot_etime,                           & 
    620             &   sl_timer_ave%tmin_clock*100.*jpnij/tot_etime,                           &                                                
    621             &   sl_timer_ave%niter/REAL(jpnij) 
     616            IF( sl_timer_ave%tsum_clock > 0. )                                             &  
     617               WRITE(numtime,TRIM(clfmt))   sl_timer_ave%cname(1:18),                      & 
     618               &   sl_timer_ave%tsum_clock,sl_timer_ave%tsum_clock*100.*jpnij/tot_etime,   & 
     619               &   sl_timer_ave%tsum_cpu  ,sl_timer_ave%tsum_cpu*100.*jpnij/tot_ctime  ,   & 
     620               &   sl_timer_ave%tsum_cpu/sl_timer_ave%tsum_clock,                          & 
     621               &   sl_timer_ave%tmax_clock*100.*jpnij/tot_etime,                           & 
     622               &   sl_timer_ave%tmin_clock*100.*jpnij/tot_etime,                           & 
     623               &   sl_timer_ave%niter/REAL(jpnij) 
    622624            sl_timer_ave => sl_timer_ave%next 
    623625         END DO 
  • NEMO/trunk/src/OFF/nemogcm.F90

    r13555 r13558  
    4040   USE sbcmod         ! surface boundary condition     (sbc_init     routine) 
    4141   USE phycst         ! physical constant                   (par_cst routine) 
     42   USE zdfphy         ! vertical physics manager       (zdf_phy_init routine) 
    4243   USE dtadyn         ! Lecture and Interpolation of the dynamical fields 
    4344   USE trcini         ! Initilization of the passive tracers 
     
    4950   USE trcnam         ! passive tracer : namelist 
    5051   USE trcrst         ! passive tracer restart 
    51    USE diaptr         ! Need to initialise this as some variables are used in if statements later 
    5252   USE sbc_oce , ONLY : ln_rnf 
    5353   USE sbcrnf         ! surface boundary condition : runoffs 
     
    347347 
    348348                           CALL     sbc_init( Nbb, Nnn, Naa )    ! Forcings : surface module 
    349                            CALL     bdy_init    ! Open boundaries initialisation     
     349                           CALL     bdy_init    ! Open boundaries initialisation 
     350                            
     351                           CALL zdf_phy_init( Nnn )    ! Vertical physics 
    350352 
    351353      !                                      ! Tracer physics 
    352354                           CALL ldf_tra_init    ! Lateral ocean tracer physics 
    353                            CALL ldf_eiv_init    ! Eddy induced velocity param 
     355                           CALL ldf_eiv_init    ! Eddy induced velocity param. must be done after ldf_tra_init 
    354356                           CALL tra_ldf_init    ! lateral mixing 
    355357      IF( l_ldfslp     )   CALL ldf_slp_init    ! slope of lateral mixing 
     
    365367                           CALL dta_dyn_init( Nbb, Nnn, Naa )        ! Initialization for the dynamics 
    366368#endif 
    367  
    368369                           CALL     trc_init( Nbb, Nnn, Naa )        ! Passive tracers initialization 
    369                            CALL dia_ptr_init   ! Poleward TRansports initialization 
    370370                            
    371371      IF(lwp) WRITE(numout,cform_aaa)           ! Flag AAAAAAA 
  • NEMO/trunk/src/SAS/nemogcm.F90

    r13555 r13558  
    378378         &                 CALL prt_ctl_init        ! Print control 
    379379       
     380      IF( ln_rstart )      CALL rst_read_open 
    380381                           CALL day_init        ! model calendar (using both namelist and restart infos) 
    381       IF( ln_rstart )      CALL rst_read_open 
    382  
    383       !                                      ! external forcing  
     382 
    384383#if defined key_agrif 
    385384      uu(:,:,:,:) = 0.0_wp   ;   vv(:,:,:,:) = 0.0_wp   ;   ts(:,:,:,:,:) = 0.0_wp   ! needed for interp done at initialization phase 
    386385#endif  
     386      !                                      ! external forcing  
    387387                           CALL sbc_init( Nbb, Nnn, Naa )  ! Forcings : surface module  
    388388 
  • NEMO/trunk/src/TOP/trc.F90

    r12489 r13558  
    2121   INTEGER, PUBLIC ::   numonr     = -1   !: reference passive tracer namelist output output.namelist.top 
    2222   INTEGER, PUBLIC ::   numstr            !: tracer statistics 
    23    INTEGER, PUBLIC ::   numrtr            !: trc restart (read ) 
     23   INTEGER, PUBLIC ::   numrtr     = -1   !: trc restart (read ) 
    2424   INTEGER, PUBLIC ::   numrtw            !: trc restart ( write ) 
    2525   CHARACTER(:), ALLOCATABLE, PUBLIC ::   numnat_ref   !: character buffer for reference passive tracer namelist_top_ref 
  • NEMO/trunk/src/TOP/trcrst.F90

    r13286 r13558  
    237237               ! calculate start time in hours and minutes 
    238238               zdayfrac=adatrj-INT(adatrj) 
    239                ksecs = NINT(zdayfrac*86400)            ! Nearest second to catch rounding errors in adatrj               
     239               ksecs = NINT(zdayfrac*86400)            ! Nearest second to catch rounding errors in adatrj 
    240240               ihour = INT(ksecs/3600) 
    241241               iminute = ksecs/60-ihour*60 
     
    258258               adatrj = INT(adatrj)                    ! adatrj set to integer as nn_time0 updated             
    259259             ELSE 
     260               ndt05 = NINT( 0.5 * rn_Dt  )   !  --- WARNING --- not defined yet are we did not go through day_init 
    260261               ! parameters corresponding to nit000 - 1 (as we start the step 
    261262               ! loop with a call to day) 
    262                ndastp = ndate0 - 1       ! ndate0 read in the namelist in dom_nam 
     263               ndastp = ndate0        ! ndate0 read in the namelist in dom_nam 
    263264               nhour   =   nn_time0 / 100 
    264265               nminute = ( nn_time0 - nhour * 100 ) 
Note: See TracChangeset for help on using the changeset viewer.