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 593 for trunk/NEMO/OPA_SRC/istate.F90 – NEMO

Ignore:
Timestamp:
2007-02-09T10:40:34+01:00 (17 years ago)
Author:
opalod
Message:

nemo_v2_update_001 : CT : - add non linear free surface (variable volume) with new cpp key key_vvl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/istate.F90

    r558 r593  
    3939   USE zpshde          ! partial step: hor. derivative (zps_hde routine) 
    4040   USE eosbn2          ! equation of state            (eos bn2 routine) 
     41   USE domvvl          ! varying vertical mesh 
     42   USE dynspg_oce      ! pressure gradient schemes 
     43   USE dynspg_flt      ! pressure gradient schemes 
     44   USE dynspg_exp      ! pressure gradient schemes 
     45   USE dynspg_ts       ! pressure gradient schemes 
    4146    
    4247   IMPLICIT NONE 
     
    8388         !                                       ! Initialization of ocean to zero 
    8489         !     before fields       !       now fields           
    85          ;   ub   (:,:,:) = 0.e0   ;   un   (:,:,:) = 0.e0    
    86          ;   vb   (:,:,:) = 0.e0   ;   vn   (:,:,:) = 0.e0     
    87          ;   rotb (:,:,:) = 0.e0   ;   rotn (:,:,:) = 0.e0   
    88          ;   hdivb(:,:,:) = 0.e0   ;   hdivn(:,:,:) = 0.e0   
     90         ;   ub   (:,:,:) = 0.e0   ;   un   (:,:,:) = 0.e0   ; sshb(:,:) = 0.e0 
     91         ;   vb   (:,:,:) = 0.e0   ;   vn   (:,:,:) = 0.e0   ; sshn(:,:) = 0.e0 
     92         ;   rotb (:,:,:) = 0.e0   ;   rotn (:,:,:) = 0.e0 
     93         ;   hdivb(:,:,:) = 0.e0   ;   hdivn(:,:,:) = 0.e0 
    8994         ! 
    9095         IF( cp_cfg == 'eel' ) THEN 
     
    126131      ENDIF 
    127132 
     133      IF( lk_vvl ) THEN 
     134         ! read free surface arrays in restart file 
     135         IF( ln_rstart ) THEN 
     136            IF( lk_dynspg_flt )   CALL flt_rst( nit000, 'READ' )      ! read or initialize the following fields 
     137            !                                                         ! gcx, gcxb, sshb, sshn 
     138            IF( lk_dynspg_ts  )   CALL ts_rst ( nit000, 'READ' )      ! read or initialize the following fields 
     139            !                                                         ! sshb, sshn, sshb_b, sshn_b, un_b, vn_b 
     140            IF( lk_dynspg_exp )   CALL exp_rst( nit000, 'READ' )      ! read or initialize the following fields 
     141            !                                                         ! sshb, sshn 
     142         ENDIF 
     143         ! 
     144         IF( .NOT. lk_dynspg_flt ) sshbb(:,:) = sshb(:,:) 
     145         ! 
     146         CALL dom_vvl               ! ssh init and vertical grid update 
     147 
     148         CALL eos_init              ! usefull to get the equation state type neos parameter 
     149 
     150         CALL bn2( tb, sb, rn2 )    ! before Brunt Vaissala frequency 
     151 
     152         IF( .NOT. ln_rstart ) CALL wzv( nit000 )  
     153 
     154      ENDIF 
    128155 
    129156      !                                       ! Vertical velocity 
    130157      !                                       ! ----------------- 
    131       CALL wzv( nit000 )                         ! from horizontal divergence 
     158 
     159      IF( .NOT. lk_vvl )    CALL wzv( nit000 )                         ! from horizontal divergence 
    132160      ! 
    133161   END SUBROUTINE istate_init 
     
    213241      INTEGER  ::   ijloc 
    214242      REAL(wp) ::   zh1, zh2, zslope, zcst, zfcor   ! temporary scalars 
    215       REAL(wp) ::   zt1  = 12._wp,               &  ! surface temperature value (EEL R5) 
    216          &          zt2  =  2._wp,               &  ! bottom  temperature value (EEL R5) 
    217          &          zsal = 35.5_wp,              &  ! constant salinity (EEL R2, R5 and R6) 
     243      REAL(wp) ::   zt1  = 15._wp,               &  ! surface temperature value (EEL R5) 
     244         &          zt2  =  5._wp,               &  ! bottom  temperature value (EEL R5) 
     245         &          zsal = 35.0_wp,              &  ! constant salinity (EEL R2, R5 and R6) 
    218246         &          zueel = 0.1_wp                  ! constant uniform zonal velocity (EEL R5) 
    219247# if ! defined key_dynspg_rl 
     
    240268 
    241269            DO jk = 1, jpk 
    242                tn(:,:,jk) = ( zslope * fsdept(:,:,jk) + zcst ) * tmask(:,:,jk) 
     270               tn(:,:,jk) = ( zt2 + zt1 * exp( - fsdept(:,:,jk) / 1000 ) ) * tmask(:,:,jk) 
    243271               tb(:,:,jk) = tn(:,:,jk) 
    244272            END DO 
     
    291319            sshn(:,:) = sshb(:,:)                   ! set now ssh to the before value 
    292320 
    293             IF( nn_rstssh /= 1 ) THEN   
    294                nn_rstssh = 1                           ! hand-made initilization of ssh  
    295                CALL ctl_warn( 'istate_eel: force nn_rstssh = 1' ) 
     321            IF( nn_rstssh /= 0 ) THEN   
     322               nn_rstssh = 0                           ! hand-made initilization of ssh  
     323               CALL ctl_warn( 'istate_eel: force nn_rstssh = 0' ) 
    296324            ENDIF 
    297325 
Note: See TracChangeset for help on using the changeset viewer.