Ignore:
Timestamp:
2019-02-01T17:27:20+01:00 (19 months ago)
Author:
dford
Message:

Implement biogeochemistry assimilation for FABM-ERSEM.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/AMM15_v3_6_STABLE_package_collate_BGC_DA/NEMOGCM/NEMO/OPA_SRC/ASM/asmbkg.F90

    r10574 r10622  
    5252   USE asminc, ONLY: ln_avgbkg 
    5353#if defined key_top 
    54    USE asmbgc, ONLY: asm_bgc_bkg_wri 
     54   USE asmbgc, ONLY: asm_bgc_bkg_alloc, & 
     55      &              asm_bgc_bkg_tavg,  & 
     56      &              asm_bgc_bkg_wri 
    5557#endif 
    5658   IMPLICIT NONE 
     
    140142          
    141143         numtimes_tavg = REAL ( nitavgbkg_r -  nn_it000 + 1 ) 
    142       ENDIF    
     144      ENDIF 
     145       
     146#if defined key_top 
     147      ! Allocate BGC average arrays whatever, to save code repetition later 
     148      IF ( kt == ( nn_it000 - 1) ) THEN 
     149         CALL asm_bgc_bkg_alloc 
     150      ENDIF 
     151#endif 
    143152 
    144153      ! If creating an averaged assim bkg, sum the contribution every timestep 
     
    157166#if defined key_zdftke 
    158167         en_tavg(:,:,:)       = en_tavg(:,:,:) + en(:,:,:) / numtimes_tavg 
     168#endif 
     169#if defined key_top 
     170         CALL asm_bgc_bkg_tavg( kt, numtimes_tavg ) 
    159171#endif 
    160172      ENDIF 
     
    226238             
    227239#if defined key_top 
    228             CALL asm_bgc_bkg_wri( kt, inum ) 
     240            CALL asm_bgc_bkg_wri( kt, inum, ln_avgbkg ) 
    229241#endif 
    230242            CALL iom_close( inum ) 
Note: See TracChangeset for help on using the changeset viewer.