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 9019 for branches/2017/dev_merge_2017/NEMOGCM/NEMO/OFF_SRC – NEMO

Ignore:
Timestamp:
2017-12-13T15:58:53+01:00 (6 years ago)
Author:
timgraham
Message:

Merge of dev_CNRS_2017 into branch

Location:
branches/2017/dev_merge_2017/NEMOGCM/NEMO/OFF_SRC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OFF_SRC/dtadyn.F90

    r7646 r9019  
    167167      CALL zdf_mxl( kt )                                                   ! In any case, we need mxl 
    168168      ! 
    169       hmld(:,:)         = sf_dyn(jf_mld)%fnow(:,:,1) * tmask(:,:,1)    ! mixed layer depht 
    170       avt(:,:,:)        = sf_dyn(jf_avt)%fnow(:,:,:) * tmask(:,:,:)    ! vertical diffusive coefficient  
    171       ! 
    172 #if defined key_trabbl && ! defined key_c1d 
    173       ahu_bbl(:,:)      = sf_dyn(jf_ubl)%fnow(:,:,1) * umask(:,:,1)    ! bbl diffusive coef 
    174       ahv_bbl(:,:)      = sf_dyn(jf_vbl)%fnow(:,:,1) * vmask(:,:,1) 
    175 #endif 
     169      hmld(:,:)       = sf_dyn(jf_mld)%fnow(:,:,1) * tmask(:,:,1)    ! mixed layer depht 
     170      avt(:,:,:)      = sf_dyn(jf_avt)%fnow(:,:,:) * tmask(:,:,:)    ! vertical diffusive coefficient  
     171      ! 
     172      IF( ln_trabbl .AND. .NOT.lk_c1d ) THEN       ! diffusive Bottom boundary layer param  
     173         ahu_bbl(:,:) = sf_dyn(jf_ubl)%fnow(:,:,1) * umask(:,:,1)    ! bbl diffusive coef 
     174         ahv_bbl(:,:) = sf_dyn(jf_vbl)%fnow(:,:,1) * vmask(:,:,1) 
     175      ENDIF 
    176176      ! 
    177177      ! 
     
    275275      ENDIF 
    276276      ! 
    277       IF( lk_trabbl ) THEN 
     277      IF( ln_trabbl ) THEN 
    278278                 jf_ubl  = jfld + 1    ;         jf_vbl  = jfld + 2     ;      jfld = jf_vbl 
    279279           slf_d(jf_ubl) = sn_ubl      ;   slf_d(jf_vbl) = sn_vbl 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OFF_SRC/nemogcm.F90

    r8528 r9019  
    2828   USE trabbl          ! bottom boundary layer          (tra_bbl_init routine) 
    2929   USE traldf          ! lateral physics                (tra_ldf_init routine) 
    30    USE zdfini          ! vertical physics: initialization 
    31    USE sbcmod          ! surface boundary condition       (sbc_init     routine) 
    32    USE phycst          ! physical constant                  (par_cst routine) 
     30   USE sbcmod          ! surface boundary condition     (sbc_init     routine) 
     31   USE phycst          ! physical constant                   (par_cst routine) 
    3332   USE dtadyn          ! Lecture and Interpolation of the dynamical fields 
    3433   USE trcini          ! Initilization of the passive tracers 
    35    USE daymod          ! calendar                         (day     routine) 
    36    USE trcstp          ! passive tracer time-stepping      (trc_stp routine) 
     34   USE daymod          ! calendar                            (day     routine) 
     35   USE trcstp          ! passive tracer time-stepping        (trc_stp routine) 
    3736   USE dtadyn          ! Lecture and interpolation of the dynamical fields 
    3837   !              ! Passive tracers needs 
     
    150149      !! ** Purpose :   initialization of the nemo model in off-line mode 
    151150      !!---------------------------------------------------------------------- 
    152       INTEGER ::   ji            ! dummy loop indices 
    153       INTEGER ::   ilocal_comm   ! local integer 
    154       INTEGER ::   ios, inum 
     151      INTEGER  ::   ji                 ! dummy loop indices 
     152      INTEGER  ::   ilocal_comm        ! local integer 
     153      INTEGER  ::   ios, inum          ! local integers 
     154      INTEGER  ::   iiarea, ijarea     ! local integers 
     155      INTEGER  ::   iirest, ijrest     ! local integers 
    155156      REAL(wp) ::   ziglo, zjglo, zkglo, zperio   ! local scalars 
    156157      CHARACTER(len=120), DIMENSION(30) ::   cltxt, cltxt2, clnam 
     
    158159      NAMELIST/namctl/ ln_ctl  , nn_print, nn_ictls, nn_ictle,   & 
    159160         &             nn_isplt, nn_jsplt, nn_jctls, nn_jctle,   & 
    160          &             nn_timing, nn_diacfl 
     161         &             ln_timing, ln_diacfl 
    161162 
    162163      NAMELIST/namcfg/ ln_read_cfg, cn_domcfg, ln_write_cfg, cn_domcfg_out, ln_use_jattr 
     
    198199         CALL usr_def_nam( cltxt2, clnam, cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio ) 
    199200      ENDIF 
    200       jpk    = jpkglo 
    201201      ! 
    202202      ! 
     
    246246      END IF 
    247247 
    248       ! Calculate domain dimensions given calculated jpni and jpnj 
    249       ! This used to be done in par_oce.F90 when they were parameters rather 
    250       ! than variables 
    251       jpi = ( jpiglo-2*jpreci + (jpni-1) ) / jpni + 2*jpreci   ! first  dim. 
    252       jpj = ( jpjglo-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj   ! second dim. 
     248      iiarea = 1 + MOD( narea - 1 , jpni ) 
     249      ijarea = 1 + ( narea - 1 ) / jpni 
     250      iirest = 1 + MOD( jpiglo - 2*nn_hls - 1 , jpni ) 
     251      ijrest = 1 + MOD( jpjglo - 2*nn_hls - 1 , jpnj ) 
     252#if defined key_nemocice_decomp 
     253      jpi = ( nx_global+2-2*nn_hls + (jpni-1) ) / jpni + 2*nn_hls    ! first  dim. 
     254      jpj = ( ny_global+2-2*nn_hls + (jpnj-1) ) / jpnj + 2*nn_hls    ! second dim.  
     255      jpimax  = jpi 
     256      jpjmax  = jpj 
     257      IF( iiarea == jpni ) jpi = jpiglo - (jpni - 1) * (jpi - 2*nn_hls) 
     258      IF( ijarea == jpnj ) jpj = jpjglo - (jpnj - 1) * (jpj - 2*nn_hls) 
     259#else 
     260      jpi = ( jpiglo     -2*nn_hls + (jpni-1) ) / jpni + 2*nn_hls    ! first  dim. 
     261      jpj = ( jpjglo     -2*nn_hls + (jpnj-1) ) / jpnj + 2*nn_hls    ! second dim. 
     262      jpimax  = jpi 
     263      jpjmax  = jpj 
     264      IF( iiarea > iirest ) jpi = jpi - 1 
     265      IF( ijarea > ijrest ) jpj = jpj - 1 
     266#endif 
     267 
     268      jpk   = jpkglo                                           ! third dim 
     269 
    253270      jpim1 = jpi-1                                            ! inner domain indices 
    254271      jpjm1 = jpj-1                                            !   "           " 
    255       jpkm1 = jpk-1                                            !   "           " 
     272      jpkm1 = MAX( 1, jpk-1 )                                  !   "           " 
    256273      jpij  = jpi*jpj                                          !  jpi x j 
    257274 
     
    286303 
    287304      !                                      ! Domain decomposition 
    288       IF( jpni*jpnj == jpnij ) THEN   ;   CALL mpp_init      ! standard cutting out 
    289       ELSE                            ;   CALL mpp_init2     ! eliminate land processors 
    290       ENDIF 
    291       ! 
    292       IF( nn_timing == 1 )  CALL timing_init 
     305      CALL mpp_init 
     306      ! 
     307      IF( ln_timing    )   CALL timing_init 
    293308      ! 
    294309 
    295310      !                                      ! General initialization 
    296       IF( nn_timing == 1 )  CALL timing_start( 'nemo_init') 
    297       ! 
    298                             CALL     phy_cst    ! Physical constants 
    299                             CALL     eos_init   ! Equation of state 
    300       IF( lk_c1d        )   CALL     c1d_init   ! 1D column configuration 
    301  
    302                             CALL     dom_init   ! Domain 
    303  
    304                             CALL  istate_init   ! ocean initial state (Dynamics and tracers) 
    305  
    306       IF( ln_nnogather )    CALL nemo_northcomms   ! Initialise the northfold neighbour lists (must be done after the masks are defined) 
    307  
    308       IF( ln_ctl        )   CALL prt_ctl_init   ! Print control 
    309  
    310                             CALL     sbc_init   ! Forcings : surface module 
    311  
    312                             CALL ldf_tra_init   ! Lateral ocean tracer physics 
    313                             CALL ldf_eiv_init   ! Eddy induced velocity param 
    314                             CALL tra_ldf_init   ! lateral mixing 
    315       IF( l_ldfslp )        CALL ldf_slp_init   ! slope of lateral mixing 
    316  
    317                             CALL tra_qsr_init   ! penetrative solar radiation qsr 
    318       IF( lk_trabbl     )   CALL tra_bbl_init   ! advective (and/or diffusive) bottom boundary layer scheme 
    319  
    320                             CALL trc_nam_run    ! Needed to get restart parameters for passive tracers 
    321                             CALL trc_rst_cal( nit000, 'READ' )   ! calendar 
    322                             CALL dta_dyn_init   ! Initialization for the dynamics 
    323  
    324                             CALL     trc_init   ! Passive tracers initialization 
    325                             CALL dia_ptr_init   ! Initialise diaptr as some variables are used  
     311      IF( ln_timing    )   CALL timing_start( 'nemo_init') 
     312      ! 
     313                           CALL     phy_cst    ! Physical constants 
     314                           CALL     eos_init   ! Equation of state 
     315      IF( lk_c1d       )   CALL     c1d_init   ! 1D column configuration 
     316 
     317                           CALL     dom_init   ! Domain 
     318 
     319                           CALL  istate_init   ! ocean initial state (Dynamics and tracers) 
     320 
     321      IF( ln_nnogather )   CALL nemo_northcomms   ! Initialise the northfold neighbour lists (must be done after the masks are defined) 
     322 
     323      IF( ln_ctl       )   CALL prt_ctl_init   ! Print control 
     324 
     325                           CALL     sbc_init   ! Forcings : surface module 
     326 
     327                           CALL ldf_tra_init   ! Lateral ocean tracer physics 
     328                           CALL ldf_eiv_init   ! Eddy induced velocity param 
     329                           CALL tra_ldf_init   ! lateral mixing 
     330      IF( l_ldfslp     )   CALL ldf_slp_init   ! slope of lateral mixing 
     331 
     332                           CALL tra_qsr_init   ! penetrative solar radiation qsr 
     333      IF( ln_trabbl    )   CALL tra_bbl_init   ! advective (and/or diffusive) bottom boundary layer scheme 
     334 
     335                           CALL trc_nam_run    ! Needed to get restart parameters for passive tracers 
     336                           CALL trc_rst_cal( nit000, 'READ' )   ! calendar 
     337                           CALL dta_dyn_init   ! Initialization for the dynamics 
     338 
     339                           CALL     trc_init   ! Passive tracers initialization 
     340                           CALL dia_ptr_init   ! Initialise diaptr as some variables are used  
    326341      !                                         ! in various advection and diffusion routines 
    327342      IF(lwp) WRITE(numout,cform_aaa)           ! Flag AAAAAAA 
    328343      ! 
    329       IF( nn_timing == 1 )  CALL timing_stop( 'nemo_init') 
     344      IF( ln_timing    )   CALL timing_stop( 'nemo_init') 
    330345      ! 
    331346   END SUBROUTINE nemo_init 
     
    354369         WRITE(numout,*) '      number of proc. following i     nn_isplt   = ', nn_isplt 
    355370         WRITE(numout,*) '      number of proc. following j     nn_jsplt   = ', nn_jsplt 
    356          WRITE(numout,*) '      timing activated    (0/1)       nn_timing  = ', nn_timing 
     371         WRITE(numout,*) '      timing by routine               ln_timing  = ', ln_timing 
     372         WRITE(numout,*) '      CFL diagnostics                 ln_diacfl  = ', ln_diacfl 
    357373      ENDIF 
    358374      ! 
     
    364380      isplt     = nn_isplt 
    365381      jsplt     = nn_jsplt 
     382!!gm to be remove at the end of the 2017 merge party 
     383      if( ln_timing ) then  ;  nn_timing = 1 
     384      else                  ;  nn_timing = 0 
     385      endif 
     386!!gm end 
    366387 
    367388 
Note: See TracChangeset for help on using the changeset viewer.