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 11822 for NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DOM – NEMO

Ignore:
Timestamp:
2019-10-29T11:41:36+01:00 (5 years ago)
Author:
acc
Message:

Branch 2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps. Sette tested updates to branch to align with trunk changes between 10721 and 11740. Sette tests are passing but results differ from branch before these changes (except for GYRE_PISCES and VORTEX) and branch results already differed from trunk because of algorithmic fixes. Will need more checks to confirm correctness.

Location:
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DOM
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DOM/domain.F90

    r11480 r11822  
    103103         CASE( 0 )   ;   WRITE(numout,*) '         (i.e. closed)' 
    104104         CASE( 1 )   ;   WRITE(numout,*) '         (i.e. cyclic east-west)' 
    105          CASE( 2 )   ;   WRITE(numout,*) '         (i.e. equatorial symmetric)' 
     105         CASE( 2 )   ;   WRITE(numout,*) '         (i.e. cyclic north-south)' 
    106106         CASE( 3 )   ;   WRITE(numout,*) '         (i.e. north fold with T-point pivot)' 
    107107         CASE( 4 )   ;   WRITE(numout,*) '         (i.e. cyclic east-west and north fold with T-point pivot)' 
     
    310310      REWIND( numnam_ref )              ! Namelist namrun in reference namelist : Parameters of the run 
    311311      READ  ( numnam_ref, namrun, IOSTAT = ios, ERR = 901) 
    312 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namrun in reference namelist', lwp ) 
     312901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namrun in reference namelist' ) 
    313313      REWIND( numnam_cfg )              ! Namelist namrun in configuration namelist : Parameters of the run 
    314314      READ  ( numnam_cfg, namrun, IOSTAT = ios, ERR = 902 ) 
    315 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namrun in configuration namelist', lwp ) 
     315902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namrun in configuration namelist' ) 
    316316      IF(lwm) WRITE ( numond, namrun ) 
    317317      ! 
     
    338338            WRITE(numout,*) '      frequency of restart file       nn_stock        = ', nn_stock 
    339339         ENDIF 
     340#if ! defined key_iomput 
    340341         WRITE(numout,*) '      frequency of output file        nn_write        = ', nn_write 
     342#endif 
    341343         WRITE(numout,*) '      mask land points                ln_mskland      = ', ln_mskland 
    342344         WRITE(numout,*) '      additional CF standard metadata ln_cfmeta       = ', ln_cfmeta 
     
    360362      nleapy = nn_leapy 
    361363      ninist = nn_istate 
    362       nstock = nn_stock 
    363       nstocklist = nn_stocklist 
    364       nwrite = nn_write 
    365364      neuler = nn_euler 
    366365      IF( neuler == 1 .AND. .NOT. ln_rstart ) THEN 
     
    371370      ENDIF 
    372371      !                             ! control of output frequency 
    373       IF( nstock == 0 .OR. nstock > nitend ) THEN 
    374          WRITE(ctmp1,*) 'nstock = ', nstock, ' it is forced to ', nitend 
     372      IF( .NOT. ln_rst_list ) THEN     ! we use nn_stock 
     373         IF( nn_stock == -1 )   CALL ctl_warn( 'nn_stock = -1 --> no restart will be done' ) 
     374         IF( nn_stock == 0 .OR. nn_stock > nitend ) THEN 
     375            WRITE(ctmp1,*) 'nn_stock = ', nn_stock, ' it is forced to ', nitend 
     376            CALL ctl_warn( ctmp1 ) 
     377            nn_stock = nitend 
     378         ENDIF 
     379      ENDIF 
     380#if ! defined key_iomput 
     381      IF( nn_write == -1 )   CALL ctl_warn( 'nn_write = -1 --> no output files will be done' ) 
     382      IF ( nn_write == 0 ) THEN 
     383         WRITE(ctmp1,*) 'nn_write = ', nn_write, ' it is forced to ', nitend 
    375384         CALL ctl_warn( ctmp1 ) 
    376          nstock = nitend 
    377       ENDIF 
    378       IF ( nwrite == 0 ) THEN 
    379          WRITE(ctmp1,*) 'nwrite = ', nwrite, ' it is forced to ', nitend 
    380          CALL ctl_warn( ctmp1 ) 
    381          nwrite = nitend 
    382       ENDIF 
     385         nn_write = nitend 
     386      ENDIF 
     387#endif 
    383388 
    384389#if defined key_agrif 
     
    403408      REWIND( numnam_ref )              ! Namelist namdom in reference namelist : space & time domain (bathymetry, mesh, timestep) 
    404409      READ  ( numnam_ref, namdom, IOSTAT = ios, ERR = 903) 
    405 903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdom in reference namelist', lwp ) 
     410903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdom in reference namelist' ) 
    406411      REWIND( numnam_cfg )              ! Namelist namdom in configuration namelist : space & time domain (bathymetry, mesh, timestep) 
    407412      READ  ( numnam_cfg, namdom, IOSTAT = ios, ERR = 904 ) 
    408 904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdom in configuration namelist', lwp ) 
     413904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdom in configuration namelist' ) 
    409414      IF(lwm) WRITE( numond, namdom ) 
    410415      ! 
     
    435440      REWIND( numnam_ref )              ! Namelist namnc4 in reference namelist : NETCDF 
    436441      READ  ( numnam_ref, namnc4, IOSTAT = ios, ERR = 907) 
    437 907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namnc4 in reference namelist', lwp ) 
     442907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namnc4 in reference namelist' ) 
    438443      REWIND( numnam_cfg )              ! Namelist namnc4 in configuration namelist : NETCDF 
    439444      READ  ( numnam_cfg, namnc4, IOSTAT = ios, ERR = 908 ) 
    440 908   IF( ios >  0 )   CALL ctl_nam ( ios , 'namnc4 in configuration namelist', lwp ) 
     445908   IF( ios >  0 )   CALL ctl_nam ( ios , 'namnc4 in configuration namelist' ) 
    441446      IF(lwm) WRITE( numond, namnc4 ) 
    442447 
     
    513518 
    514519 
    515    SUBROUTINE domain_cfg( ldtxt, cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     520   SUBROUTINE domain_cfg( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
    516521      !!---------------------------------------------------------------------- 
    517522      !!                     ***  ROUTINE dom_nam  *** 
     
    521526      !! ** Method  :   read the cn_domcfg NetCDF file 
    522527      !!---------------------------------------------------------------------- 
    523       CHARACTER(len=*), DIMENSION(:), INTENT(out) ::   ldtxt           ! stored print information 
    524528      CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    525529      INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
     
    527531      INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
    528532      ! 
    529       INTEGER ::   inum, ii   ! local integer 
     533      INTEGER ::   inum   ! local integer 
    530534      REAL(wp) ::   zorca_res                     ! local scalars 
    531       REAL(wp) ::   ziglo, zjglo, zkglo, zperio   !   -      - 
    532       !!---------------------------------------------------------------------- 
    533       ! 
    534       ii = 1 
    535       WRITE(ldtxt(ii),*) '           '                                                    ;   ii = ii+1 
    536       WRITE(ldtxt(ii),*) 'domain_cfg : domain size read in ', TRIM( cn_domcfg ), ' file'  ;   ii = ii+1 
    537       WRITE(ldtxt(ii),*) '~~~~~~~~~~ '                                                    ;   ii = ii+1 
     535      REAL(wp) ::   zperio                        !   -      - 
     536      INTEGER, DIMENSION(4) ::   idvar, idimsz    ! size   of dimensions 
     537      !!---------------------------------------------------------------------- 
     538      ! 
     539      IF(lwp) THEN 
     540         WRITE(numout,*) '           ' 
     541         WRITE(numout,*) 'domain_cfg : domain size read in ', TRIM( cn_domcfg ), ' file' 
     542         WRITE(numout,*) '~~~~~~~~~~ ' 
     543      ENDIF 
    538544      ! 
    539545      CALL iom_open( cn_domcfg, inum ) 
     
    546552         CALL iom_get( inum, 'ORCA_index', zorca_res )   ;   kk_cfg = NINT( zorca_res ) 
    547553         ! 
    548          WRITE(ldtxt(ii),*) '   .'                                                     ;   ii = ii+1 
    549          WRITE(ldtxt(ii),*) '   ==>>>   ORCA configuration '                           ;   ii = ii+1 
    550          WRITE(ldtxt(ii),*) '   .'                                                     ;   ii = ii+1 
     554         IF(lwp) THEN 
     555            WRITE(numout,*) '   .' 
     556            WRITE(numout,*) '   ==>>>   ORCA configuration ' 
     557            WRITE(numout,*) '   .' 
     558         ENDIF 
    551559         ! 
    552560      ELSE                                !- cd_cfg & k_cfg are not used 
     
    561569         ! 
    562570      ENDIF 
    563       ! 
    564       CALL iom_get( inum, 'jpiglo', ziglo  )   ;   kpi = NINT( ziglo ) 
    565       CALL iom_get( inum, 'jpjglo', zjglo  )   ;   kpj = NINT( zjglo ) 
    566       CALL iom_get( inum, 'jpkglo', zkglo  )   ;   kpk = NINT( zkglo ) 
     571       ! 
     572      idvar = iom_varid( inum, 'e3t_0', kdimsz = idimsz )   ! use e3t_0, that must exist, to get jp(ijk)glo 
     573      kpi = idimsz(1) 
     574      kpj = idimsz(2) 
     575      kpk = idimsz(3) 
    567576      CALL iom_get( inum, 'jperio', zperio )   ;   kperio = NINT( zperio ) 
    568577      CALL iom_close( inum ) 
    569578      ! 
    570       WRITE(ldtxt(ii),*) '      cn_cfg = ', TRIM(cd_cfg), '   nn_cfg = ', kk_cfg             ;   ii = ii+1 
    571       WRITE(ldtxt(ii),*) '      jpiglo = ', kpi                                              ;   ii = ii+1 
    572       WRITE(ldtxt(ii),*) '      jpjglo = ', kpj                                              ;   ii = ii+1 
    573       WRITE(ldtxt(ii),*) '      jpkglo = ', kpk                                              ;   ii = ii+1 
    574       WRITE(ldtxt(ii),*) '      type of global domain lateral boundary   jperio = ', kperio  ;   ii = ii+1 
     579      IF(lwp) THEN 
     580         WRITE(numout,*) '      cn_cfg = ', TRIM(cd_cfg), '   nn_cfg = ', kk_cfg 
     581         WRITE(numout,*) '      jpiglo = ', kpi 
     582         WRITE(numout,*) '      jpjglo = ', kpj 
     583         WRITE(numout,*) '      jpkglo = ', kpk 
     584         WRITE(numout,*) '      type of global domain lateral boundary   jperio = ', kperio 
     585      ENDIF 
    575586      !         
    576587   END SUBROUTINE domain_cfg 
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DOM/dommsk.F90

    r10425 r11822  
    100100         &             ln_tra_dmp, ln_dyn3d_dmp, rn_time_dmp, rn_time_dmp_out, & 
    101101         &             cn_ice, nn_ice_dta,                                     & 
    102          &             rn_ice_tem, rn_ice_sal, rn_ice_age,                     & 
    103          &             ln_vol, nn_volctl, nn_rimwidth, nb_jpk_bdy 
     102         &             ln_vol, nn_volctl, nn_rimwidth 
    104103      !!--------------------------------------------------------------------- 
    105104      ! 
    106105      REWIND( numnam_ref )              ! Namelist namlbc in reference namelist : Lateral momentum boundary condition 
    107106      READ  ( numnam_ref, namlbc, IOSTAT = ios, ERR = 901 ) 
    108 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namlbc in reference namelist', lwp ) 
     107901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namlbc in reference namelist' ) 
    109108      REWIND( numnam_cfg )              ! Namelist namlbc in configuration namelist : Lateral momentum boundary condition 
    110109      READ  ( numnam_cfg, namlbc, IOSTAT = ios, ERR = 902 ) 
    111 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namlbc in configuration namelist', lwp ) 
     110902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namlbc in configuration namelist' ) 
    112111      IF(lwm) WRITE ( numond, namlbc ) 
    113112       
     
    142141            ENDIF 
    143142         END DO   
    144       END DO   
    145 !SF  add here lbc_lnk: bug not still understood : cause now domain configuration is read ! 
    146 !!gm I don't understand why...   
     143      END DO 
     144      ! 
     145      ! the following call is mandatory 
     146      ! it masks boundaries (bathy=0) where needed depending on the configuration (closed, periodic...)   
    147147      CALL lbc_lnk( 'dommsk', tmask  , 'T', 1._wp )      ! Lateral boundary conditions 
    148148 
     
    150150      REWIND( numnam_ref )              ! Namelist nambdy in reference namelist :Unstructured open boundaries 
    151151      READ  ( numnam_ref, nambdy, IOSTAT = ios, ERR = 903) 
    152 903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambdy in reference namelist', lwp ) 
     152903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nambdy in reference namelist' ) 
    153153      REWIND( numnam_cfg )              ! Namelist nambdy in configuration namelist :Unstructured open boundaries 
    154154      READ  ( numnam_cfg, nambdy, IOSTAT = ios, ERR = 904 ) 
    155 904   IF( ios >  0 )   CALL ctl_nam ( ios , 'nambdy in configuration namelist', lwp ) 
     155904   IF( ios >  0 )   CALL ctl_nam ( ios , 'nambdy in configuration namelist' ) 
    156156      ! ------------------------ 
    157157      IF ( ln_bdy .AND. ln_mask_file ) THEN 
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DOM/domvvl.F90

    r11483 r11822  
    331331      END DO 
    332332      ! 
    333       IF( ln_vvl_ztilde .OR. ln_vvl_layer .AND. ll_do_bclinic ) THEN   ! z_tilde or layer coordinate ! 
    334          !                                                            ! ------baroclinic part------ ! 
     333      IF( (ln_vvl_ztilde .OR. ln_vvl_layer) .AND. ll_do_bclinic ) THEN   ! z_tilde or layer coordinate ! 
     334         !                                                               ! ------baroclinic part------ ! 
    335335         ! I - initialization 
    336336         ! ================== 
     
    989989      REWIND( numnam_ref )              ! Namelist nam_vvl in reference namelist :  
    990990      READ  ( numnam_ref, nam_vvl, IOSTAT = ios, ERR = 901) 
    991 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nam_vvl in reference namelist', lwp ) 
     991901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nam_vvl in reference namelist' ) 
    992992      REWIND( numnam_cfg )              ! Namelist nam_vvl in configuration namelist : Parameters of the run 
    993993      READ  ( numnam_cfg, nam_vvl, IOSTAT = ios, ERR = 902 ) 
    994 902   IF( ios >  0 ) CALL ctl_nam ( ios , 'nam_vvl in configuration namelist', lwp ) 
     994902   IF( ios >  0 ) CALL ctl_nam ( ios , 'nam_vvl in configuration namelist' ) 
    995995      IF(lwm) WRITE ( numond, nam_vvl ) 
    996996      ! 
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DOM/domwri.F90

    r10425 r11822  
    162162      CALL iom_rstput( 0, 0, inum, 'isfdraft', zprt, ktype = jp_r8 )   !    ! nb of ocean T-points 
    163163      !                                                         ! vertical mesh 
    164       CALL iom_rstput( 0, 0, inum, 'e3t_0', e3t_0, ktype = jp_r8  )    !    ! scale factors 
    165       CALL iom_rstput( 0, 0, inum, 'e3u_0', e3u_0, ktype = jp_r8  ) 
    166       CALL iom_rstput( 0, 0, inum, 'e3v_0', e3v_0, ktype = jp_r8  ) 
    167       CALL iom_rstput( 0, 0, inum, 'e3w_0', e3w_0, ktype = jp_r8  ) 
     164      CALL iom_rstput( 0, 0, inum, 'e3t_1d', e3t_1d, ktype = jp_r8  )    !    ! scale factors 
     165      CALL iom_rstput( 0, 0, inum, 'e3w_1d', e3w_1d, ktype = jp_r8  ) 
     166       
     167      CALL iom_rstput( 0, 0, inum, 'e3t_0' , e3t_0 , ktype = jp_r8  ) 
     168      CALL iom_rstput( 0, 0, inum, 'e3u_0' , e3u_0 , ktype = jp_r8  ) 
     169      CALL iom_rstput( 0, 0, inum, 'e3v_0' , e3v_0 , ktype = jp_r8  ) 
     170      CALL iom_rstput( 0, 0, inum, 'e3f_0' , e3f_0 , ktype = jp_r8  ) 
     171      CALL iom_rstput( 0, 0, inum, 'e3w_0' , e3w_0 , ktype = jp_r8  ) 
     172      CALL iom_rstput( 0, 0, inum, 'e3uw_0', e3uw_0, ktype = jp_r8  ) 
     173      CALL iom_rstput( 0, 0, inum, 'e3vw_0', e3vw_0, ktype = jp_r8  ) 
    168174      ! 
    169175      CALL iom_rstput( 0, 0, inum, 'gdept_1d' , gdept_1d , ktype = jp_r8 )  ! stretched system 
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DOM/dtatsd.F90

    r10213 r11822  
    6767      REWIND( numnam_ref )              ! Namelist namtsd in reference namelist :  
    6868      READ  ( numnam_ref, namtsd, IOSTAT = ios, ERR = 901) 
    69 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtsd in reference namelist', lwp ) 
     69901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtsd in reference namelist' ) 
    7070      REWIND( numnam_cfg )              ! Namelist namtsd in configuration namelist : Parameters of the run 
    7171      READ  ( numnam_cfg, namtsd, IOSTAT = ios, ERR = 902 ) 
    72 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtsd in configuration namelist', lwp ) 
     72902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtsd in configuration namelist' ) 
    7373      IF(lwm) WRITE ( numond, namtsd ) 
    7474 
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DOM/iscplhsb.F90

    r10978 r11822  
    187187!      CALL lbc_sum(pts_flx (:,:,:,jp_sal),'T',1.) 
    188188!      CALL lbc_sum(pts_flx (:,:,:,jp_tem),'T',1.) 
    189       STOP ' iscpl_cons:   please modify this module !' 
     189      CALL ctl_stop( 'STOP', ' iscpl_cons:   please modify this MODULE !' ) 
    190190!!gm end 
    191191      ! if no neighbour wet cell in case of 2close a cell", need to find the nearest wet point  
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DOM/iscplini.F90

    r10425 r11822  
    6464      REWIND( numnam_ref )              ! Namelist namsbc_iscpl in reference namelist : Ice sheet coupling 
    6565      READ  ( numnam_ref, namsbc_iscpl, IOSTAT = ios, ERR = 901) 
    66 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_iscpl in reference namelist', lwp ) 
     66901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc_iscpl in reference namelist' ) 
    6767      REWIND( numnam_cfg )              ! Namelist namsbc_iscpl in configuration namelist : Ice Sheet coupling 
    6868      READ  ( numnam_cfg, namsbc_iscpl, IOSTAT = ios, ERR = 902 ) 
    69 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_iscpl in configuration namelist', lwp ) 
     69902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namsbc_iscpl in configuration namelist' ) 
    7070      IF(lwm) WRITE ( numond, namsbc_iscpl ) 
    7171      ! 
Note: See TracChangeset for help on using the changeset viewer.