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 5726 for branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/trcini.F90 – NEMO

Ignore:
Timestamp:
2015-09-10T18:48:32+02:00 (9 years ago)
Author:
jpalmier
Message:

JPALM -- 10-09-2015 -- add MEDUSA in the branch ; adapted TOP_SRC to MEDUSA ; remove some svn keywords in the branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/trcini.F90

    • Property svn:keywords deleted
    r5407 r5726  
    88   !!            2.0  ! 2005-10 (C. Ethe, G. Madec) revised architecture 
    99   !!            4.0  ! 2011-01 (A. R. Porter, STFC Daresbury) dynamical allocation 
     10   !!             -   ! 2014-06 (A. Yool, J. Palmieri) adding MEDUSA-2 
    1011   !!---------------------------------------------------------------------- 
    1112#if defined key_top 
     
    2425   USE trcini_c14b     ! C14 bomb initialisation 
    2526   USE trcini_my_trc   ! MY_TRC   initialisation 
     27   USE trcini_medusa   ! MEDUSA   initialisation 
     28   USE trcini_idtra    ! idealize tracer initialisation 
    2629   USE trcdta          ! initialisation from files 
    2730   USE daymod          ! calendar manager 
     
    4245   !!---------------------------------------------------------------------- 
    4346   !! NEMO/TOP 4.0 , NEMO Consortium (2011) 
    44    !! $Id$  
     47   !! $Id$ 
    4548   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    4649   !!---------------------------------------------------------------------- 
     
    7780         &   CALL ctl_warn(' Coupling with passive tracers and used of diurnal cycle. & 
    7881         & Computation of a daily mean shortwave for some biogeochemical models) ') 
    79  
     82          !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
     83          !!!!! CHECK For MEDUSA 
     84          !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
    8085      IF( nn_cla == 1 )   & 
    8186         &  CALL ctl_stop( ' Cross Land Advection not yet implemented with passive tracer ; nn_cla must be 0' ) 
     
    101106      IF( lk_c14b    )       CALL trc_ini_c14b         ! C14 bomb  tracer 
    102107      IF( lk_my_trc  )       CALL trc_ini_my_trc       ! MY_TRC  tracers 
     108      IF( lk_medusa  )       CALL trc_ini_medusa       ! MEDUSA  tracers 
     109      IF( lk_idtra   )       CALL trc_ini_idtra        ! Idealize tracers 
    103110 
    104111      CALL trc_ice_ini                                 ! Tracers in sea ice 
     112 
     113# if defined key_debug_medusa 
     114         IF (lwp) write (numout,*) '------------------------------' 
     115         IF (lwp) write (numout,*) 'Jpalm - debug' 
     116         IF (lwp) write (numout,*) ' in trc_init' 
     117         IF (lwp) write (numout,*) ' sms init OK' 
     118         IF (lwp) write (numout,*) ' next: open tracer.stat' 
     119         IF (lwp) write (numout,*) ' ' 
     120         CALL flush(numout) 
     121# endif 
    105122 
    106123      IF( lwp ) THEN 
     
    110127      ENDIF 
    111128 
    112       IF( ln_trcdta )      CALL trc_dta_init(jptra) 
    113  
     129# if defined key_debug_medusa 
     130         IF (lwp) write (numout,*) '------------------------------' 
     131         IF (lwp) write (numout,*) 'Jpalm - debug' 
     132         IF (lwp) write (numout,*) ' in trc_init' 
     133         IF (lwp) write (numout,*) 'open tracer.stat -- OK' 
     134         IF (lwp) write (numout,*) ' ' 
     135         CALL flush(numout) 
     136# endif 
     137 
     138 
     139      IF( ln_trcdta ) THEN 
     140#if defined key_medusa 
     141         IF(lwp) WRITE(numout,*) 'AXY: calling trc_dta_init' 
     142         IF(lwp) CALL flush(numout) 
     143#endif 
     144         CALL trc_dta_init(jptra) 
     145      ENDIF 
    114146 
    115147      IF( ln_rsttr ) THEN 
    116148        ! 
     149#if defined key_medusa 
     150        IF(lwp) WRITE(numout,*) 'AXY: calling trc_rst_read' 
     151        IF(lwp) CALL flush(numout) 
     152#endif 
    117153        CALL trc_rst_read              ! restart from a file 
    118154        ! 
     
    121157        IF( ln_trcdta .AND. nb_trcdta > 0 ) THEN  ! Initialisation of tracer from a file that may also be used for damping 
    122158            ! 
     159#if defined key_medusa 
     160            IF(lwp) WRITE(numout,*) 'AXY: calling wrk_alloc' 
     161            IF(lwp) CALL flush(numout) 
     162#endif 
    123163            CALL wrk_alloc( jpi, jpj, jpk, ztrcdta )    ! Memory allocation 
    124164            ! 
     165#if defined key_medusa 
     166            IF(lwp) WRITE(numout,*) 'AXY: calling trc_dta' 
     167            IF(lwp) CALL flush(numout) 
     168#endif 
    125169            DO jn = 1, jptra 
    126170               IF( ln_trc_ini(jn) ) THEN      ! update passive tracers arrays with input data read from file 
     
    129173                  ztrcdta(:,:,:) = sf_trcdta(jl)%fnow(:,:,:) 
    130174                  trn(:,:,:,jn) = ztrcdta(:,:,:) * tmask(:,:,:)   
    131                   IF( .NOT.ln_trcdmp .AND. .NOT.ln_trcdmp_clo ) THEN      !== deallocate data structure   ==! 
     175                  IF( .NOT.ln_trcdmp .AND. .NOT. ln_trcdmp_clo ) THEN      !== deallocate data structure   ==! 
    132176                     !                                                    (data used only for initialisation) 
    133177                     IF(lwp) WRITE(numout,*) 'trc_dta: deallocate data arrays as they are only used to initialize the run' 
     
    138182               ENDIF 
    139183            ENDDO 
     184#if defined key_medusa 
     185            IF(lwp) WRITE(numout,*) 'AXY: calling wrk_dealloc' 
     186            IF(lwp) CALL flush(numout) 
     187#endif 
    140188            CALL wrk_dealloc( jpi, jpj, jpk, ztrcdta ) 
    141189        ENDIF 
    142190        ! 
     191# if defined key_debug_medusa 
     192         IF (lwp) write (numout,*) '------------------------------' 
     193         IF (lwp) write (numout,*) 'Jpalm - debug' 
     194         IF (lwp) write (numout,*) ' in trc_init' 
     195         IF (lwp) write (numout,*) ' before trb = trn' 
     196         IF (lwp) write (numout,*) ' ' 
     197         CALL flush(numout) 
     198# endif 
     199        ! 
    143200        trb(:,:,:,:) = trn(:,:,:,:) 
     201        !  
     202# if defined key_debug_medusa 
     203         IF (lwp) write (numout,*) '------------------------------' 
     204         IF (lwp) write (numout,*) 'Jpalm - debug' 
     205         IF (lwp) write (numout,*) ' in trc_init' 
     206         IF (lwp) write (numout,*) ' trb = trn -- OK' 
     207         IF (lwp) write (numout,*) ' ' 
     208         CALL flush(numout) 
     209# endif 
    144210        !  
    145211      ENDIF 
     
    150216      IF( ln_zps .AND. .NOT. lk_c1d .AND.       ln_isfcav )   & 
    151217        &    CALL zps_hde_isf( nit000, jptra, trn, pgtu=gtru, pgtv=gtrv, pgtui=gtrui, pgtvi=gtrvi )       ! tracers at the bottom ocean level 
    152  
    153  
     218      ! 
     219# if defined key_debug_medusa 
     220         IF (lwp) write (numout,*) '------------------------------' 
     221         IF (lwp) write (numout,*) 'Jpalm - debug' 
     222         IF (lwp) write (numout,*) ' in trc_init' 
     223         IF (lwp) write (numout,*) ' partial step -- OK' 
     224         IF (lwp) write (numout,*) ' ' 
     225         CALL flush(numout) 
     226# endif 
    154227      ! 
    155228      IF( nn_dttrc /= 1 )        CALL trc_sub_ini      ! Initialize variables for substepping passive tracers 
    156229      ! 
    157  
     230# if defined key_debug_medusa 
     231         IF (lwp) write (numout,*) '------------------------------' 
     232         IF (lwp) write (numout,*) 'Jpalm - debug' 
     233         IF (lwp) write (numout,*) ' in trc_init' 
     234         IF (lwp) write (numout,*) ' before initiate tracer contents' 
     235         IF (lwp) write (numout,*) ' ' 
     236         CALL flush(numout) 
     237# endif 
     238      ! 
    158239      trai(:) = 0._wp                                                   ! initial content of all tracers 
    159240      DO jn = 1, jptra 
     
    168249         WRITE(numout,*) '          *** Total inital content of all tracers ' 
    169250         WRITE(numout,*) 
     251# if defined key_debug_medusa 
     252         CALL flush(numout) 
     253# endif 
     254         ! 
     255# if defined key_debug_medusa 
     256         WRITE(numout,*) ' litle check :  ', ctrcnm(1) 
     257         CALL flush(numout) 
     258# endif 
    170259         DO jn = 1, jptra 
    171260            WRITE(numout,9000) jn, TRIM( ctrcnm(jn) ), trai(jn) 
     
    180269         CALL prt_ctl_trc( tab4d=trn, mask=tmask, clinfo=ctrcnm ) 
    181270      ENDIF 
     271 
     272      IF(lwp) WRITE(numout,*) 
     273      IF(lwp) WRITE(numout,*) 'trc_init : passive tracer set up completed' 
     274      IF(lwp) WRITE(numout,*) '~~~~~~~' 
     275      IF(lwp) CALL flush(numout) 
     276 
    1822779000  FORMAT(' tracer nb : ',i2,'      name :',a10,'      initial content :',e18.10) 
    183278      ! 
Note: See TracChangeset for help on using the changeset viewer.