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 2392 for branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/DTA/dtatem.F90 – NEMO

Ignore:
Timestamp:
2010-11-15T22:20:05+01:00 (13 years ago)
Author:
gm
Message:

v3.3beta: Cross Land Advection (ticket #127) full rewriting + MPP bug corrections

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/DTA/dtatem.F90

    r2287 r2392  
    44   !! Ocean data  :  read ocean temperature data from monthly atlas data 
    55   !!===================================================================== 
     6   !! History :  OPA  ! 1991-03  ()  Original code 
     7   !!             -   ! 1992-07  (M. Imbard) 
     8   !!            8.0  ! 1999-10  (M.A. Foujols, M. Imbard)  NetCDF FORMAT  
     9   !!   NEMO     1.0  ! 2002-06  (G. Madec)  F90: Free form and module  
     10   !!            3.3  ! 2010-10  (C. Bricaud, S. Masson)  use of fldread 
     11   !!---------------------------------------------------------------------- 
    612#if defined key_dtatem   ||   defined key_esopa 
    713   !!---------------------------------------------------------------------- 
     
    1016   !!   dta_tem      : read ocean temperature data 
    1117   !!---l------------------------------------------------------------------- 
    12    !! * Modules used 
    1318   USE oce             ! ocean dynamics and tracers 
    1419   USE dom_oce         ! ocean space and time domain 
     
    2227   PRIVATE 
    2328 
    24    !! * Routine accessibility 
    25    PUBLIC dta_tem   ! called by step.F90 and inidta.F90 
    26  
    27    !! * Shared module variables 
     29   PUBLIC   dta_tem    ! called by step.F90 and inidta.F90 
     30 
    2831   LOGICAL , PUBLIC, PARAMETER ::   lk_dtatem = .TRUE.   !: temperature data flag 
    2932   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::  t_dta    !: temperature data at given time-step 
    3033 
    31    !! * Module variables 
    3234   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_tem      ! structure of input SST (file informations, fields read) 
    3335 
     
    3739   !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
    3840   !! $Id$  
    39    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    40    !!---------------------------------------------------------------------- 
    41  
     41   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     42   !!---------------------------------------------------------------------- 
    4243CONTAINS 
    43  
    44    !!---------------------------------------------------------------------- 
    45    !!   Default case                                            NetCDF file 
    46    !!---------------------------------------------------------------------- 
    4744 
    4845   SUBROUTINE dta_tem( kt ) 
     
    6259      !! 
    6360      !! ** Action  :   define t_dta array at time-step kt 
    64       !! 
    65       !! History : 
    66       !!        !  91-03  ()  Original code 
    67       !!        !  92-07  (M. Imbard) 
    68       !!        !  99-10  (M.A. Foujols, M. Imbard)  NetCDF FORMAT  
    69       !!   8.5  !  02-09  (G. Madec)  F90: Free form and module 
    7061      !!---------------------------------------------------------------------- 
    7162      INTEGER, INTENT( in ) ::   kt     ! ocean time-step 
    72  
     63      ! 
    7364      INTEGER ::   ji, jj, jk, jl, jkk            ! dummy loop indicies 
    7465      INTEGER ::   ik, ierror                     ! temporary integers 
     
    8576      TYPE(FLD_N)              ::   sn_tem 
    8677      LOGICAL , SAVE           ::   linit_tem = .FALSE. 
     78      !! 
     79      NAMELIST/namdta_tem/   cn_dir, sn_tem 
    8780      !!---------------------------------------------------------------------- 
    88       NAMELIST/namdta_tem/cn_dir,sn_tem 
    8981  
    9082      ! 1. Initialization  
     
    9688         cn_dir = './'       ! directory in which the model is executed 
    9789         ! ... default values (NB: frequency positive => hours, negative => months) 
    98          !            !   file    ! frequency !  variable  ! time intep !  clim   ! 'yearly' or ! weights  ! rotation  ! 
    99          !            !   name    !  (hours)  !   name     !   (T/F)    !  (T/F)  !  'monthly'  ! filename ! pairs      ! 
    100          sn_tem = FLD_N( 'temperature',  -1.  ,  'votemper',  .false.   , .true.  ,  'yearly'  , ''       , ''         ) 
    101  
    102          REWIND( numnam )         ! ... read in namlist namdta_tem  
     90         !            !   file    ! frequency ! variable  ! time intep !  clim   ! 'yearly' or ! weights  ! rotation ! 
     91         !            !   name    !  (hours)  !  name     !   (T/F)    !  (T/F)  !  'monthly'  ! filename ! pairs    ! 
     92         sn_tem = FLD_N( 'temperature',  -1.  , 'votemper',  .false.   , .true.  ,  'yearly'   , ''       , ''       ) 
     93 
     94         REWIND( numnam )          ! read in namlist namdta_tem  
    10395         READ( numnam, namdta_tem )  
    10496 
     
    120112         IF( sn_tem%ln_tint )   ALLOCATE( sf_tem(1)%fdta(jpi,jpj,jpk,2) ) 
    121113#endif 
    122          ! fill sf_tem with sn_tem and control print 
     114         !                         ! fill sf_tem with sn_tem and control print 
    123115         CALL fld_fill( sf_tem, (/ sn_tem /), cn_dir, 'dta_tem', 'Temperature data', 'namdta_tem' ) 
    124116         linit_tem = .TRUE. 
     
    138130          
    139131#if defined key_tradmp 
    140       IF( cp_cfg == "orca" .AND. jp_cfg == 2 ) THEN 
    141          !                                        ! ======================= 
    142          !                                        !  ORCA_R2 configuration 
    143          !                                        ! =======================  
     132      IF( cp_cfg == "orca" .AND. jp_cfg == 2 ) THEN      !  ORCA_R2 configuration 
     133         ! 
    144134         ij0 = 101   ;   ij1 = 109 
    145135         ii0 = 141   ;   ii1 = 155 
     
    151141            END DO 
    152142         END DO 
    153              
    154          IF( n_cla == 1 ) THEN  
     143         ! 
     144         IF( nn_cla == 1 ) THEN  
    155145            !                                         ! New temperature profile at Gibraltar 
    156146            il0 = 138   ;   il1 = 138 
     
    175165               END DO 
    176166            END DO 
    177             ! 
    178167         ELSE 
    179168            !                                         ! Reduced temperature at Red Sea 
     
    251240                     t_dta(ji,jj,ik) = (1.-zl) * t_dta(ji,jj,ik) + zl * t_dta(ji,jj,ik-1) 
    252241                  ENDIF 
    253             END DO 
    254          END DO 
    255       ENDIF 
    256  
    257    ENDIF 
    258           
    259    IF( lwp .AND. kt == nit000 ) THEN 
    260       WRITE(numout,*) ' temperature Levitus ' 
    261       WRITE(numout,*) 
    262       WRITE(numout,*)'  level = 1' 
    263       CALL prihre( t_dta(:,:,1    ), jpi, jpj, 1, jpi, 20, 1, jpj, 20, 1., numout ) 
    264       WRITE(numout,*)'  level = ', jpk/2 
    265       CALL prihre( t_dta(:,:,jpk/2), jpi, jpj, 1, jpi, 20, 1, jpj, 20, 1., numout ) 
    266       WRITE(numout,*)'  level = ', jpkm1 
    267       CALL prihre( t_dta(:,:,jpkm1), jpi, jpj, 1, jpi, 20, 1, jpj, 20, 1., numout ) 
    268    ENDIF 
    269  
     242               END DO 
     243            END DO 
     244         ENDIF 
     245         ! 
     246      ENDIF 
     247          
     248      IF( lwp .AND. kt == nit000 ) THEN 
     249         WRITE(numout,*) ' temperature Levitus ' 
     250         WRITE(numout,*) 
     251         WRITE(numout,*)'  level = 1' 
     252         CALL prihre( t_dta(:,:,1    ), jpi, jpj, 1, jpi, 20, 1, jpj, 20, 1., numout ) 
     253         WRITE(numout,*)'  level = ', jpk/2 
     254         CALL prihre( t_dta(:,:,jpk/2), jpi, jpj, 1, jpi, 20, 1, jpj, 20, 1., numout ) 
     255         WRITE(numout,*)'  level = ', jpkm1 
     256         CALL prihre( t_dta(:,:,jpkm1), jpi, jpj, 1, jpi, 20, 1, jpj, 20, 1., numout ) 
     257      ENDIF 
     258      ! 
    270259   END SUBROUTINE dta_tem 
    271260 
Note: See TracChangeset for help on using the changeset viewer.