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

Ignore:
Timestamp:
2017-12-15T18:00:09+01:00 (6 years ago)
Author:
gm
Message:

dev_merge_2017: bug correction in zdfdrg + ISOMIP cfg

Location:
branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/ISOMIP
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/ISOMIP/EXP00/namelist_cfg

    r9019 r9089  
    22!! NEMO/OPA  : ISOMIP Configuration namelist to overwrite reference dynamical namelist 
    33!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     4!----------------------------------------------------------------------- 
     5&namusr_def    !   ISOMIP user defined namelist   
     6!----------------------------------------------------------------------- 
     7   ln_zps      = .true.    ! z-partial-step coordinate 
     8   rn_e1deg    =   0.3     !  zonal      grid-spacing (degrees) 
     9   rn_e2deg    =   0.1     !  meridional grid-spacing (degrees) 
     10   rn_e3       =   30.     !  vertical resolution 
     11/ 
    412!----------------------------------------------------------------------- 
    513&namrun        !   parameters of the run 
     
    1018   nn_leapy    =       0   !  Leap year calendar (1) or not (0) 
    1119   ln_clobber  = .true.    !  clobber (overwrite) an existing file 
     20   nn_istate   =       0   !  output the initial state (1) or not (0) 
    1221   nn_stock    =  99999999 !  frequency of creation of a restart file (modulo referenced to 1) 
    1322   nn_write    =      48   !  frequency of write in the output file   (modulo referenced to nn_it000) 
     
    1928   ln_read_cfg = .false.   !  (=T) read the domain configuration file 
    2029      !                    !  (=F) user defined configuration  ==>>>  see usrdef(_...) modules 
     30      cn_domcfg = "ISOMIP_zps_domcfg"         ! domain configuration filename 
     31      ! 
     32   ln_write_cfg= .false.   !  (=T) create the domain configuration file 
     33      cn_domcfg_out = "ISOMIP_cfg_out"    ! filename of the created file 
    2134/ 
    2235!----------------------------------------------------------------------- 
     
    4457&namsbc        !   Surface Boundary Condition (surface module) 
    4558!----------------------------------------------------------------------- 
    46    nn_fsbc     = 6         !  frequency of surface boundary condition computation 
     59   nn_fsbc     = 1         !  frequency of surface boundary condition computation 
    4760   !                       !     (also = the frequency of sea-ice model call) 
    4861   ln_blk      = .false.    !  Bulk formulation                          (T => fill namsbc_blk ) 
     
    168181&namdrg            !   top/bottom drag coefficient                      (default: NO selection) 
    169182!----------------------------------------------------------------------- 
    170    ln_non_lin = .true.    !  non-linear  drag: Cd = Cd0 |U| 
     183   ln_NONE    = .false.    !  free-slip       : Cd = 0                  (F => fill namdrg_bot 
     184   ln_lin     = .false.    !      linear  drag: Cd = Cd0 Uc0                   &   namdrg_top) 
     185   ln_non_lin = .true.     !  non-linear  drag: Cd = Cd0 |U| 
     186   ln_loglayer= .false.    !  logarithmic drag: Cd = vkarmn/log(z/z0) |U| 
     187   ! 
     188   ln_drgimp  = .false.    !  implicit top/bottom friction flag 
    171189/ 
    172190!----------------------------------------------------------------------- 
  • branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/ISOMIP/MY_SRC/usrdef_hgr.F90

    r9019 r9089  
    1717   USE par_oce         ! ocean space and time domain 
    1818   USE phycst          ! physical constants 
    19    USE usrdef_nam, ONLY: rn_lam0, rn_phi0, rn_e1deg, rn_e2deg   ! horizontal resolution in meters 
     19   USE usrdef_nam, ONLY: rn_e1deg, rn_e2deg   ! horizontal resolution in meters 
    2020   ! 
    2121   USE in_out_manager  ! I/O manager 
    2222   USE lib_mpp         ! MPP library 
    23    USE timing          ! Timing 
    2423    
    2524   IMPLICIT NONE 
     
    2928 
    3029   !!---------------------------------------------------------------------- 
    31    !! NEMO/OPA 4.0 , NEMO Consortium (2016) 
     30   !! NEMO/OPA 4.0 , NEMO Consortium (2017) 
    3231   !! $Id$  
    3332   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     
    6665      !!------------------------------------------------------------------------------- 
    6766      ! 
    68       IF( nn_timing == 1 )  CALL timing_start('usr_def_hgr') 
    69       ! 
    7067      IF(lwp) THEN 
    7168         WRITE(numout,*) 
     
    7976      !                       !==  grid point position  ==!   (in degrees) 
    8077      DO jj = 1, jpj 
     78         DO ji = 1, jpi             ! longitude   (west coast at lon=0°) 
     79            plamt(ji,jj) = rn_e1deg * (  - 0.5 + REAL( ji-1 + nimpp-1 , wp )  )   
     80            plamu(ji,jj) = rn_e1deg * (          REAL( ji-1 + nimpp-1 , wp )  ) 
     81            plamv(ji,jj) = plamt(ji,jj) 
     82            plamf(ji,jj) = plamu(ji,jj) 
     83            !                       ! latitude   (south coast at lat= 81°) 
     84            pphit(ji,jj) = rn_e2deg * (  - 0.5 + REAL( jj-1 + njmpp-1 , wp )  ) - 80._wp 
     85            pphiu(ji,jj) = pphit(ji,jj) 
     86            pphiv(ji,jj) = rn_e2deg * (          REAL( jj-1 + njmpp-1 , wp )  ) - 80_wp 
     87            pphif(ji,jj) = pphiv(ji,jj) 
     88         END DO 
     89      END DO 
     90      ! 
     91      !                       !==  Horizontal scale factors  ==!   (in meters) 
     92      DO jj = 1, jpj 
    8193         DO ji = 1, jpi 
    82             zti = FLOAT( ji - 1 + nimpp - 1 )         ;   ztj = FLOAT( jj - 1 + njmpp - 1 ) 
    83             zui = FLOAT( ji - 1 + nimpp - 1 ) + 0.5   ;   zuj = FLOAT( jj - 1 + njmpp - 1 ) 
    84             zvi = FLOAT( ji - 1 + nimpp - 1 )         ;   zvj = FLOAT( jj - 1 + njmpp - 1 ) + 0.5 
    85             zfi = FLOAT( ji - 1 + nimpp - 1 ) + 0.5   ;   zfj = FLOAT( jj - 1 + njmpp - 1 ) + 0.5 
    86      ! Longitude 
    87             plamt(ji,jj) = rn_lam0 + rn_e1deg * zti 
    88             plamu(ji,jj) = rn_lam0 + rn_e1deg * zui 
    89             plamv(ji,jj) = rn_lam0 + rn_e1deg * zvi 
    90             plamf(ji,jj) = rn_lam0 + rn_e1deg * zfi 
    91      ! Latitude 
    92             pphit(ji,jj) = rn_phi0 + rn_e2deg * ztj 
    93             pphiu(ji,jj) = rn_phi0 + rn_e2deg * zuj 
    94             pphiv(ji,jj) = rn_phi0 + rn_e2deg * zvj 
    95             pphif(ji,jj) = rn_phi0 + rn_e2deg * zfj 
    96              
    97      !                       !==  Horizontal scale factors  ==!   (in meters) 
    98      ! e1 
     94            !                       ! e1   (zonal) 
    9995            pe1t(ji,jj) = ra * rad * COS( rad * pphit(ji,jj) ) * rn_e1deg 
    10096            pe1u(ji,jj) = ra * rad * COS( rad * pphiu(ji,jj) ) * rn_e1deg 
    10197            pe1v(ji,jj) = ra * rad * COS( rad * pphiv(ji,jj) ) * rn_e1deg 
    10298            pe1f(ji,jj) = ra * rad * COS( rad * pphif(ji,jj) ) * rn_e1deg 
    103      ! e2 
     99            !                       ! e2   (meridional) 
    104100            pe2t(ji,jj) = ra * rad * rn_e2deg 
    105101            pe2u(ji,jj) = ra * rad * rn_e2deg 
     
    109105      END DO 
    110106      !                             ! NO reduction of grid size in some straits  
    111       ke1e2u_v = 0                  !    ==>> u_ & v_surfaces will be computed in dom_ghr routine 
     107      ke1e2u_v    = 0               !    ==>> u_ & v_surfaces will be computed in dom_ghr routine 
    112108      pe1e2u(:,:) = 0._wp           !    CAUTION: set to zero to avoid error with some compilers that 
    113109      pe1e2v(:,:) = 0._wp           !             require an initialization of INTENT(out) arguments 
     
    116112      !                       !==  Coriolis parameter  ==! 
    117113      kff = 0                       ! Coriolis parameter calculated on the sphere 
    118       ! 
    119       ! 
    120114      pff_f(:,:) = 0._wp            ! CAUTION: set to zero to avoid error with some compilers that 
    121115      pff_t(:,:) = 0._wp            !             require an initialization of INTENT(out) arguments 
    122       ! 
    123       IF( nn_timing == 1 )  CALL timing_stop('usr_def_hgr') 
    124116      ! 
    125117   END SUBROUTINE usr_def_hgr 
  • branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/ISOMIP/MY_SRC/usrdef_nam.F90

    r7715 r9089  
    2929   PUBLIC   usr_def_nam   ! called by nemogcm.F90 
    3030 
    31    !                              !!* namusr_def namelist *!! 
    32    REAL(wp), PUBLIC ::   rn_lam0, rn_phi0      
    33    REAL(wp), PUBLIC ::   rn_e1deg, rn_e2deg, rn_e3 
    34    REAL(wp), PUBLIC ::   rbathy 
     31   !                                         !!* namusr_def namelist *!! 
     32   REAL(wp), PUBLIC ::   rn_e1deg, rn_e2deg   !: horizontal resolution   [degrees] 
     33   REAL(wp), PUBLIC ::   rn_e3                !: vertical   resolution         [m] 
     34    
     35   REAL(wp), PARAMETER, PUBLIC ::   rbathy = 900._wp   !: depth of the seafloor   [m] 
    3536 
    3637   !!---------------------------------------------------------------------- 
    37    !! NEMO/OPA 4.0 , NEMO Consortium (2016) 
     38   !! NEMO/OPA 4.0 , NEMO Consortium (2017) 
    3839   !! $Id$  
    3940   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     
    6162      INTEGER ::   ios, ii   ! Local integer 
    6263      !! 
    63       NAMELIST/namusr_def/ ln_zco, ln_zps, ln_sco, rn_lam0, rn_phi0, rn_e1deg, rn_e2deg, rn_e3 
     64      NAMELIST/namusr_def/ ln_zco, ln_zps, ln_sco, rn_e1deg, rn_e2deg, rn_e3 
    6465      !!---------------------------------------------------------------------- 
    6566      ! 
     
    7475      cd_cfg = 'ISOMIP'           ! name & resolution (not used) 
    7576      kk_cfg = INT( rn_e3 ) 
    76       rbathy = 900.0   ! sea bed depth 
    7777      ! 
    78       ! Global Domain size:  ISOMIP domain is  200 km x 3 grid-points x 2000 m 
    79       kpi = INT( 15.0  / rn_e1deg ) + 1 
    80       kpj = INT( 10.0  / rn_e2deg ) + 1 
    81       kpk = INT( rbathy / rn_e3 ) + 1 
     78      ! Global Domain size:  ISOMIP domain is  15° x 10° x 900 m 
     79      kpi = INT(  15.0  / rn_e1deg ) + 2     ! add 2 for t-point in the east  & west  coasts 
     80      kpj = INT(  10.0  / rn_e2deg ) + 2     !     -        -           north & south   - 
     81      kpk = INT( rbathy / rn_e3    ) + 1     ! add 1 for t-point in the seafloor 
    8282      ! 
    8383      !                             ! control print 
    84       WRITE(ldtxt(ii),*) '   '                                                                          ;   ii = ii + 1 
    85       WRITE(ldtxt(ii),*) 'usr_def_nam  : read the user defined namelist (namusr_def) in namelist_cfg'   ;   ii = ii + 1 
    86       WRITE(ldtxt(ii),*) '~~~~~~~~~~~ '                                                                 ;   ii = ii + 1 
    87       WRITE(ldtxt(ii),*) '   Namelist namusr_def : ISOMIP test case'                                  ;   ii = ii + 1 
    88       WRITE(ldtxt(ii),*) '      type of vertical coordinate : '                                         ;   ii = ii + 1 
    89       WRITE(ldtxt(ii),*) '         z-coordinate flag                     ln_zco = ', ln_zco             ;   ii = ii + 1 
    90       WRITE(ldtxt(ii),*) '         z-partial-step coordinate flag        ln_zps = ', ln_zps             ;   ii = ii + 1 
    91       WRITE(ldtxt(ii),*) '         s-coordinate flag                     ln_sco = ', ln_sco             ;   ii = ii + 1 
    92       WRITE(ldtxt(ii),*) '         resulting global domain size :        jpiglo = ', kpi                ;   ii = ii + 1 
    93       WRITE(ldtxt(ii),*) '                                               jpjglo = ', kpj                ;   ii = ii + 1 
    94       WRITE(ldtxt(ii),*) '                                               jpkglo = ', kpk                ;   ii = ii + 1 
     84      WRITE(ldtxt(ii),*) '   '                                                                              ;   ii = ii + 1 
     85      WRITE(ldtxt(ii),*) 'usr_def_nam  : read the user defined namelist (namusr_def) in namelist_cfg'       ;   ii = ii + 1 
     86      WRITE(ldtxt(ii),*) '~~~~~~~~~~~ '                                                                     ;   ii = ii + 1 
     87      WRITE(ldtxt(ii),*) '   Namelist namusr_def : ISOMIP test case'                                        ;   ii = ii + 1 
     88      WRITE(ldtxt(ii),*) '      type of vertical coordinate : '                                             ;   ii = ii + 1 
     89      WRITE(ldtxt(ii),*) '         z-coordinate flag                     ln_zco   = ', ln_zco               ;   ii = ii + 1 
     90      WRITE(ldtxt(ii),*) '         z-partial-step coordinate flag        ln_zps   = ', ln_zps               ;   ii = ii + 1 
     91      WRITE(ldtxt(ii),*) '         s-coordinate flag                     ln_sco   = ', ln_sco               ;   ii = ii + 1 
     92      WRITE(ldtxt(ii),*) '      resolution'                                                                 ;   ii = ii + 1 
     93      WRITE(ldtxt(ii),*) '         zonal      resolution                 rn_e1deg = ', rn_e1deg, ' degrees' ;   ii = ii + 1 
     94      WRITE(ldtxt(ii),*) '         meridional resolution                 rn_e1deg = ', rn_e1deg, ' degrees' ;   ii = ii + 1 
     95      WRITE(ldtxt(ii),*) '         vertical   resolution                 rn_e3    = ', rn_e3   , ' meters'  ;   ii = ii + 1 
     96      WRITE(ldtxt(ii),*) '      ISOMIP domain = 15° x 10° x 900 m'                                          ;   ii = ii + 1 
     97      WRITE(ldtxt(ii),*) '         resulting global domain size :        jpiglo   = ', kpi                  ;   ii = ii + 1 
     98      WRITE(ldtxt(ii),*) '                                               jpjglo   = ', kpj                  ;   ii = ii + 1 
     99      WRITE(ldtxt(ii),*) '                                               jpkglo   = ', kpk                  ;   ii = ii + 1 
     100      ! 
    95101      ! 
    96102      !                             ! Set the lateral boundary condition of the global domain 
     
    99105      WRITE(ldtxt(ii),*) '   '                                                                          ;   ii = ii + 1 
    100106      WRITE(ldtxt(ii),*) '   Lateral boundary condition of the global domain'                           ;   ii = ii + 1 
    101       WRITE(ldtxt(ii),*) '      ISOMIP : closed basin                    jperio = ', kperio             ;   ii = ii + 1 
     107      WRITE(ldtxt(ii),*) '      ISOMIP : closed basin                    jperio   = ', kperio             ;   ii = ii + 1 
    102108      ! 
    103109   END SUBROUTINE usr_def_nam 
  • branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/ISOMIP/MY_SRC/usrdef_zgr.F90

    r8018 r9089  
    171171         END DO          
    172172         !                                   ! bottom scale factors and depth at  U-, V-, UW and VW-points 
    173          DO jk = 1,jpkm1                     ! Computed as the minimum of neighbooring scale factors 
     173         pe3u (:,:,:) = pe3t(:,:,:) 
     174         pe3uw(:,:,:) = pe3w(:,:,:) 
     175         DO jk = 1, jpk                      ! Computed as the minimum of neighbooring scale factors 
    174176            DO jj = 1, jpjm1 
    175                DO ji = 1, fs_jpim1   ! vector opt. 
    176                   pe3u (ji,jj,jk) = MIN( pe3t(ji,jj,jk), pe3t(ji+1,jj,jk) ) 
     177               DO ji = 1, jpi 
    177178                  pe3v (ji,jj,jk) = MIN( pe3t(ji,jj,jk), pe3t(ji,jj+1,jk) ) 
    178                   pe3uw(ji,jj,jk) = MIN( pe3w(ji,jj,jk), pe3w(ji+1,jj,jk) ) 
    179179                  pe3vw(ji,jj,jk) = MIN( pe3w(ji,jj,jk), pe3w(ji,jj+1,jk) ) 
     180                  pe3f (ji,jj,jk) = pe3v(ji,jj,jk) 
    180181               END DO 
    181182            END DO 
    182             DO jj = 1, jpjm1 
    183                DO ji = 1, fs_jpim1   ! vector opt. 
    184                  pe3f(ji,jj,jk) = MIN( pe3v(ji,jj,jk), pe3v(ji+1,jj,jk) ) 
    185                END DO 
    186             END DO 
    187          END DO 
    188          CALL lbc_lnk( pe3u , 'U', 1._wp )   ;   CALL lbc_lnk( pe3uw, 'U', 1._wp )   ! lateral boundary conditions 
     183         END DO 
    189184         CALL lbc_lnk( pe3v , 'V', 1._wp )   ;   CALL lbc_lnk( pe3vw, 'V', 1._wp ) 
    190185         CALL lbc_lnk( pe3f , 'F', 1._wp ) 
    191          DO jk = 1,jpkm1 
     186         DO jk = 1, jpk 
    192187            ! set to z-scale factor if zero (i.e. along closed boundaries) because of lbclnk 
    193188            WHERE( pe3u (:,:,jk) == 0._wp )   pe3u (:,:,jk) = pe3t_1d(jk) 
    194189            WHERE( pe3v (:,:,jk) == 0._wp )   pe3v (:,:,jk) = pe3t_1d(jk) 
     190            WHERE( pe3f (:,:,jk) == 0._wp )   pe3f (:,:,jk) = pe3t_1d(jk) 
    195191            WHERE( pe3uw(:,:,jk) == 0._wp )   pe3uw(:,:,jk) = pe3w_1d(jk) 
    196192            WHERE( pe3vw(:,:,jk) == 0._wp )   pe3vw(:,:,jk) = pe3w_1d(jk) 
Note: See TracChangeset for help on using the changeset viewer.