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

Ignore:
Timestamp:
2017-03-23T15:36:14+01:00 (7 years ago)
Author:
dford
Message:

Add a version of the NEMO-FABM coupling code. In theory, this should give equivalent results to PML gitlab commit 2e51db55.

File:
1 edited

Legend:

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

    r7827 r7829  
    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 
     
    3236   USE sbc_oce 
    3337   USE trcice          ! tracers in sea ice 
     38   USE trcbc,   only : trc_bc_init ! generalized Boundary Conditions 
    3439  
    3540   IMPLICIT NONE 
     
    6974      IF(lwp) WRITE(numout,*) 'trc_init : initial set up of the passive tracers' 
    7075      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 <<<+++ 
    7180 
    7281      CALL top_alloc()              ! allocate TOP arrays 
     
    101110      IF( lk_c14b    )       CALL trc_ini_c14b         ! C14 bomb  tracer 
    102111      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 <<<+++ 
    103115 
    104116      CALL trc_ice_ini                                 ! Tracers in sea ice 
     
    110122      ENDIF 
    111123 
     124      ! Initialisation of tracers Initial Conditions 
    112125      IF( ln_trcdta )      CALL trc_dta_init(jptra) 
    113  
    114126 
    115127      IF( ln_rsttr ) THEN 
     
    140152            CALL wrk_dealloc( jpi, jpj, jpk, ztrcdta ) 
    141153        ENDIF 
    142         ! 
    143         trb(:,:,:,:) = trn(:,:,:,:) 
    144         !  
    145       ENDIF 
     154      ENDIF 
     155      ! --->>> FABM 
     156! Initialisation of tracers Boundary Conditions  - here so that you can use initial condition as boundary 
     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 <<<+++ 
    146168  
    147169      tra(:,:,:,:) = 0._wp 
     
    158180      trai(:) = 0._wp                                                   ! initial content of all tracers 
    159181      DO jn = 1, jptra 
    160          trai(jn) = trai(jn) + glob_sum( trn(:,:,:,jn) * cvol(:,:,:)   ) 
     182         !trai(jn) = trai(jn) + glob_sum( trn(:,:,:,jn) * cvol(:,:,:)   ) 
     183         trai(jn) = trai(jn) 
    161184      END DO 
    162185 
Note: See TracChangeset for help on using the changeset viewer.