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 3764 for branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90 – NEMO

Ignore:
Timestamp:
2013-01-23T15:33:04+01:00 (11 years ago)
Author:
smasson
Message:

dev_MERGE_2012: report bugfixes done in the trunk from r3555 to r3763 into dev_MERGE_2012

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90

    r3701 r3764  
    66   !! History :  OPA  ! 1990-10  (C. Levy, G. Madec)  Original code 
    77   !!            7.0  ! 1991-11  (M. Imbard, C. Levy, G. Madec) 
    8    !!            7.1  ! 1993-03  (M. Imbard, C. Levy, G. Madec, O. Marti, M. Guyon, A. Lazar,  
    9    !!                             P. Delecluse, C. Perigaud, G. Caniaux, B. Colot, C. Maes) release 7.1  
     8   !!            7.1  ! 1993-03  (M. Imbard, C. Levy, G. Madec, O. Marti, M. Guyon, A. Lazar, 
     9   !!                             P. Delecluse, C. Perigaud, G. Caniaux, B. Colot, C. Maes) release 7.1 
    1010   !!             -   ! 1992-06  (L.Terray)  coupling implementation 
    11    !!             -   ! 1993-11  (M.A. Filiberti) IGLOO sea-ice  
    12    !!            8.0  ! 1996-03  (M. Imbard, C. Levy, G. Madec, O. Marti, M. Guyon, A. Lazar,  
     11   !!             -   ! 1993-11  (M.A. Filiberti) IGLOO sea-ice 
     12   !!            8.0  ! 1996-03  (M. Imbard, C. Levy, G. Madec, O. Marti, M. Guyon, A. Lazar, 
    1313   !!                             P. Delecluse, L.Terray, M.A. Filiberti, J. Vialar, A.M. Treguier, M. Levy) release 8.0 
    1414   !!            8.1  ! 1997-06  (M. Imbard, G. Madec) 
    15    !!            8.2  ! 1999-11  (M. Imbard, H. Goosse)  LIM sea-ice model  
    16    !!                 ! 1999-12  (V. Thierry, A-M. Treguier, M. Imbard, M-A. Foujols)  OPEN-MP  
     15   !!            8.2  ! 1999-11  (M. Imbard, H. Goosse)  LIM sea-ice model 
     16   !!                 ! 1999-12  (V. Thierry, A-M. Treguier, M. Imbard, M-A. Foujols)  OPEN-MP 
    1717   !!                 ! 2000-07  (J-M Molines, M. Imbard)  Open Boundary Conditions  (CLIPPER) 
    1818   !!   NEMO     1.0  ! 2002-08  (G. Madec)  F90: Free form and modules 
     
    2525   !!             -   ! 2007-07  (J. Chanut, A. Sellar) Unstructured open boundaries (BDY) 
    2626   !!            3.2  ! 2009-08  (S. Masson)  open/write in the listing file in mpp 
    27    !!            3.3  ! 2010-05  (K. Mogensen, A. Weaver, M. Martin, D. Lea) Assimilation interface  
     27   !!            3.3  ! 2010-05  (K. Mogensen, A. Weaver, M. Martin, D. Lea) Assimilation interface 
    2828   !!             -   ! 2010-10  (C. Ethe, G. Madec) reorganisation of initialisation phase 
    2929   !!            3.3.1! 2011-01  (A. R. Porter, STFC Daresbury) dynamical allocation 
     
    3434   !!   nemo_gcm       : solve ocean dynamics, tracer, biogeochemistry and/or sea-ice 
    3535   !!   nemo_init      : initialization of the NEMO system 
    36    !!   nemo_ctl       : initialisation of the contol print  
     36   !!   nemo_ctl       : initialisation of the contol print 
    3737   !!   nemo_closefile : close remaining open files 
    3838   !!   nemo_alloc     : dynamical allocation 
     
    6464   USE diadct          ! sections transports           (dia_dct_init routine) 
    6565   USE diaobs          ! Observation diagnostics       (dia_obs_init routine) 
     66   USE lib_fortran     ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 
    6667   USE step            ! NEMO time-stepping                 (stp     routine) 
    6768   USE icbini          ! handle bergs, initialisation 
     
    8384   USE sbctide, ONLY: lk_tide 
    8485 
    85  
    8686   IMPLICIT NONE 
    8787   PRIVATE 
     
    8989   PUBLIC   nemo_gcm    ! called by model.F90 
    9090   PUBLIC   nemo_init   ! needed by AGRIF 
     91   PUBLIC   nemo_alloc  ! needed by TAM 
    9192 
    9293   CHARACTER(lc) ::   cform_aaa="( /, 'AAAAAAAA', / ) "     ! flag for output listing 
     
    103104      !!                     ***  ROUTINE nemo_gcm  *** 
    104105      !! 
    105       !! ** Purpose :   NEMO solves the primitive equations on an orthogonal  
     106      !! ** Purpose :   NEMO solves the primitive equations on an orthogonal 
    106107      !!              curvilinear mesh on the sphere. 
    107108      !! 
     
    151152          IF( lk_asminc ) THEN 
    152153             IF( ln_bkgwri ) CALL asm_bkg_wri( nit000 - 1 )    ! Output background fields 
    153              IF( ln_trjwri ) CALL asm_trj_wri( nit000 - 1 )    ! Output trajectory fields 
    154154             IF( ln_asmdin ) THEN                        ! Direct initialization 
    155155                IF( ln_trainc ) CALL tra_asm_inc( nit000 - 1 )    ! Tracers 
    156                 IF( ln_dyninc ) THEN  
    157                    CALL dyn_asm_inc( nit000 - 1 )    ! Dynamics 
    158                    IF ( ln_asmdin ) CALL ssh_wzv ( nit000 - 1 )      ! update vertical velocity  
    159                 ENDIF 
     156                IF( ln_dyninc ) CALL dyn_asm_inc( nit000 - 1 )    ! Dynamics 
    160157                IF( ln_sshinc ) CALL ssh_asm_inc( nit000 - 1 )    ! SSH 
    161158             ENDIF 
    162159          ENDIF 
    163          
     160 
    164161         DO WHILE ( istp <= nitend .AND. nstop == 0 ) 
    165162#if defined key_agrif 
     
    176173      ! 
    177174      IF( ln_icebergs )   CALL icb_end( nitend ) 
    178         
     175 
    179176      !                            !------------------------! 
    180177      !                            !==  finalize the run  ==! 
     
    184181      IF( nstop /= 0 .AND. lwp ) THEN   ! error print 
    185182         WRITE(numout,cform_err) 
    186          WRITE(numout,*) nstop, ' error have been found'  
     183         WRITE(numout,*) nstop, ' error have been found' 
    187184      ENDIF 
    188185      ! 
     
    261258      lwp = (narea == 1) .OR. ln_ctl                        ! control of all listing output print 
    262259 
    263       ! If dimensions of processor grid weren't specified in the namelist file  
     260      ! If dimensions of processor grid weren't specified in the namelist file 
    264261      ! then we calculate them here now that we have our communicator size 
    265262      IF( (jpni < 1) .OR. (jpnj < 1) )THEN 
     
    302299         WRITE(numout,*) 
    303300         WRITE(numout,*) 
    304          DO ji = 1, SIZE(cltxt)  
     301         DO ji = 1, SIZE(cltxt) 
    305302            IF( TRIM(cltxt(ji)) /= '' )   WRITE(numout,*) cltxt(ji)      ! control print of mynode 
    306303         END DO 
     
    309306      ENDIF 
    310307 
    311       ! Now we know the dimensions of the grid and numout has been set we can  
     308      ! Now we know the dimensions of the grid and numout has been set we can 
    312309      ! allocate arrays 
    313310      CALL nemo_alloc() 
     
    336333      IF( ln_ctl        )   CALL prt_ctl_init   ! Print control 
    337334 
    338       IF( lk_obc        )   CALL     obc_init   ! Open boundaries  
     335      IF( lk_obc        )   CALL     obc_init   ! Open boundaries 
    339336 
    340337                            CALL  istate_init   ! ocean initial state (Dynamics and tracers) 
     
    349346 
    350347      !                                     ! Ocean physics 
    351                             CALL     sbc_init   ! Forcings : surface module  
     348                            CALL     sbc_init   ! Forcings : surface module 
    352349      !                                         ! Vertical physics 
    353350                            CALL     zdf_init      ! namelist read 
     
    358355      IF( lk_zdfkpp     )   CALL zdf_kpp_init      ! KPP closure scheme 
    359356      IF( lk_zdftmx     )   CALL zdf_tmx_init      ! tidal vertical mixing 
    360       IF( lk_zdfddm .AND. .NOT. lk_zdfkpp )   &  
     357      IF( lk_zdfddm .AND. .NOT. lk_zdfkpp )   & 
    361358         &                  CALL zdf_ddm_init      ! double diffusive mixing 
    362359      !                                         ! Lateral physics 
     
    381378                            CALL dyn_zdf_init   ! vertical diffusion 
    382379                            CALL dyn_spg_init   ! surface pressure gradient 
    383                              
     380 
    384381      !                                     ! Misc. options 
    385382      IF( nn_cla == 1   )   CALL cla_init       ! Cross Land Advection 
     
    401398                            CALL dia_obs_init            ! Initialize observational data 
    402399                            CALL dia_obs( nit000 - 1 )   ! Observation operator for restart 
    403       ENDIF       
     400      ENDIF 
    404401      !                                     ! Assimilation increments 
    405402      IF( lk_asminc     )   CALL asm_inc_init   ! Initialize assimilation increments 
     
    413410      !!                     ***  ROUTINE nemo_ctl  *** 
    414411      !! 
    415       !! ** Purpose :   control print setting  
     412      !! ** Purpose :   control print setting 
    416413      !! 
    417414      !! ** Method  : - print namctl information and check some consistencies 
     
    460457         !                              ! indices used for the SUM control 
    461458         IF( nictls+nictle+njctls+njctle == 0 )   THEN    ! print control done over the default area 
    462             lsp_area = .FALSE.                         
     459            lsp_area = .FALSE. 
    463460         ELSE                                             ! print control done over a specific  area 
    464461            lsp_area = .TRUE. 
     
    482479      ENDIF 
    483480      ! 
    484       IF( nbench == 1 ) THEN              ! Benchmark  
     481      IF( nbench == 1 ) THEN              ! Benchmark 
    485482         SELECT CASE ( cp_cfg ) 
    486483         CASE ( 'gyre' )   ;   CALL ctl_warn( ' The Benchmark is activated ' ) 
     
    493490         &                                               'with the IOM Input/Output manager. '         ,   & 
    494491         &                                               'Compile with key_iomput enabled' ) 
     492      ! 
     493      IF( 1_wp /= SIGN(1._wp,-0._wp)  )   CALL ctl_stop( 'nemo_ctl: The intrinsec SIGN function follows ',  & 
     494         &                                               'f2003 standard. '                              ,  & 
     495         &                                               'Compile with key_nosignedzero enabled' ) 
    495496      ! 
    496497   END SUBROUTINE nemo_ctl 
     
    544545      !!---------------------------------------------------------------------- 
    545546      ! 
    546       ierr =        oce_alloc       ()          ! ocean  
     547      ierr =        oce_alloc       ()          ! ocean 
    547548      ierr = ierr + dia_wri_alloc   () 
    548549      ierr = ierr + dom_oce_alloc   ()          ! ocean domain 
     
    568569      !!                 ***  ROUTINE nemo_partition  *** 
    569570      !! 
    570       !! ** Purpose :    
     571      !! ** Purpose : 
    571572      !! 
    572573      !! ** Method  : 
     
    616617      !! 
    617618      !! ** Purpose :   return the prime factors of n. 
    618       !!                knfax factors are returned in array kfax which is of  
     619      !!                knfax factors are returned in array kfax which is of 
    619620      !!                maximum dimension kmaxfax. 
    620621      !! ** Method  : 
     
    684685      !!===================================================================== 
    685686      !!---------------------------------------------------------------------- 
    686       !!  
     687      !! 
    687688      !! ** Purpose :   Initialization of the northern neighbours lists. 
    688689      !!---------------------------------------------------------------------- 
    689       !!    1.0  ! 2011-10  (A. C. Coward, NOCS & J. Donners, PRACE)  
     690      !!    1.0  ! 2011-10  (A. C. Coward, NOCS & J. Donners, PRACE) 
    690691      !!---------------------------------------------------------------------- 
    691692 
     
    769770      jtyp = 5 
    770771      lrankset = .FALSE. 
    771       znnbrs = narea  
     772      znnbrs = narea 
    772773      CALL lbc_lnk( znnbrs, 'J', 1. ) ! first ice U-V point 
    773774 
     
    782783      ENDIF 
    783784 
    784       znnbrs = narea  
     785      znnbrs = narea 
    785786      CALL lbc_lnk( znnbrs, 'K', 1. ) ! second ice U-V point 
    786787 
     
    805806         END DO 
    806807         ! 
    807          ! For northern row areas, set l_north_nogather so that all subsequent exchanges  
     808         ! For northern row areas, set l_north_nogather so that all subsequent exchanges 
    808809         ! can use peer to peer communications at the north fold 
    809810         ! 
Note: See TracChangeset for help on using the changeset viewer.