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 10205 for branches/UKMO/AMM15_v3_6_STABLE_package_bgc_updates/NEMOGCM/NEMO/OPA_SRC/DIA/diatmb.F90 – NEMO

Ignore:
Timestamp:
2018-10-19T13:36:08+02:00 (5 years ago)
Author:
dford
Message:

Add 25h mean and TMB diagnostics for FABM-ERSEM variables.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/AMM15_v3_6_STABLE_package_bgc_updates/NEMOGCM/NEMO/OPA_SRC/DIA/diatmb.F90

    r8561 r10205  
    1111   USE iom             ! I/0 library 
    1212   USE wrk_nemo        ! working arrays 
     13#if defined key_fabm 
     14   USE trc, ONLY: trn 
     15   USE par_fabm 
     16   USE fabm, ONLY: fabm_get_bulk_diagnostic_data 
     17#endif 
    1318 
    1419 
     
    133138      REAL(wp), POINTER, DIMENSION(:,:,:) :: zwtmb    ! temporary workspace  
    134139      REAL(wp)                         ::   zmdi      ! set masked values 
     140      INTEGER                          ::   jn        ! loop counter 
    135141 
    136142      zmdi=1.e+20 !missing data indicator for maskin 
     
    162168         CALL iom_put( "bot_v" , zwtmb(:,:,3) )    ! tmb  V Velocity 
    163169!Called in  dynspg_ts.F90       CALL iom_put( "baro_v" , vn_b )    ! Barotropic  V Velocity 
     170 
     171#if defined key_fabm 
     172         DO jn = 1, jp_fabm 
     173            CALL dia_calctmb( trn(:,:,:,jp_fabm_m1+jn), zwtmb ) 
     174            CALL iom_put( "top_"//TRIM(model%state_variables(jn)%name) , zwtmb(:,:,1) ) 
     175            CALL iom_put( "mid_"//TRIM(model%state_variables(jn)%name) , zwtmb(:,:,2) ) 
     176            CALL iom_put( "bot_"//TRIM(model%state_variables(jn)%name) , zwtmb(:,:,3) ) 
     177         END DO 
     178         DO jn = 1, jp_fabm_3d 
     179            CALL dia_calctmb( fabm_get_bulk_diagnostic_data(model, jn), zwtmb ) 
     180            CALL iom_put( "top_"//TRIM(model%diagnostic_variables(jn)%name) , zwtmb(:,:,1) ) 
     181            CALL iom_put( "mid_"//TRIM(model%diagnostic_variables(jn)%name) , zwtmb(:,:,2) ) 
     182            CALL iom_put( "bot_"//TRIM(model%diagnostic_variables(jn)%name) , zwtmb(:,:,3) ) 
     183         END DO 
     184#endif 
    164185      ELSE 
    165186         CALL ctl_warn('dia_tmb: tmb diagnostic is set to false you should not have seen this') 
Note: See TracChangeset for help on using the changeset viewer.