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 2915 for branches/2011/dev_r2787_NOCS_NEPTUNE/NEMOGCM/NEMO/OPA_SRC/DYN/dynnept.F90 – NEMO

Ignore:
Timestamp:
2011-10-13T17:25:00+02:00 (13 years ago)
Author:
acc
Message:

Branch NOCS_NEPTUNE final style changes and documention. See ticket #843

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2011/dev_r2787_NOCS_NEPTUNE/NEMOGCM/NEMO/OPA_SRC/DYN/dynnept.F90

    r2825 r2915  
    1515   !!                                               to zero added in shallow depths added 
    1616   !!---------------------------------------------------------------------- 
     17   !! dynnept_alloc        : 
    1718   !! dyn_nept_init        : 
    18    !! div_cur_nept_init    : 
    19    !! dyn_cor_topo         : 
    20    !! dyn_topo_neptunevel  : 
    21    !! smooth_topo2         : 
     19   !! dyn_nept_div_cur_init: 
     20   !! dyn_nept_cor         : 
     21   !! dyn_nept_vel         : 
     22   !! dyn_nept_smooth_vel  : 
    2223   !!---------------------------------------------------------------------- 
    2324   USE oce              ! ocean dynamics and tracers 
     
    3536   !! * Routine accessibility 
    3637   PUBLIC dyn_nept_init      ! routine called by nemogcm.F90 
    37    PUBLIC dyn_cor_topo       ! routine called by step.F90 
    38    !! dynnept_alloc()     is called only by dyn_nept_init, within this module 
    39    !! div_cur_nept_init   is called only by dyn_nept_init, within this module 
    40    !! dyn_topo_neptunevel is called only by dyn_cor_topo,  within this module 
     38   PUBLIC dyn_nept_cor       ! routine called by step.F90 
     39   !! dynnept_alloc()         is called only by dyn_nept_init, within this module 
     40   !! dyn_nept_div_cur_init   is called only by dyn_nept_init, within this module 
     41   !! dyn_nept_vel            is called only by dyn_nept_cor,  within this module 
    4142 
    4243   !! * Shared module variables 
     
    4647 
    4748 
    48    !! * Namelist nam_dynnept variables 
    49    LOGICAL, PUBLIC  ::  ln_neptsimp    = .FALSE.  ! yes/no simplified neptune 
    50  
    51    LOGICAL          ::  ln_smoothtopo  = .FALSE.  ! yes/no smooth zunep, zvnep 
    52    REAL(wp)         ::  rn_tslse       =  1.2e4   ! value of lengthscale L at the equator 
    53    REAL(wp)         ::  rn_tslsp       =  3.0e3   ! value of lengthscale L at the pole 
     49   !! * Namelist namdyn_nept variables 
     50   LOGICAL, PUBLIC  ::  ln_neptsimp        = .FALSE.  ! yes/no simplified neptune 
     51 
     52   LOGICAL          ::  ln_smooth_neptvel  = .FALSE.  ! yes/no smooth zunep, zvnep 
     53   REAL(wp)         ::  rn_tslse           =  1.2e4   ! value of lengthscale L at the equator 
     54   REAL(wp)         ::  rn_tslsp           =  3.0e3   ! value of lengthscale L at the pole 
    5455!! Specify whether to ramp down the Neptune velocity in shallow 
    5556!! water, and the depth range controlling such ramping down 
    56    LOGICAL          ::  ln_neptramp    = .FALSE.  ! ramp down Neptune velocity in shallow water 
    57    REAL(wp)         ::  rn_htrmin      =  100.0   ! min. depth of transition range 
    58    REAL(wp)         ::  rn_htrmax      =  200.0   ! max. depth of transition range 
     57   LOGICAL          ::  ln_neptramp        = .FALSE.  ! ramp down Neptune velocity in shallow water 
     58   REAL(wp)         ::  rn_htrmin          =  100.0   ! min. depth of transition range 
     59   REAL(wp)         ::  rn_htrmax          =  200.0   ! max. depth of transition range 
    5960 
    6061   !! * Module variables 
     
    117118      REAL(wp) :: hramp                         ! depth over which Neptune vel. is ramped down 
    118119      !! 
    119       NAMELIST/nam_dynnept/ ln_neptsimp,      & 
    120                             ln_smoothtopo,    & 
     120      NAMELIST/namdyn_nept/ ln_neptsimp,      & 
     121                            ln_smooth_neptvel,& 
    121122             rn_tslse,        & 
    122123             rn_tslsp,        & 
     
    131132!!    WRITE(numout,*) ' start dynnept namelist' 
    132133!!    CALL FLUSH(numout) 
    133       REWIND( numnam )                  ! Read Namelist nam_dynnept:  Simplified Neptune 
    134       READ  ( numnam, nam_dynnept ) 
     134      REWIND( numnam )                  ! Read Namelist namdyn_nept:  Simplified Neptune 
     135      READ  ( numnam, namdyn_nept ) 
    135136!!    WRITE(numout,*) ' dynnept namelist done' 
    136137!!    CALL FLUSH(numout) 
     
    140141         WRITE(numout,*) 'dyn_nept_init : Simplified Neptune module enabled' 
    141142         WRITE(numout,*) '~~~~~~~~~~~~~' 
    142          WRITE(numout,*) ' -->   Reading namelist nam_dynnept parameters:' 
     143         WRITE(numout,*) ' -->   Reading namelist namdyn_nept parameters:' 
    143144         WRITE(numout,*) '       ln_neptsimp          = ', ln_neptsimp 
    144145         WRITE(numout,*) 
    145          WRITE(numout,*) '       ln_smoothtopo        = ', ln_smoothtopo 
     146         WRITE(numout,*) '       ln_smooth_neptvel    = ', ln_smooth_neptvel 
    146147         WRITE(numout,*) '       rn_tslse             = ', rn_tslse 
    147148         WRITE(numout,*) '       rn_tslsp             = ', rn_tslsp 
     
    154155      ENDIF 
    155156 
    156       IF( ln_smoothtopo ) THEN 
     157      IF( ln_smooth_neptvel ) THEN 
    157158         IF(lwp) WRITE(numout,*) ' -->   neptune velocities will be smoothed' 
    158159      ELSE 
     
    213214      END DO 
    214215 
    215       IF( ln_smoothtopo ) THEN 
    216          CALL smooth_topo2( htn, ht, .TRUE. ) 
     216      IF( ln_smooth_neptvel ) THEN 
     217         CALL dyn_nept_smooth_vel( htn, ht, .TRUE. ) 
    217218      !! overwrites ht with a smoothed version of htn 
    218219      ELSE 
     
    224225      !! Compute tsp, a stream function for the Neptune velocity, 
    225226      !! with the usual geophysical sign convention 
    226       !! Then zunep = -latitudinal derivative "-d(tsp)/dy" 
    227       !!      zvnep = longitudinal derivative " d(tsp)/dx" 
     227      !! Then zunep = -latitudinal derivative "-(1/H)*d(tsp)/dy" 
     228      !!      zvnep = longitudinal derivative " (1/H)*d(tsp)/dx" 
    228229 
    229230      tsp(:,:)    = 0.0_wp 
     
    235236 
    236237 
    237       IF( ln_smoothtopo ) THEN 
    238          CALL smooth_topo2( hu, hu_n, .TRUE. ) 
     238      IF( ln_smooth_neptvel ) THEN 
     239         CALL dyn_nept_smooth_vel( hu, hu_n, .TRUE. ) 
    239240      !! overwrites hu_n with a smoothed version of hu 
    240241      ELSE 
     
    252253 
    253254 
    254       IF( ln_smoothtopo ) THEN 
    255          CALL smooth_topo2( hv, hv_n, .TRUE. ) 
     255      IF( ln_smooth_neptvel ) THEN 
     256         CALL dyn_nept_smooth_vel( hv, hv_n, .TRUE. ) 
    256257      !! overwrites hv_n with a smoothed version of hv 
    257258      ELSE 
     
    324325      !!  Compute, once and for all, the horizontal divergence (zhdivnep) 
    325326      !!  and the curl (zmrotnep) of the Neptune velocity field (zunep, zvnep) 
    326       CALL div_cur_nept_init 
     327      CALL dyn_nept_div_cur_init 
    327328 
    328329      !! Check the ranges of the computed divergence & vorticity 
     
    353354 
    354355 
    355    SUBROUTINE div_cur_nept_init 
    356       !!---------------------------------------------------------------------- 
    357       !!             ***  ROUTINE div_cur_nept_init  *** 
     356   SUBROUTINE dyn_nept_div_cur_init 
     357      !!---------------------------------------------------------------------- 
     358      !!             ***  ROUTINE dyn_nept_div_cur_init  *** 
    358359      !! 
    359360      !! ** Purpose :   compute the horizontal divergence and the relative 
     
    394395 
    395396      IF(lwp) WRITE(numout,*) 
    396       IF(lwp) WRITE(numout,*) 'div_cur_nept_init :' 
     397      IF(lwp) WRITE(numout,*) 'dyn_nept_div_cur_init :' 
    397398      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~~~~~~' 
    398399      IF(lwp) WRITE(numout,*) 'horizontal velocity divergence and' 
     
    471472      CALL lbc_lnk( zhdivnep, 'T', 1. )   ;   CALL lbc_lnk( zmrotnep , 'F', 1. )     ! lateral boundary cond. (no sign change) 
    472473      ! 
    473    END SUBROUTINE div_cur_nept_init 
    474  
    475  
    476    SUBROUTINE dyn_cor_topo( kt ) 
    477       !!---------------------------------------------------------------------- 
    478       !!                  ***  ROUTINE dyn_cor_topo  *** 
     474   END SUBROUTINE dyn_nept_div_cur_init 
     475 
     476 
     477   SUBROUTINE dyn_nept_cor( kt ) 
     478      !!---------------------------------------------------------------------- 
     479      !!                  ***  ROUTINE dyn_nept_cor  *** 
    479480      !! 
    480481      !! ** Purpose :  Add or subtract the Neptune velocity from the now velocities 
     
    492493         ! 
    493494         IF( lastkt /= kt ) THEN          ! 1st call for this kt: subtract the Neptune velocities zunep, zvnep from un, vn 
    494             CALL dyn_topo_neptunevel( -1 )      ! -1 = subtract 
     495            CALL dyn_nept_vel( -1 )      ! -1 = subtract 
    495496            ! 
    496497         ELSE                              ! 2nd call for this kt: add the Neptune velocities zunep, zvnep to un, vn 
    497             CALL dyn_topo_neptunevel(  1 )      !  1 = add 
     498            CALL dyn_nept_vel(  1 )      !  1 = add 
    498499            ! 
    499500         ENDIF 
     
    503504      ENDIF 
    504505      ! 
    505    END SUBROUTINE dyn_cor_topo 
    506  
    507  
    508    SUBROUTINE dyn_topo_neptunevel( ksign ) 
    509       !!---------------------------------------------------------------------- 
    510       !!                  ***  ROUTINE dyn_topo_neptunevel  *** 
     506   END SUBROUTINE dyn_nept_cor 
     507 
     508 
     509   SUBROUTINE dyn_nept_vel( ksign ) 
     510      !!---------------------------------------------------------------------- 
     511      !!                  ***  ROUTINE dyn_nept_vel  *** 
    511512      !! 
    512513      !! ** Purpose :  Add or subtract the Neptune velocity from the now 
     
    525526      END DO 
    526527      ! 
    527    END SUBROUTINE dyn_topo_neptunevel 
    528  
    529  
    530    SUBROUTINE smooth_topo2( htold, htnew, option ) 
    531  
    532       !!---------------------------------------------------------------------- 
    533       !!                  ***  ROUTINE smooth_topo2  *** 
     528   END SUBROUTINE dyn_nept_vel 
     529 
     530 
     531   SUBROUTINE dyn_nept_smooth_vel( htold, htnew, option ) 
     532 
     533      !!---------------------------------------------------------------------- 
     534      !!                  ***  ROUTINE dyn_nept_smooth_vel  *** 
    534535      !! 
    535536      !! ** Purpose :  Compute smoothed topography field. 
     
    616617      DEALLOCATE( work, nb, iwork ) 
    617618 
    618    END SUBROUTINE smooth_topo2 
     619   END SUBROUTINE dyn_nept_smooth_vel 
    619620 
    620621END MODULE dynnept 
Note: See TracChangeset for help on using the changeset viewer.