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 7189 – NEMO

Changeset 7189


Ignore:
Timestamp:
2016-11-04T08:17:27+01:00 (7 years ago)
Author:
gm
Message:

#1692 - branch SIMPLIF_2_usrdef: e3.=dk[dep.] TOOLS update + domzgr style

Location:
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90

    r7188 r7189  
    216216      IF( z_cav == 0._wp ) THEN   ;   ld_isfcav = .false.   ;   ELSE   ;   ld_isfcav = .true.   ;   ENDIF 
    217217      ! 
    218       !                                   ! reference 1D-coordinate 
     218      !                                   ! 1D vertical scale factors (reference coordinate) 
    219219      CALL iom_get( inum, jpdom_unknown, 'e3t_1d'  , pe3t_1d  ) 
    220220      CALL iom_get( inum, jpdom_unknown, 'e3w_1d'  , pe3w_1d  ) 
    221       ! 
    222       IF(  iom_varid( inum, 'gdept_1d', ldstop = .FALSE. ) > 0  .AND.  & 
    223          & iom_varid( inum, 'gdepw_1d', ldstop = .FALSE. ) > 0    ) THEN 
    224          CALL ctl_warn( 'zgr_read : old definition of 1d depths and scale factors used ', &  
    225             &                      'depths at t- and w-points read in domain_cfg file') 
    226          CALL iom_get( inum, jpdom_unknown, 'gdept_1d', pdept_1d )    
    227          CALL iom_get( inum, jpdom_unknown, 'gdepw_1d', pdepw_1d ) 
    228       ELSE  
    229          CALL e3_to_depth( pe3t_1d, pe3w_1d, pdept_1d, pdepw_1d ) 
    230          IF(lwp) THEN                        ! control print 
    231             WRITE(numout,*) 
    232             WRITE(numout,*) '              Reference 1D z-coordinate depth and scale factors:' 
    233             WRITE(numout, "(9x,' level  gdept_1d  gdepw_1d  e3t_1d   e3w_1d  ')" ) 
    234             WRITE(numout, "(10x, i4, 4f9.2)" ) ( jk, pdept_1d(jk), pdepw_1d(jk), pe3t_1d(jk), pe3w_1d(jk), jk = 1, jpk ) 
    235          ENDIF 
    236       ENDIF 
    237221      ! 
    238222      !                                   ! 3D vertical scale factors 
     
    245229      CALL iom_get( inum, jpdom_data, 'e3vw_0' , pe3vw , lrowattr=ln_use_jattr ) 
    246230      ! 
    247       !                                   ! 3D depths 
    248       IF(  iom_varid( inum, 'gdept_0', ldstop = .FALSE. ) > 0  .AND.  & 
    249          & iom_varid( inum, 'gdepw_0', ldstop = .FALSE. ) > 0    ) THEN 
     231      !                                   ! 1D & 3D depths 
     232      ! 
     233      !                                         ! old depth definition (obsolescent feature) 
     234      IF(  iom_varid( inum, 'gdept_1d', ldstop = .FALSE. ) > 0  .AND.  & 
     235         & iom_varid( inum, 'gdepw_1d', ldstop = .FALSE. ) > 0  .AND.  & 
     236         & iom_varid( inum, 'gdept_0' , ldstop = .FALSE. ) > 0  .AND.  & 
     237         & iom_varid( inum, 'gdepw_0' , ldstop = .FALSE. ) > 0    ) THEN 
    250238         CALL ctl_warn( 'zgr_read : old definition of depths and scale factors used ', &  
    251239            &                      'depths at t- and w-points read in domain_cfg file') 
    252          CALL iom_get( inum, jpdom_data, 'gdept_0' , pdept , lrowattr=ln_use_jattr ) 
    253          CALL iom_get( inum, jpdom_data, 'gdepw_0' , pdepw , lrowattr=ln_use_jattr ) 
    254       ELSE 
    255          CALL e3_to_depth( pe3t, pe3w, pdept, pdepw ) 
     240         CALL iom_get( inum, jpdom_unknown, 'gdept_1d', pdept_1d )    
     241         CALL iom_get( inum, jpdom_unknown, 'gdepw_1d', pdepw_1d ) 
     242         CALL iom_get( inum, jpdom_data   , 'gdept_0' , pdept , lrowattr=ln_use_jattr ) 
     243         CALL iom_get( inum, jpdom_data   , 'gdepw_0' , pdepw , lrowattr=ln_use_jattr ) 
     244         ! 
     245      ELSE                                      ! depths computed from e3. scale factors 
     246         ! 
     247         CALL e3_to_depth( pe3t_1d, pe3w_1d, pdept_1d, pdepw_1d )    ! 1D reference depth 
     248         IF(lwp) THEN 
     249            WRITE(numout,*) 
     250            WRITE(numout,*) '              Reference 1D z-coordinate depth and scale factors:' 
     251            WRITE(numout, "(9x,' level  gdept_1d  gdepw_1d  e3t_1d   e3w_1d  ')" ) 
     252            WRITE(numout, "(10x, i4, 4f9.2)" ) ( jk, pdept_1d(jk), pdepw_1d(jk), pe3t_1d(jk), pe3w_1d(jk), jk = 1, jpk ) 
     253         ENDIF 
     254         !                                       
     255         CALL e3_to_depth( pe3t   , pe3w   , pdept   , pdepw    )    ! 3D depths 
     256         ! 
    256257      ENDIF 
    257258      ! 
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/TOOLS/DOMAINcfg/namelist_cfg

    r6951 r7189  
    1414&namcfg        !   parameters of the configuration 
    1515!----------------------------------------------------------------------- 
    16    cp_cfg      =  "orca"               !  name of the configuration 
    17    jp_cfg      =       2               !  resolution of the configuration 
    18    jpidta      =     182               !  1st lateral dimension ( >= jpi ) 
    19    jpjdta      =     149               !  2nd    "         "    ( >= jpj ) 
    20    jpkdta      =      31               !  number of levels      ( >= jpk ) 
    21    jpiglo      =     182               !  1st dimension of global domain --> i =jpidta 
    22    jpjglo      =     149               !  2nd    -                  -    --> j  =jpjdta 
    23    jpizoom     =       1               !  left bottom (i,j) indices of the zoom 
    24    jpjzoom     =       1               !  in data domain indices 
    25    jperio      =       4               !  lateral cond. type (between 0 and 6) 
     16   ! 
     17   ln_e2_dep   = .true.    ! =T : e3=dk[depth] in discret sens.  
     18   !                       !      ===>>> will become the only possibility in v4.0 
     19   !                       ! =F : e3 analytical derivative of depth function 
     20   !                       !      only there for backward compatibility test with v3.6 
     21   !                       !       
     22   cp_cfg      =  "orca"   !  name of the configuration 
     23   jp_cfg      =       2   !  resolution of the configuration 
     24   jpidta      =     182   !  1st lateral dimension ( >= jpi ) 
     25   jpjdta      =     149   !  2nd    "         "    ( >= jpj ) 
     26   jpkdta      =      31   !  number of levels      ( >= jpk ) 
     27   jpiglo      =     182   !  1st dimension of global domain --> i =jpidta 
     28   jpjglo      =     149   !  2nd    -                  -    --> j  =jpjdta 
     29   jpizoom     =       1   !  left bottom (i,j) indices of the zoom 
     30   jpjzoom     =       1   !  in data domain indices 
     31   jperio      =       4   !  lateral cond. type (between 0 and 6) 
    2632/ 
    2733!----------------------------------------------------------------------- 
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/TOOLS/DOMAINcfg/namelist_ref

    r6951 r7189  
    7373&namcfg        !   parameters of the configuration 
    7474!----------------------------------------------------------------------- 
     75   ! 
     76   ln_e2_dep   = .true.    ! =T : e3=dk[depth] in discret sens.  
     77   !                       !      ===>>> will become the only possibility in v4.0 
     78   !                       ! =F : e3 analytical derivative of depth function 
     79   !                       !      only there for backward compatibility test with v3.6 
     80   ! 
    7581   cp_cfg      = "default" !  name of the configuration 
    7682   cp_cfz      = "no zoom" !  name of the zoom of configuration 
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/TOOLS/DOMAINcfg/src/domain.f90

    r6976 r7189  
    451451      CALL iom_rstput( 0, 0, inum, 'ff_t' , ff_t , ktype = jp_r8 ) 
    452452      ! 
    453       !                             !==  vertical mesh - 3D mask ==! 
     453      !                             !==  vertical mesh ==! 
    454454      !                                                      
    455       CALL iom_rstput( 0, 0, inum, 'gdept_1d', gdept_1d, ktype = jp_r8 )   !  reference 1D-coordinate 
    456       CALL iom_rstput( 0, 0, inum, 'gdepw_1d', gdepw_1d, ktype = jp_r8 ) 
    457       CALL iom_rstput( 0, 0, inum, 'e3t_1d'  , e3t_1d  , ktype = jp_r8 ) 
     455      CALL iom_rstput( 0, 0, inum, 'e3t_1d'  , e3t_1d  , ktype = jp_r8 )   !  reference 1D-coordinate 
    458456      CALL iom_rstput( 0, 0, inum, 'e3w_1d'  , e3w_1d  , ktype = jp_r8 ) 
    459       !                                                      
    460       CALL iom_rstput( 0, 0, inum, 'gdept_0' , gdept_0 , ktype = jp_r8 )   !  depth (t- & w-points) 
    461       CALL iom_rstput( 0, 0, inum, 'gdepw_0' , gdepw_0 , ktype = jp_r8 ) 
     457      ! 
     458      IF(.NOT.ln_e2_dep ) THEN                                             !  depth (t- & w-points) 
     459         CALL iom_rstput( 0, 0, inum, 'gdept_1d', gdept_1d, ktype = jp_r8 )   ! required only with   
     460         CALL iom_rstput( 0, 0, inum, 'gdepw_1d', gdepw_1d, ktype = jp_r8 )   ! the old e3. definition 
     461         CALL iom_rstput( 0, 0, inum, 'gdept_0' , gdept_0 , ktype = jp_r8 ) 
     462         CALL iom_rstput( 0, 0, inum, 'gdepw_0' , gdepw_0 , ktype = jp_r8 ) 
     463      ENDIF 
    462464      ! 
    463465      CALL iom_rstput( 0, 0, inum, 'e3t_0'   , e3t_0   , ktype = jp_r8 )   !  vertical scale factors (e 
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/TOOLS/DOMAINcfg/src/domzgr.f90

    r7107 r7189  
    314314      ENDIF 
    315315 
    316       IF ( ln_isfcav ) THEN 
    317 ! need to be like this to compute the pressure gradient with ISF. If not, level beneath the ISF are not aligned (sum(e3t) /= depth) 
    318 ! define e3t_0 and e3w_0 as the differences between gdept and gdepw respectively 
     316      IF ( ln_isfcav .OR. ln_e2_dep ) THEN      ! e3. = dk[gdep]    
     317         ! 
     318!==>>>   need to be like this to compute the pressure gradient with ISF.  
     319!        If not, level beneath the ISF are not aligned (sum(e3t) /= depth) 
     320!        define e3t_0 and e3w_0 as the differences between gdept and gdepw respectively 
     321! 
    319322         DO jk = 1, jpkm1 
    320323            e3t_1d(jk) = gdepw_1d(jk+1)-gdepw_1d(jk)  
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/TOOLS/DOMAINcfg/src/nemogcm.f90

    r6951 r7189  
    8989      !!---------------------------------------------------------------------- 
    9090      ! 
    91  
    92  
    93  
    94  
    9591      !                            !-----------------------! 
    9692      CALL nemo_init               !==  Initialisations  ==! 
    9793      !                            !-----------------------! 
    9894 
    99  
    100  
    101  
    10295      ! check that all process are still there... If some process have an error, 
    10396      ! they will never enter in step and other processes will wait until the end of the cpu time! 
     
    115108      ENDIF 
    116109      ! 
    117  
    118  
    119  
    120  
    121  
    122  
    123  
    124110      IF( nn_timing == 1 )   CALL timing_finalize 
    125111      ! 
    126112      CALL nemo_closefile 
    127113      ! 
    128  
    129114      CALL xios_finalize                  ! end mpp communications with xios 
    130  
    131  
    132  
    133115      ! 
    134116   END SUBROUTINE nemo_gcm 
     
    149131         &             nn_isplt, nn_jsplt, nn_jctls, nn_jctle,   & 
    150132         &             nn_bench, nn_timing, nn_diacfl 
    151       NAMELIST/namcfg/ cp_cfg, cp_cfz, jp_cfg, jpidta, jpjdta, jpkdta, jpiglo, jpjglo, & 
     133      NAMELIST/namcfg/ ln_e2_dep,                                & 
     134         &             cp_cfg, cp_cfz, jp_cfg, jpidta, jpjdta, jpkdta, jpiglo, jpjglo, & 
    152135         &             jpizoom, jpjzoom, jperio, ln_use_jattr 
    153136      !!---------------------------------------------------------------------- 
     
    305288         WRITE(numout,*) '~~~~~~~ ' 
    306289         WRITE(numout,*) '   Namelist namcfg' 
     290         WRITE(numout,*) '      vertical scale factors =T: e3.=dk[depth]       ln_e2_dep = ', ln_e2_dep 
     291         WRITE(numout,*) '                             =F: old definition                 ' 
    307292         WRITE(numout,*) '      configuration name                               cp_cfg  = ', TRIM(cp_cfg) 
    308293         WRITE(numout,*) '      configuration zoom name                          cp_cfz  = ', TRIM(cp_cfz) 
     
    317302         WRITE(numout,*) '      lateral cond. type (between 0 and 6)             jperio  = ', jperio    
    318303         WRITE(numout,*) '      use file attribute if exists as i/p j-start ln_use_jattr = ', ln_use_jattr 
     304         ! 
     305         IF(.NOT.ln_e2_dep ) THEN 
     306            WRITE(numout,cform_war) 
     307            WRITE(numout,*) 
     308            WRITE(numout,*) '      ===>>>>    Obsolescent definition of e3 scale factors is used' 
     309            WRITE(numout,*) 
     310         ENDIF 
    319311      ENDIF 
    320312      !                             ! Parameter control 
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/TOOLS/DOMAINcfg/src/par_oce.f90

    r6951 r7189  
    2828   !!                   namcfg namelist parameters 
    2929   !!---------------------------------------------------------------------- 
     30   ! 
     31   LOGICAL       ::   ln_e2_dep        ! e3. definition flag 
     32   ! 
    3033   CHARACTER(lc) ::   cp_cfg           !: name of the configuration 
    3134   CHARACTER(lc) ::   cp_cfz           !: name of the zoom of configuration 
Note: See TracChangeset for help on using the changeset viewer.