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 14072 for NEMO/trunk/src/OCE/DOM/domain.F90 – NEMO

Ignore:
Timestamp:
2020-12-04T08:48:38+01:00 (3 years ago)
Author:
laurent
Message:

Merging branch "2020/dev_r13648_ASINTER-04_laurent_bulk_ice", ticket #2369

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OCE/DOM/domain.F90

    r14053 r14072  
    66   !! History :  OPA  !  1990-10  (C. Levy - G. Madec)  Original code 
    77   !!                 !  1992-01  (M. Imbard) insert time step initialization 
    8    !!                 !  1996-06  (G. Madec) generalized vertical coordinate  
     8   !!                 !  1996-06  (G. Madec) generalized vertical coordinate 
    99   !!                 !  1997-02  (G. Madec) creation of domwri.F 
    1010   !!                 !  2001-05  (E.Durand - G. Madec) insert closed sea 
     
    1717   !!            4.1  !  2020-02  (G. Madec, S. Techene)  introduce ssh to h0 ratio 
    1818   !!---------------------------------------------------------------------- 
    19     
     19 
    2020   !!---------------------------------------------------------------------- 
    2121   !!   dom_init      : initialize the space and time domain 
     
    3333   USE domvvl         ! variable volume 
    3434#endif 
    35    USE sshwzv  , ONLY : ssh_init_rst   ! set initial ssh  
     35   USE sshwzv  , ONLY : ssh_init_rst   ! set initial ssh 
    3636   USE sbc_oce        ! surface boundary condition: ocean 
    3737   USE trc_oce        ! shared ocean & passive tracers variab 
     
    7272      !!---------------------------------------------------------------------- 
    7373      !!                  ***  ROUTINE dom_init  *** 
    74       !!                     
    75       !! ** Purpose :   Domain initialization. Call the routines that are  
    76       !!              required to create the arrays which define the space  
     74      !! 
     75      !! ** Purpose :   Domain initialization. Call the routines that are 
     76      !!              required to create the arrays which define the space 
    7777      !!              and time domain of the ocean model. 
    7878      !! 
     
    8989      INTEGER ::   iconf = 0    ! local integers 
    9090      REAL(wp)::   zrdt 
    91       CHARACTER (len=64) ::   cform = "(A12, 3(A13, I7))"  
     91      CHARACTER (len=64) ::   cform = "(A12, 3(A13, I7))" 
    9292      INTEGER , DIMENSION(jpi,jpj) ::   ik_top , ik_bot       ! top and bottom ocean level 
    9393      REAL(wp), DIMENSION(jpi,jpj) ::   z1_hu_0, z1_hv_0 
     
    126126         WRITE(numout,*)     '         cn_cfg = ', TRIM( cn_cfg ), '   nn_cfg = ', nn_cfg 
    127127      ENDIF 
    128        
     128 
    129129      ! 
    130130      !           !==  Reference coordinate system  ==! 
     
    240240         WRITE(numout,*) 'dom_init :   ==>>>   END of domain initialization' 
    241241         WRITE(numout,*) '~~~~~~~~' 
    242          WRITE(numout,*)  
     242         WRITE(numout,*) 
    243243      ENDIF 
    244244      ! 
     
    252252      !! ** Purpose :   initialization of global domain <--> local domain indices 
    253253      !! 
    254       !! ** Method  :    
     254      !! ** Method  : 
    255255      !! 
    256256      !! ** Action  : - mig , mjg : local  domain indices ==> global domain, including halos, indices 
     
    271271      ! 
    272272      mig0(:) = mig(:) - nn_hls 
    273       mjg0(:) = mjg(:) - nn_hls   
    274       ! WARNING: to keep compatibility with the trunk that was including periodocity into the input data,  
     273      mjg0(:) = mjg(:) - nn_hls 
     274      ! WARNING: to keep compatibility with the trunk that was including periodocity into the input data, 
    275275      ! we must define mig0 and mjg0 as bellow. 
    276276      ! Once we decide to forget trunk compatibility, we must simply define mig0 and mjg0 as: 
     
    279279      ! 
    280280      !                              ! global domain, including halos, indices ==> local domain indices 
    281       !                                   ! (return (m.0,m.1)=(1,0) if data domain gridpoint is to the west/south of the  
    282       !                                   ! local domain, or (m.0,m.1)=(jp.+1,jp.) to the east/north of local domain.  
     281      !                                   ! (return (m.0,m.1)=(1,0) if data domain gridpoint is to the west/south of the 
     282      !                                   ! local domain, or (m.0,m.1)=(jp.+1,jp.) to the east/north of local domain. 
    283283      DO ji = 1, jpiglo 
    284284        mi0(ji) = MAX( 1 , MIN( ji - nimpp + 1, jpi+1 ) ) 
     
    387387      !!---------------------------------------------------------------------- 
    388388      !!                     ***  ROUTINE dom_nam  *** 
    389       !!                     
     389      !! 
    390390      !! ** Purpose :   read domaine namelists and print the variables. 
    391391      !! 
     
    549549         ! 
    550550         IF( .NOT.l_SAS .AND. iom_varid( numror, 'sshb', ldstop = .FALSE. ) <= 0 ) THEN   !- Check absence of one of the Kbb field (here sshb) 
    551             !                                                                             !  (any Kbb field is missing ==> all Kbb fields are missing)  
     551            !                                                                             !  (any Kbb field is missing ==> all Kbb fields are missing) 
    552552            IF( .NOT.l_1st_euler ) THEN 
    553553               CALL ctl_warn('dom_nam : ssh at Kbb not found in restart files ',   & 
     
    558558         ENDIF 
    559559      ELSEIF( .NOT.l_1st_euler ) THEN                   !*  Initialization case 
    560          IF(lwp) WRITE(numout,*)   
     560         IF(lwp) WRITE(numout,*) 
    561561         IF(lwp) WRITE(numout,*)'   ==>>>   Start from rest (ln_rstart=F)' 
    562          IF(lwp) WRITE(numout,*)'           an Euler initial time step is used : l_1st_euler is forced to .true. '    
     562         IF(lwp) WRITE(numout,*)'           an Euler initial time step is used : l_1st_euler is forced to .true. ' 
    563563         l_1st_euler = .TRUE. 
    564564      ENDIF 
     
    586586         IF(lwp) WRITE(numout,*) 
    587587         SELECT CASE ( nleapy )                !==  Choose calendar for IOIPSL  ==! 
    588          CASE (  1 )  
     588         CASE (  1 ) 
    589589            CALL ioconf_calendar('gregorian') 
    590590            IF(lwp) WRITE(numout,*) '   ==>>>   The IOIPSL calendar is "gregorian", i.e. leap year' 
     
    699699      !!---------------------------------------------------------------------- 
    700700      !!                     ***  ROUTINE domain_cfg  *** 
    701       !!                     
     701      !! 
    702702      !! ** Purpose :   read the domain size in domain configuration file 
    703703      !! 
     
    706706      CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    707707      INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
    708       INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes  
    709       INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
     708      INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes 
     709      INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c. 
    710710      ! 
    711711      INTEGER ::   inum   ! local integer 
     
    739739         cd_cfg = 'UNKNOWN' 
    740740         kk_cfg = -9999999 
    741                                           !- or they may be present as global attributes  
    742                                           !- (netcdf only)   
     741                                          !- or they may be present as global attributes 
     742                                          !- (netcdf only) 
    743743         CALL iom_getatt( inum, 'cn_cfg', cd_cfg )  ! returns   !  if not found 
    744744         CALL iom_getatt( inum, 'nn_cfg', kk_cfg )  ! returns -999 if not found 
     
    762762         WRITE(numout,*) '      type of global domain lateral boundary   jperio = ', kperio 
    763763      ENDIF 
    764       !         
     764      ! 
    765765   END SUBROUTINE domain_cfg 
    766     
    767     
     766 
     767 
    768768   SUBROUTINE cfg_write 
    769769      !!---------------------------------------------------------------------- 
    770770      !!                  ***  ROUTINE cfg_write  *** 
    771       !!                    
    772       !! ** Purpose :   Create the "cn_domcfg_out" file, a NetCDF file which  
    773       !!              contains all the ocean domain informations required to  
     771      !! 
     772      !! ** Purpose :   Create the "cn_domcfg_out" file, a NetCDF file which 
     773      !!              contains all the ocean domain informations required to 
    774774      !!              define an ocean configuration. 
    775775      !! 
     
    777777      !!              ocean configuration. 
    778778      !! 
    779       !! ** output file :   domcfg_out.nc : domain size, characteristics, horizontal  
     779      !! ** output file :   domcfg_out.nc : domain size, characteristics, horizontal 
    780780      !!                       mesh, Coriolis parameter, and vertical scale factors 
    781781      !!                    NB: also contain ORCA family information 
     
    794794      !                       !  create 'domcfg_out.nc' file  ! 
    795795      !                       ! ============================= ! 
    796       !          
     796      ! 
    797797      clnam = cn_domcfg_out  ! filename (configuration information) 
    798       CALL iom_open( TRIM(clnam), inum, ldwrt = .TRUE. )      
     798      CALL iom_open( TRIM(clnam), inum, ldwrt = .TRUE. ) 
    799799      ! 
    800800      !                             !==  ORCA family specificities  ==! 
    801801      IF( TRIM(cn_cfg) == "orca" .OR. TRIM(cn_cfg) == "ORCA" ) THEN 
    802802         CALL iom_rstput( 0, 0, inum, 'ORCA'      , 1._wp            , ktype = jp_i4 ) 
    803          CALL iom_rstput( 0, 0, inum, 'ORCA_index', REAL( nn_cfg, wp), ktype = jp_i4 )          
     803         CALL iom_rstput( 0, 0, inum, 'ORCA_index', REAL( nn_cfg, wp), ktype = jp_i4 ) 
    804804      ENDIF 
    805805      ! 
     
    823823      CALL iom_rstput( 0, 0, inum, 'glamv', glamv, ktype = jp_r8 ) 
    824824      CALL iom_rstput( 0, 0, inum, 'glamf', glamf, ktype = jp_r8 ) 
    825       !                                 
     825      ! 
    826826      CALL iom_rstput( 0, 0, inum, 'gphit', gphit, ktype = jp_r8 )   ! longitude 
    827827      CALL iom_rstput( 0, 0, inum, 'gphiu', gphiu, ktype = jp_r8 ) 
    828828      CALL iom_rstput( 0, 0, inum, 'gphiv', gphiv, ktype = jp_r8 ) 
    829829      CALL iom_rstput( 0, 0, inum, 'gphif', gphif, ktype = jp_r8 ) 
    830       !                                 
     830      ! 
    831831      CALL iom_rstput( 0, 0, inum, 'e1t'  , e1t  , ktype = jp_r8 )   ! i-scale factors (e1.) 
    832832      CALL iom_rstput( 0, 0, inum, 'e1u'  , e1u  , ktype = jp_r8 ) 
     
    843843      ! 
    844844      !                             !==  vertical mesh  ==! 
    845       !                                                      
     845      ! 
    846846      CALL iom_rstput( 0, 0, inum, 'e3t_1d'  , e3t_1d , ktype = jp_r8 )   ! reference 1D-coordinate 
    847847      CALL iom_rstput( 0, 0, inum, 'e3w_1d'  , e3w_1d , ktype = jp_r8 ) 
     
    854854      CALL iom_rstput( 0, 0, inum, 'e3uw_0'  , e3uw_0 , ktype = jp_r8 ) 
    855855      CALL iom_rstput( 0, 0, inum, 'e3vw_0'  , e3vw_0 , ktype = jp_r8 ) 
    856       !                                          
     856      ! 
    857857      !                             !==  wet top and bottom level  ==!   (caution: multiplied by ssmask) 
    858858      ! 
     
    874874      ! 
    875875      !                                ! ============================ 
    876       !                                !        close the files  
     876      !                                !        close the files 
    877877      !                                ! ============================ 
    878878      CALL iom_close( inum ) 
Note: See TracChangeset for help on using the changeset viewer.