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 5034 for branches/2014/dev_r4650_UKMO14.12_STAND_ALONE_OBSOPER/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90 – NEMO

Ignore:
Timestamp:
2015-01-15T14:48:42+01:00 (9 years ago)
Author:
andrewryan
Message:

merge with trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4650_UKMO14.12_STAND_ALONE_OBSOPER/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90

    r4370 r5034  
    3434   USE dtatsd          ! data temperature and salinity   (dta_tsd routine) 
    3535   USE dtauvd          ! data: U & V current             (dta_uvd routine) 
    36    USE in_out_manager  ! I/O manager 
    37    USE iom             ! I/O library 
    3836   USE zpshde          ! partial step: hor. derivative (zps_hde routine) 
    3937   USE eosbn2          ! equation of state            (eos bn2 routine) 
     
    4240   USE dynspg_flt      ! filtered free surface 
    4341   USE sol_oce         ! ocean solver variables 
     42   ! 
     43   USE in_out_manager  ! I/O manager 
     44   USE iom             ! I/O library 
    4445   USE lib_mpp         ! MPP library 
    4546   USE restart         ! restart 
     
    5657#  include "vectopt_loop_substitute.h90" 
    5758   !!---------------------------------------------------------------------- 
    58    !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
     59   !! NEMO/OPA 3.7 , NEMO Consortium (2014) 
    5960   !! $Id$ 
    6061   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     
    7374      !!---------------------------------------------------------------------- 
    7475      ! 
    75       IF( nn_timing == 1 )  CALL timing_start('istate_init') 
    76       ! 
    77  
    78       IF(lwp) WRITE(numout,*) 
     76      IF( nn_timing == 1 )   CALL timing_start('istate_init') 
     77      ! 
     78 
     79      IF(lwp) WRITE(numout,*) ' ' 
    7980      IF(lwp) WRITE(numout,*) 'istate_ini : Initialization of the dynamics and tracers' 
    8081      IF(lwp) WRITE(numout,*) '~~~~~~~~~~' 
     
    8384      IF( lk_c1d ) CALL dta_uvd_init          ! Initialization of U & V input data 
    8485 
    85       rhd  (:,:,:  ) = 0.e0 
    86       rhop (:,:,:  ) = 0.e0 
    87       rn2  (:,:,:  ) = 0.e0  
    88       tsa  (:,:,:,:) = 0.e0     
     86      rhd  (:,:,:  ) = 0._wp 
     87      rhop (:,:,:  ) = 0._wp 
     88      rn2  (:,:,:  ) = 0._wp 
     89      tsa  (:,:,:,:) = 0._wp    
     90      rab_b(:,:,:,:) = 0._wp 
     91      rab_n(:,:,:,:) = 0._wp 
    8992 
    9093      IF( ln_rstart ) THEN                    ! Restart from a file 
     
    110113         ELSEIF( cp_cfg == 'gyre' ) THEN          
    111114            CALL istate_gyre                     ! GYRE  configuration : start from pre-defined T-S fields 
     115        ELSEIF( cp_cfg == 'isomip' .OR. cp_cfg == 'isomip2') THEN 
     116            IF(lwp) WRITE(numout,*) 'Initialization of T+S for ISOMIP domain'  
     117            tsn(:,:,:,jp_tem)=-1.9*tmask(:,:,:)          ! ISOMIP configuration : start from constant T+S fields  
     118            tsn(:,:,:,jp_sal)=34.4*tmask(:,:,:) 
     119            tsb(:,:,:,:)=tsn(:,:,:,:)   
    112120         ELSE                                    ! Initial T-S, U-V fields read in files 
    113121            IF ( ln_tsd_init ) THEN              ! read 3D T and S data at nit000 
     
    129137         CALL eos( tsb, rhd, rhop, gdept_0(:,:,:) )        ! before potential and in situ densities 
    130138#if ! defined key_c1d 
    131          IF( ln_zps )   CALL zps_hde( nit000, jpts, tsb, gtsu, gtsv,  & ! zps: before hor. gradient 
    132             &                                       rhd, gru , grv  )   ! of t,s,rd at ocean bottom 
     139         IF( ln_zps )    CALL zps_hde( nit000, jpts, tsb, gtsu, gtsv,  &        ! Partial steps: before horizontal gradient 
     140            &                                      rhd, gru , grv, aru, arv, gzu, gzv, ge3ru, ge3rv,  &             ! 
     141            &                                      gtui, gtvi, grui, grvi, arui, arvi, gzui, gzvi, ge3rui, ge3rvi  )  ! of t, s, rd at the last ocean level 
    133142#endif 
    134143         !    
     
    162171      ! 
    163172      DO jk = 1, jpkm1 
    164 #if defined key_vectopt_loop 
    165          DO jj = 1, 1         !Vector opt. => forced unrolling 
    166             DO ji = 1, jpij 
    167 #else  
    168173         DO jj = 1, jpj 
    169174            DO ji = 1, jpi 
    170 #endif                   
    171175               un_b(ji,jj) = un_b(ji,jj) + fse3u_n(ji,jj,jk) * un(ji,jj,jk) * umask(ji,jj,jk) 
    172176               vn_b(ji,jj) = vn_b(ji,jj) + fse3v_n(ji,jj,jk) * vn(ji,jj,jk) * vmask(ji,jj,jk) 
     
    185189      ! 
    186190      ! 
    187       IF( nn_timing == 1 )  CALL timing_stop('istate_init') 
     191      IF( nn_timing == 1 )   CALL timing_stop('istate_init') 
    188192      ! 
    189193   END SUBROUTINE istate_init 
     194 
    190195 
    191196   SUBROUTINE istate_t_s 
     
    219224   END SUBROUTINE istate_t_s 
    220225 
     226 
    221227   SUBROUTINE istate_eel 
    222228      !!---------------------------------------------------------------------- 
     
    233239      USE divcur     ! hor. divergence & rel. vorticity      (div_cur routine) 
    234240      USE iom 
    235   
     241      ! 
    236242      INTEGER  ::   inum              ! temporary logical unit 
    237243      INTEGER  ::   ji, jj, jk        ! dummy loop indices 
     
    244250      REAL(wp), DIMENSION(jpiglo,jpjglo) ::   zssh  ! initial ssh over the global domain 
    245251      !!---------------------------------------------------------------------- 
    246  
     252      ! 
    247253      SELECT CASE ( jp_cfg )  
    248254         !                                              ! ==================== 
     
    375381      INTEGER, PARAMETER ::   ntsinit = 0   ! (0/1) (analytical/input data files) T&S initialization 
    376382      !!---------------------------------------------------------------------- 
    377  
     383      ! 
    378384      SELECT CASE ( ntsinit) 
    379  
     385      ! 
    380386      CASE ( 0 )                  ! analytical T/S profil deduced from LEVITUS 
    381387         IF(lwp) WRITE(numout,*) 
    382388         IF(lwp) WRITE(numout,*) 'istate_gyre : initial analytical T and S profil deduced from LEVITUS ' 
    383389         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~' 
    384  
     390         ! 
    385391         DO jk = 1, jpk 
    386392            DO jj = 1, jpj 
     
    407413            END DO 
    408414         END DO 
    409  
     415         ! 
    410416      CASE ( 1 )                  ! T/S data fields read in dta_tem.nc/data_sal.nc files 
    411417         IF(lwp) WRITE(numout,*) 
     
    431437         tsn(:,:,:,jp_sal) = tsn(:,:,:,jp_sal) * tmask(:,:,:)  
    432438         tsb(:,:,:,jp_sal) = tsn(:,:,:,jp_sal) 
    433  
     439         ! 
    434440      END SELECT 
    435  
     441      ! 
    436442      IF(lwp) THEN 
    437443         WRITE(numout,*) 
     
    440446         WRITE(numout, "(10x, i4, 3f10.2)" ) ( jk, gdept_1d(jk), tsn(2,2,jk,jp_tem), tsn(2,2,jk,jp_sal), jk = 1, jpk ) 
    441447      ENDIF 
    442  
     448      ! 
    443449   END SUBROUTINE istate_gyre 
     450 
    444451 
    445452   SUBROUTINE istate_uvg 
     
    457464      USE divcur          ! hor. divergence & rel. vorticity      (div_cur routine) 
    458465      USE lbclnk          ! ocean lateral boundary condition (or mpp link) 
    459  
     466      ! 
    460467      INTEGER ::   ji, jj, jk        ! dummy loop indices 
    461468      INTEGER ::   indic             ! ??? 
     
    567574   !!===================================================================== 
    568575END MODULE istate 
    569  
Note: See TracChangeset for help on using the changeset viewer.