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 11573 for NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp/src/OCE/DOM – NEMO

Ignore:
Timestamp:
2019-09-19T11:18:03+02:00 (5 years ago)
Author:
jchanut
Message:

#2222, merged with trunk

Location:
NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp/src/OCE/DOM
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp/src/OCE/DOM/domain.F90

    r10425 r11573  
    101101         CASE( 0 )   ;   WRITE(numout,*) '         (i.e. closed)' 
    102102         CASE( 1 )   ;   WRITE(numout,*) '         (i.e. cyclic east-west)' 
    103          CASE( 2 )   ;   WRITE(numout,*) '         (i.e. equatorial symmetric)' 
     103         CASE( 2 )   ;   WRITE(numout,*) '         (i.e. cyclic north-south)' 
    104104         CASE( 3 )   ;   WRITE(numout,*) '         (i.e. north fold with T-point pivot)' 
    105105         CASE( 4 )   ;   WRITE(numout,*) '         (i.e. cyclic east-west and north fold with T-point pivot)' 
     
    308308      REWIND( numnam_ref )              ! Namelist namrun in reference namelist : Parameters of the run 
    309309      READ  ( numnam_ref, namrun, IOSTAT = ios, ERR = 901) 
    310 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namrun in reference namelist', lwp ) 
     310901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namrun in reference namelist' ) 
    311311      REWIND( numnam_cfg )              ! Namelist namrun in configuration namelist : Parameters of the run 
    312312      READ  ( numnam_cfg, namrun, IOSTAT = ios, ERR = 902 ) 
    313 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namrun in configuration namelist', lwp ) 
     313902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namrun in configuration namelist' ) 
    314314      IF(lwm) WRITE ( numond, namrun ) 
    315315      ! 
     
    336336            WRITE(numout,*) '      frequency of restart file       nn_stock        = ', nn_stock 
    337337         ENDIF 
     338#if ! defined key_iomput 
    338339         WRITE(numout,*) '      frequency of output file        nn_write        = ', nn_write 
     340#endif 
    339341         WRITE(numout,*) '      mask land points                ln_mskland      = ', ln_mskland 
    340342         WRITE(numout,*) '      additional CF standard metadata ln_cfmeta       = ', ln_cfmeta 
     
    358360      nleapy = nn_leapy 
    359361      ninist = nn_istate 
    360       nstock = nn_stock 
    361       nstocklist = nn_stocklist 
    362       nwrite = nn_write 
    363362      neuler = nn_euler 
    364363      IF( neuler == 1 .AND. .NOT. ln_rstart ) THEN 
     
    369368      ENDIF 
    370369      !                             ! control of output frequency 
    371       IF( nstock == 0 .OR. nstock > nitend ) THEN 
    372          WRITE(ctmp1,*) 'nstock = ', nstock, ' it is forced to ', nitend 
     370      IF( .NOT. ln_rst_list ) THEN     ! we use nn_stock 
     371         IF( nn_stock == -1 )   CALL ctl_warn( 'nn_stock = -1 --> no restart will be done' ) 
     372         IF( nn_stock == 0 .OR. nn_stock > nitend ) THEN 
     373            WRITE(ctmp1,*) 'nn_stock = ', nn_stock, ' it is forced to ', nitend 
     374            CALL ctl_warn( ctmp1 ) 
     375            nn_stock = nitend 
     376         ENDIF 
     377      ENDIF 
     378#if ! defined key_iomput 
     379      IF( nn_write == -1 )   CALL ctl_warn( 'nn_write = -1 --> no output files will be done' ) 
     380      IF ( nn_write == 0 ) THEN 
     381         WRITE(ctmp1,*) 'nn_write = ', nn_write, ' it is forced to ', nitend 
    373382         CALL ctl_warn( ctmp1 ) 
    374          nstock = nitend 
    375       ENDIF 
    376       IF ( nwrite == 0 ) THEN 
    377          WRITE(ctmp1,*) 'nwrite = ', nwrite, ' it is forced to ', nitend 
    378          CALL ctl_warn( ctmp1 ) 
    379          nwrite = nitend 
    380       ENDIF 
     383         nn_write = nitend 
     384      ENDIF 
     385#endif 
    381386 
    382387#if defined key_agrif 
     
    401406      REWIND( numnam_ref )              ! Namelist namdom in reference namelist : space & time domain (bathymetry, mesh, timestep) 
    402407      READ  ( numnam_ref, namdom, IOSTAT = ios, ERR = 903) 
    403 903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdom in reference namelist', lwp ) 
     408903   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdom in reference namelist' ) 
    404409      REWIND( numnam_cfg )              ! Namelist namdom in configuration namelist : space & time domain (bathymetry, mesh, timestep) 
    405410      READ  ( numnam_cfg, namdom, IOSTAT = ios, ERR = 904 ) 
    406 904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdom in configuration namelist', lwp ) 
     411904   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdom in configuration namelist' ) 
    407412      IF(lwm) WRITE( numond, namdom ) 
    408413      ! 
     
    433438      REWIND( numnam_ref )              ! Namelist namnc4 in reference namelist : NETCDF 
    434439      READ  ( numnam_ref, namnc4, IOSTAT = ios, ERR = 907) 
    435 907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namnc4 in reference namelist', lwp ) 
     440907   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namnc4 in reference namelist' ) 
    436441      REWIND( numnam_cfg )              ! Namelist namnc4 in configuration namelist : NETCDF 
    437442      READ  ( numnam_cfg, namnc4, IOSTAT = ios, ERR = 908 ) 
    438 908   IF( ios >  0 )   CALL ctl_nam ( ios , 'namnc4 in configuration namelist', lwp ) 
     443908   IF( ios >  0 )   CALL ctl_nam ( ios , 'namnc4 in configuration namelist' ) 
    439444      IF(lwm) WRITE( numond, namnc4 ) 
    440445 
     
    511516 
    512517 
    513    SUBROUTINE domain_cfg( ldtxt, cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
     518   SUBROUTINE domain_cfg( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 
    514519      !!---------------------------------------------------------------------- 
    515520      !!                     ***  ROUTINE dom_nam  *** 
     
    519524      !! ** Method  :   read the cn_domcfg NetCDF file 
    520525      !!---------------------------------------------------------------------- 
    521       CHARACTER(len=*), DIMENSION(:), INTENT(out) ::   ldtxt           ! stored print information 
    522526      CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name 
    523527      INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution 
     
    525529      INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.  
    526530      ! 
    527       INTEGER ::   inum, ii   ! local integer 
     531      INTEGER ::   inum   ! local integer 
    528532      REAL(wp) ::   zorca_res                     ! local scalars 
    529       REAL(wp) ::   ziglo, zjglo, zkglo, zperio   !   -      - 
    530       !!---------------------------------------------------------------------- 
    531       ! 
    532       ii = 1 
    533       WRITE(ldtxt(ii),*) '           '                                                    ;   ii = ii+1 
    534       WRITE(ldtxt(ii),*) 'domain_cfg : domain size read in ', TRIM( cn_domcfg ), ' file'  ;   ii = ii+1 
    535       WRITE(ldtxt(ii),*) '~~~~~~~~~~ '                                                    ;   ii = ii+1 
     533      REAL(wp) ::   zperio                        !   -      - 
     534      INTEGER, DIMENSION(4) ::   idvar, idimsz    ! size   of dimensions 
     535      !!---------------------------------------------------------------------- 
     536      ! 
     537      IF(lwp) THEN 
     538         WRITE(numout,*) '           ' 
     539         WRITE(numout,*) 'domain_cfg : domain size read in ', TRIM( cn_domcfg ), ' file' 
     540         WRITE(numout,*) '~~~~~~~~~~ ' 
     541      ENDIF 
    536542      ! 
    537543      CALL iom_open( cn_domcfg, inum ) 
     
    544550         CALL iom_get( inum, 'ORCA_index', zorca_res )   ;   kk_cfg = NINT( zorca_res ) 
    545551         ! 
    546          WRITE(ldtxt(ii),*) '   .'                                                     ;   ii = ii+1 
    547          WRITE(ldtxt(ii),*) '   ==>>>   ORCA configuration '                           ;   ii = ii+1 
    548          WRITE(ldtxt(ii),*) '   .'                                                     ;   ii = ii+1 
     552         IF(lwp) THEN 
     553            WRITE(numout,*) '   .' 
     554            WRITE(numout,*) '   ==>>>   ORCA configuration ' 
     555            WRITE(numout,*) '   .' 
     556         ENDIF 
    549557         ! 
    550558      ELSE                                !- cd_cfg & k_cfg are not used 
     
    559567         ! 
    560568      ENDIF 
    561       ! 
    562       CALL iom_get( inum, 'jpiglo', ziglo  )   ;   kpi = NINT( ziglo ) 
    563       CALL iom_get( inum, 'jpjglo', zjglo  )   ;   kpj = NINT( zjglo ) 
    564       CALL iom_get( inum, 'jpkglo', zkglo  )   ;   kpk = NINT( zkglo ) 
     569       ! 
     570      idvar = iom_varid( inum, 'e3t_0', kdimsz = idimsz )   ! use e3t_0, that must exist, to get jp(ijk)glo 
     571      kpi = idimsz(1) 
     572      kpj = idimsz(2) 
     573      kpk = idimsz(3) 
    565574      CALL iom_get( inum, 'jperio', zperio )   ;   kperio = NINT( zperio ) 
    566575      CALL iom_close( inum ) 
    567576      ! 
    568       WRITE(ldtxt(ii),*) '      cn_cfg = ', TRIM(cd_cfg), '   nn_cfg = ', kk_cfg             ;   ii = ii+1 
    569       WRITE(ldtxt(ii),*) '      jpiglo = ', kpi                                              ;   ii = ii+1 
    570       WRITE(ldtxt(ii),*) '      jpjglo = ', kpj                                              ;   ii = ii+1 
    571       WRITE(ldtxt(ii),*) '      jpkglo = ', kpk                                              ;   ii = ii+1 
    572       WRITE(ldtxt(ii),*) '      type of global domain lateral boundary   jperio = ', kperio  ;   ii = ii+1 
     577      IF(lwp) THEN 
     578         WRITE(numout,*) '      cn_cfg = ', TRIM(cd_cfg), '   nn_cfg = ', kk_cfg 
     579         WRITE(numout,*) '      jpiglo = ', kpi 
     580         WRITE(numout,*) '      jpjglo = ', kpj 
     581         WRITE(numout,*) '      jpkglo = ', kpk 
     582         WRITE(numout,*) '      type of global domain lateral boundary   jperio = ', kperio 
     583      ENDIF 
    573584      !         
    574585   END SUBROUTINE domain_cfg 
  • NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp/src/OCE/DOM/dommsk.F90

    r11233 r11573  
    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       
     
    151150      REWIND( numnam_ref )              ! Namelist nambdy in reference namelist :Unstructured open boundaries 
    152151      READ  ( numnam_ref, nambdy, IOSTAT = ios, ERR = 903) 
    153 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' ) 
    154153      REWIND( numnam_cfg )              ! Namelist nambdy in configuration namelist :Unstructured open boundaries 
    155154      READ  ( numnam_cfg, nambdy, IOSTAT = ios, ERR = 904 ) 
    156 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' ) 
    157156      ! ------------------------ 
    158157      IF ( ln_bdy .AND. ln_mask_file ) THEN 
  • NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp/src/OCE/DOM/domvvl.F90

    r10425 r11573  
    327327      END DO 
    328328      ! 
    329       IF( ln_vvl_ztilde .OR. ln_vvl_layer .AND. ll_do_bclinic ) THEN   ! z_tilde or layer coordinate ! 
    330          !                                                            ! ------baroclinic part------ ! 
     329      IF( (ln_vvl_ztilde .OR. ln_vvl_layer) .AND. ll_do_bclinic ) THEN   ! z_tilde or layer coordinate ! 
     330         !                                                               ! ------baroclinic part------ ! 
    331331         ! I - initialization 
    332332         ! ================== 
     
    993993      REWIND( numnam_ref )              ! Namelist nam_vvl in reference namelist :  
    994994      READ  ( numnam_ref, nam_vvl, IOSTAT = ios, ERR = 901) 
    995 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nam_vvl in reference namelist', lwp ) 
     995901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'nam_vvl in reference namelist' ) 
    996996      REWIND( numnam_cfg )              ! Namelist nam_vvl in configuration namelist : Parameters of the run 
    997997      READ  ( numnam_cfg, nam_vvl, IOSTAT = ios, ERR = 902 ) 
    998 902   IF( ios >  0 ) CALL ctl_nam ( ios , 'nam_vvl in configuration namelist', lwp ) 
     998902   IF( ios >  0 ) CALL ctl_nam ( ios , 'nam_vvl in configuration namelist' ) 
    999999      IF(lwm) WRITE ( numond, nam_vvl ) 
    10001000      ! 
  • NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp/src/OCE/DOM/domwri.F90

    r10425 r11573  
    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_r11233_AGRIF-05_jchanut_vert_coord_interp/src/OCE/DOM/dtatsd.F90

    r10213 r11573  
    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_r11233_AGRIF-05_jchanut_vert_coord_interp/src/OCE/DOM/iscplhsb.F90

    r10425 r11573  
    186186!      CALL lbc_sum(pts_flx (:,:,:,jp_sal),'T',1.) 
    187187!      CALL lbc_sum(pts_flx (:,:,:,jp_tem),'T',1.) 
    188       STOP ' iscpl_cons:   please modify this module !' 
     188      CALL ctl_stop( 'STOP', ' iscpl_cons:   please modify this MODULE !' ) 
    189189!!gm end 
    190190      ! if no neighbour wet cell in case of 2close a cell", need to find the nearest wet point  
  • NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp/src/OCE/DOM/iscplini.F90

    r10425 r11573  
    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.