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 7835 for branches/UKMO/CO6_shelfclimate_fabm/NEMOGCM/NEMO/TOP_SRC/trcini.F90 – NEMO

Ignore:
Timestamp:
2017-03-24T16:06:42+01:00 (7 years ago)
Author:
dford
Message:

Initial attempt to add FABM. In theory this should give equivalent results to PML gitlab commit 2e51db55.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/CO6_shelfclimate_fabm/NEMOGCM/NEMO/TOP_SRC/trcini.F90

    r7567 r7835  
    2424   USE trcini_c14b     ! C14 bomb initialisation 
    2525   USE trcini_my_trc   ! MY_TRC   initialisation 
     26   ! +++>>> FABM 
     27   USE trcsms_fabm     ! FABM initialisation 
     28   USE trcini_fabm     ! FABM initialisation 
     29   ! FABM <<<FABM 
    2630   USE trcdta          ! initialisation from files 
    2731   USE daymod          ! calendar manager 
     
    7074      IF(lwp) WRITE(numout,*) 'trc_init : initial set up of the passive tracers' 
    7175      IF(lwp) WRITE(numout,*) '~~~~~~~' 
     76      ! +++>>> FABM 
     77      ! Allow FABM to update numbers of biogeochemical tracers, diagnostics (jptra etc.) 
     78      IF( lk_fabm ) CALL nemo_fabm_init 
     79      ! FABM <<<+++ 
    7280 
    7381      CALL top_alloc()              ! allocate TOP arrays 
     
    102110      IF( lk_c14b    )       CALL trc_ini_c14b         ! C14 bomb  tracer 
    103111      IF( lk_my_trc  )       CALL trc_ini_my_trc       ! MY_TRC  tracers 
     112      ! +++>>> FABM 
     113      IF( lk_fabm    )       CALL trc_ini_fabm         ! FABM    tracers 
     114      ! FABM <<<+++ 
    104115 
    105116      CALL trc_ice_ini                                 ! Tracers in sea ice 
     
    141152            CALL wrk_dealloc( jpi, jpj, jpk, ztrcdta ) 
    142153        ENDIF 
    143 ! slwa temporary insert initialise tracer 
    144             trn(:,:,:,:)  = 0._wp 
    145             if(nproc.eq.39)then 
    146               DO jn = 1, jptra 
    147                   trn(:,:,:,jn) = 100._wp * tmask(:,:,:) 
    148               ENDDO 
    149             endif 
    150 !!!! slwa temp 
    151         ! 
    152         trb(:,:,:,:) = trn(:,:,:,:) 
    153         !  
    154       ENDIF 
     154      ENDIF 
     155      ! --->>> FABM 
    155156! Initialisation of tracers Boundary Conditions  - here so that you can use initial condition as boundary 
    156       IF( lk_my_trc )     CALL trc_bc_init(jptra) 
     157      !IF( lk_my_trc )     CALL trc_bc_init(jptra) 
     158      ! FABM <<<--- 
     159      ! FABM +++>>> 
     160! Initialisation of FABM diagnostics and tracer boundary conditions (so that you can use initial condition as boundary) 
     161      IF( lk_fabm )     THEN 
     162          wndm=0._wp !uninitiased field at this point 
     163          qsr=0._wp !uninitiased field at this point 
     164          CALL compute_fabm ! only needed to set-up diagnostics 
     165          CALL trc_bc_init(jptra) 
     166      ENDIF 
     167      ! FABM <<<+++ 
    157168  
    158169      tra(:,:,:,:) = 0._wp 
     
    169180      trai(:) = 0._wp                                                   ! initial content of all tracers 
    170181      DO jn = 1, jptra 
    171          trai(jn) = trai(jn) + glob_sum( trn(:,:,:,jn) * cvol(:,:,:)   ) 
     182         !trai(jn) = trai(jn) + glob_sum( trn(:,:,:,jn) * cvol(:,:,:)   ) 
     183         trai(jn) = trai(jn) 
    172184      END DO 
    173185 
Note: See TracChangeset for help on using the changeset viewer.