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 10149 for branches/UKMO/dev_r5518_GO6_package/NEMOGCM – NEMO

Ignore:
Timestamp:
2018-09-24T11:47:08+02:00 (6 years ago)
Author:
frrh
Message:

Met Office GMED ticket 379: Merged David Ford's MEDUSA assimilation changes
using command:

svn merge -r 10054:10141 svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc_v3

Location:
branches/UKMO/dev_r5518_GO6_package/NEMOGCM
Files:
18 edited
4 copied

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_GO6_package/NEMOGCM/CONFIG/SHARED/namelist_medusa_ref

    r9258 r10149  
    305305      scl_chl    = 1.0      !! (IF key_oasis) scaling the exported to UM chlorophyll field 
    306306!! 
     307!! FOAM                         !! DAF 
     308      ln_foam_medusa = .false.  !! Calculate and save diagnostics for data assimilation 
     309!! 
    307310/ 
    308311!''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 
     
    319322!!                    = (119 / 106) = 1.1226 mol O2 / mol C 
    320323!!       xo2min    :  oxygen minimum concentration 
     324!!       xobs_xco2a:  observed atmospheric xCO2 (not used if <= 0) 
    321325! 
    322326&natroam 
     
    326330   xthetarem = 1.1226 
    327331   xo2min    = 4.0 
     332   xobs_xco2a= -999.0 
    328333/ 
    329334!''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 
  • branches/UKMO/dev_r5518_GO6_package/NEMOGCM/CONFIG/SHARED/namelist_ref

    r8447 r10149  
    12871287&nam_asminc   !   assimilation increments                               ('key_asminc') 
    12881288!----------------------------------------------------------------------- 
    1289     ln_bkgwri = .false.    !  Logical switch for writing out background state 
    1290     ln_trainc = .false.    !  Logical switch for applying tracer increments 
    1291     ln_dyninc = .false.    !  Logical switch for applying velocity increments 
    1292     ln_sshinc = .false.    !  Logical switch for applying SSH increments 
    1293     ln_asmdin = .false.    !  Logical switch for Direct Initialization (DI) 
    1294     ln_asmiau = .false.    !  Logical switch for Incremental Analysis Updating (IAU) 
    1295     ln_seaiceinc = .false. !  Logical switch for applying sea ice increments 
     1289    ln_bkgwri      = .false. !  Logical switch for writing out background state 
     1290    ln_balwri      = .false. !  Logical switch for writing out balancing increments 
     1291    ln_trainc      = .false. !  Logical switch for applying tracer increments 
     1292    ln_dyninc      = .false. !  Logical switch for applying velocity increments 
     1293    ln_sshinc      = .false. !  Logical switch for applying SSH increments 
     1294    ln_asmdin      = .false. !  Logical switch for Direct Initialization (DI) 
     1295    ln_asmiau      = .false. !  Logical switch for Incremental Analysis Updating (IAU) 
     1296    ln_seaiceinc   = .false. !  Logical switch for applying sea ice increments 
     1297    ln_phytobal    = .false. !  Logical switch for phytoplankton multivariate balancing 
     1298    ln_slchltotinc = .false. !  Logical switch for applying slchltot increments 
     1299    ln_slchldiainc = .false. !  Logical switch for applying slchldia increments 
     1300    ln_slchlnoninc = .false. !  Logical switch for applying slchlnon increments 
     1301    ln_schltotinc  = .false. !  Logical switch for applying schltot increments 
     1302    ln_slphytotinc = .false. !  Logical switch for applying slphytot increments 
     1303    ln_slphydiainc = .false. !  Logical switch for applying slphydia increments 
     1304    ln_slphynoninc = .false. !  Logical switch for applying slphynon increments 
     1305    ln_sfco2inc    = .false. !  Logical switch for applying sfCO2 increments 
     1306    ln_spco2inc    = .false. !  Logical switch for applying spCO2 increments 
     1307    ln_plchltotinc = .false. !  Logical switch for applying plchltot increments 
     1308    ln_pchltotinc  = .false. !  Logical switch for applying pchltot increments 
     1309    ln_pno3inc     = .false. !  Logical switch for applying pno3 increments 
     1310    ln_psi4inc     = .false. !  Logical switch for applying psi4 increments 
     1311    ln_pdicinc     = .false. !  Logical switch for applying pdic increments 
     1312    ln_palkinc     = .false. !  Logical switch for applying palk increments 
     1313    ln_pphinc      = .false. !  Logical switch for applying pph increments 
     1314    ln_po2inc      = .false. !  Logical switch for applying po2 increments 
    12961315    ln_temnofreeze = .false. !  Logical to not add increments if temperature would fall below freezing 
    1297     nitbkg    = 0          !  Timestep of background in [0,nitend-nit000-1] 
    1298     nitdin    = 0          !  Timestep of background for DI in [0,nitend-nit000-1] 
    1299     nitiaustr = 1          !  Timestep of start of IAU interval in [0,nitend-nit000-1] 
    1300     nitiaufin = 15         !  Timestep of end of IAU interval in [0,nitend-nit000-1] 
    1301     niaufn    = 0          !  Type of IAU weighting function 
    1302     ln_salfix = .false.    !  Logical switch for ensuring that the sa > salfixmin 
    1303     salfixmin = -9999      !  Minimum salinity after applying the increments 
    1304     nn_divdmp = 0          !  Number of iterations of divergence damping operator 
     1316    nitbkg         = 0       !  Timestep of background in [0,nitend-nit000-1] 
     1317    nitdin         = 0       !  Timestep of background for DI in [0,nitend-nit000-1] 
     1318    nitiaustr      = 1       !  Timestep of start of IAU interval in [0,nitend-nit000-1] 
     1319    nitiaufin      = 15      !  Timestep of end of IAU interval in [0,nitend-nit000-1] 
     1320    niaufn         = 0       !  Type of IAU weighting function 
     1321    ln_salfix      = .false. !  Logical switch for ensuring that the sa > salfixmin 
     1322    salfixmin      = -9999   !  Minimum salinity after applying the increments 
     1323    nn_divdmp      = 0       !  Number of iterations of divergence damping operator 
     1324    mld_choice_bgc = 1       !  MLD criterion to use for biogeochemistry assimilation 
     1325    rn_maxchlinc   = -999.0  !  maximum absolute non-log chlorophyll increment from ocean colour assimilation 
     1326                             !  <= 0 implies no maximum applied (switch turned off) 
     1327                             !   > 0 implies maximum absolute chl increment capped at this value 
    13051328/ 
    13061329!----------------------------------------------------------------------- 
  • branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/ASM/asmbkg.F90

    r9321 r10149  
    4949#if defined key_lim3 
    5050   USE ice 
     51#endif 
     52#if defined key_top 
     53   USE asmbgc, ONLY: asm_bgc_bkg_wri 
    5154#endif 
    5255   USE timing 
     
    125128            IF(nn_timing == 2)  CALL timing_stop('iom_rstput') 
    126129            ! 
     130#if defined key_top 
     131            CALL asm_bgc_bkg_wri( kt, inum ) 
     132            ! 
     133#endif 
    127134            CALL iom_close( inum ) 
    128135         ENDIF 
  • branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90

    r8400 r10149  
    4444#endif 
    4545   USE sbc_oce          ! Surface boundary condition variables. 
     46   USE asmbgc           ! Biogeochemistry assimilation 
    4647 
    4748   IMPLICIT NONE 
     
    5455   PUBLIC   ssh_asm_inc    !: Apply the SSH increment 
    5556   PUBLIC   seaice_asm_inc !: Apply the seaice increment 
     57   PUBLIC   bgc_asm_inc    !: Apply the biogeochemistry increments 
    5658 
    5759#if defined key_asminc 
     
    6769   LOGICAL, PUBLIC :: ln_sshinc = .FALSE.      !: No sea surface height assimilation increment 
    6870   LOGICAL, PUBLIC :: ln_seaiceinc             !: No sea ice concentration increment 
     71   LOGICAL, PUBLIC :: lk_bgcinc = .FALSE.      !: No biogeochemistry increments 
    6972   LOGICAL, PUBLIC :: ln_salfix = .FALSE.      !: Apply minimum salinity check 
    7073   LOGICAL, PUBLIC :: ln_temnofreeze = .FALSE. !: Don't allow the temperature to drop below freezing 
     
    133136      REAL(wp), POINTER, DIMENSION(:,:) ::   hdiv   ! 2D workspace 
    134137      !! 
    135       NAMELIST/nam_asminc/ ln_bkgwri,                                      & 
     138      NAMELIST/nam_asminc/ ln_bkgwri, ln_balwri,                           & 
    136139         &                 ln_trainc, ln_dyninc, ln_sshinc,                & 
     140         &                 ln_phytobal, ln_slchltotinc, ln_slchldiainc,    & 
     141         &                 ln_slchlnoninc, ln_schltotinc, ln_slphytotinc,  & 
     142         &                 ln_slphydiainc, ln_slphynoninc, ln_spco2inc,    & 
     143         &                 ln_sfco2inc, ln_plchltotinc, ln_pchltotinc,     & 
     144         &                 ln_pno3inc, ln_psi4inc, ln_pdicinc, ln_palkinc, & 
     145         &                 ln_pphinc, ln_po2inc,                           & 
    137146         &                 ln_asmdin, ln_asmiau,                           & 
    138147         &                 nitbkg, nitdin, nitiaustr, nitiaufin, niaufn,   & 
    139148         &                 ln_salfix, salfixmin, nn_divdmp,                & 
    140          &                 ln_seaiceinc, ln_temnofreeze 
     149         &                 ln_seaiceinc, ln_temnofreeze,                   & 
     150         &                 mld_choice_bgc, rn_maxchlinc 
    141151      !!---------------------------------------------------------------------- 
    142152 
     
    161171         WRITE(numout,*) 'asm_inc_init : Assimilation increment initialization :' 
    162172         WRITE(numout,*) '~~~~~~~~~~~~' 
    163          WRITE(numout,*) '   Namelist namasm : set assimilation increment parameters' 
     173         WRITE(numout,*) '   Namelist nam_asminc : set assimilation increment parameters' 
    164174         WRITE(numout,*) '      Logical switch for writing out background state          ln_bkgwri = ', ln_bkgwri 
     175         WRITE(numout,*) '      Logical switch for writing out balancing increments      ln_balwri = ', ln_balwri 
    165176         WRITE(numout,*) '      Logical switch for applying tracer increments            ln_trainc = ', ln_trainc 
    166177         WRITE(numout,*) '      Logical switch for applying velocity increments          ln_dyninc = ', ln_dyninc 
     
    168179         WRITE(numout,*) '      Logical switch for Direct Initialization (DI)            ln_asmdin = ', ln_asmdin 
    169180         WRITE(numout,*) '      Logical switch for applying sea ice increments        ln_seaiceinc = ', ln_seaiceinc 
     181         WRITE(numout,*) '      Logical switch for phytoplankton balancing             ln_phytobal = ', ln_phytobal 
     182         WRITE(numout,*) '      Logical switch for applying slchltot increments     ln_slchltotinc = ', ln_slchltotinc 
     183         WRITE(numout,*) '      Logical switch for applying slchldia increments     ln_slchldiainc = ', ln_slchldiainc 
     184         WRITE(numout,*) '      Logical switch for applying slchlnon increments     ln_slchlnoninc = ', ln_slchlnoninc 
     185         WRITE(numout,*) '      Logical switch for applying schltot increments       ln_schltotinc = ', ln_schltotinc 
     186         WRITE(numout,*) '      Logical switch for applying slphytot increments     ln_slphytotinc = ', ln_slphytotinc 
     187         WRITE(numout,*) '      Logical switch for applying slphydia increments     ln_slphydiainc = ', ln_slphydiainc 
     188         WRITE(numout,*) '      Logical switch for applying slphynon increments     ln_slphynoninc = ', ln_slphynoninc 
     189         WRITE(numout,*) '      Logical switch for applying spco2 increments           ln_spco2inc = ', ln_spco2inc 
     190         WRITE(numout,*) '      Logical switch for applying sfco2 increments           ln_sfco2inc = ', ln_sfco2inc 
     191         WRITE(numout,*) '      Logical switch for applying plchltot increments     ln_plchltotinc = ', ln_plchltotinc 
     192         WRITE(numout,*) '      Logical switch for applying pchltot increments       ln_pchltotinc = ', ln_pchltotinc 
     193         WRITE(numout,*) '      Logical switch for applying pno3 increments             ln_pno3inc = ', ln_pno3inc 
     194         WRITE(numout,*) '      Logical switch for applying psi4 increments             ln_psi4inc = ', ln_psi4inc 
     195         WRITE(numout,*) '      Logical switch for applying pdic increments             ln_pdicinc = ', ln_pdicinc 
     196         WRITE(numout,*) '      Logical switch for applying palk increments             ln_palkinc = ', ln_palkinc 
     197         WRITE(numout,*) '      Logical switch for applying pph increments               ln_pphinc = ', ln_pphinc 
     198         WRITE(numout,*) '      Logical switch for applying po2 increments               ln_po2inc = ', ln_po2inc 
    170199         WRITE(numout,*) '      Logical switch for Incremental Analysis Updating (IAU)   ln_asmiau = ', ln_asmiau 
    171200         WRITE(numout,*) '      Timestep of background in [0,nitend-nit000-1]            nitbkg    = ', nitbkg 
     
    176205         WRITE(numout,*) '      Logical switch for ensuring that the sa > salfixmin      ln_salfix = ', ln_salfix 
    177206         WRITE(numout,*) '      Minimum salinity after applying the increments           salfixmin = ', salfixmin 
     207         WRITE(numout,*) '      Choice of MLD for BGC assimilation                  mld_choice_bgc = ', mld_choice_bgc 
     208         WRITE(numout,*) '      Maximum absolute chlorophyll increment (<=0 = off)    rn_maxchlinc = ', rn_maxchlinc 
    178209      ENDIF 
    179210 
     
    212243         WRITE(numout,*) '       iitiaufin_date = ', iitiaufin_date 
    213244      ENDIF 
     245       
     246      IF ( ln_slchltotinc .OR. ln_slchldiainc .OR. ln_slchlnoninc .OR. & 
     247         & ln_schltotinc  .OR. ln_slphytotinc .OR. ln_slphydiainc .OR. & 
     248         & ln_slphynoninc .OR. ln_spco2inc    .OR. ln_sfco2inc    .OR. & 
     249         & ln_plchltotinc .OR. ln_pchltotinc  .OR. ln_pno3inc     .OR. & 
     250         & ln_psi4inc     .OR. ln_pdicinc     .OR. ln_palkinc     .OR. & 
     251         & ln_pphinc      .OR. ln_po2inc ) THEN 
     252         lk_bgcinc = .TRUE. 
     253      ENDIF 
    214254 
    215255      IF ( nacc /= 0 ) & 
     
    223263 
    224264      IF (      ( ( .NOT. ln_asmdin ).AND.( .NOT. ln_asmiau ) ) & 
    225            .AND.( ( ln_trainc ).OR.( ln_dyninc ).OR.( ln_sshinc ) .OR. ( ln_seaiceinc) )) & 
    226          & CALL ctl_stop( ' One or more of ln_trainc, ln_dyninc, ln_sshinc and ln_seaiceinc is set to .true.', & 
     265         & .AND.( ( ln_trainc ).OR.( ln_dyninc ).OR.( ln_sshinc ).OR.( ln_seaiceinc ).OR. & 
     266         &        ( lk_bgcinc ) )) & 
     267         & CALL ctl_stop( ' One or more of ln_trainc, ln_dyninc, ln_sshinc, ln_seaiceinc,', & 
     268         &                ' ln_(bgc-variable)inc is set to .true.', & 
    227269         &                ' but ln_asmdin and ln_asmiau are both set to .false. :', & 
    228270         &                ' Inconsistent options') 
     
    233275 
    234276      IF ( ( .NOT. ln_trainc ).AND.( .NOT. ln_dyninc ).AND.( .NOT. ln_sshinc ).AND.( .NOT. ln_seaiceinc ) & 
    235          &                     )  & 
    236          & CALL ctl_warn( ' ln_trainc, ln_dyninc, ln_sshinc and ln_seaiceinc are set to .false. :', & 
     277         & .AND.( .NOT. lk_bgcinc ) )  & 
     278         & CALL ctl_warn( ' ln_trainc, ln_dyninc, ln_sshinc, ln_seaiceinc,', & 
     279         &                ' ln_(bgc-variable)inc are set to .false. :', & 
    237280         &                ' The assimilation increments are not applied') 
    238281 
     
    254297         &                ' Background time step for Direct Initialization is outside', & 
    255298         &                ' the cycle interval') 
     299       
     300      IF ( lk_bgcinc ) CALL asm_bgc_check_options 
    256301 
    257302      IF ( nstop > 0 ) RETURN       ! if there are any errors then go no further 
     
    350395      ssh_iau(:,:)    = 0.0 
    351396#endif 
    352       IF ( ( ln_trainc ).OR.( ln_dyninc ).OR.( ln_sshinc ).OR.( ln_seaiceinc ) ) THEN 
     397      IF ( ( ln_trainc ).OR.( ln_dyninc ).OR.( ln_sshinc ).OR.( ln_seaiceinc ) & 
     398         &  .OR.( lk_bgcinc ) ) THEN 
    353399 
    354400         !-------------------------------------------------------------------- 
     
    424470         ENDIF 
    425471 
     472         IF ( lk_bgcinc ) THEN 
     473            CALL asm_bgc_init_incs( inum ) 
     474         ENDIF 
     475 
    426476         CALL iom_close( inum ) 
    427477  
     
    534584         CALL iom_close( inum ) 
    535585 
     586      ENDIF 
     587          
     588      IF ( lk_bgcinc ) THEN 
     589         CALL asm_bgc_init_bkg 
    536590      ENDIF 
    537591      ! 
     
    11551209 
    11561210   END SUBROUTINE seaice_asm_inc 
     1211 
     1212 
     1213   SUBROUTINE bgc_asm_inc( kt ) 
     1214      !!---------------------------------------------------------------------- 
     1215      !!                    ***  ROUTINE bgc_asm_inc  *** 
     1216      !!           
     1217      !! ** Purpose : Apply the biogeochemistry assimilation increments 
     1218      !! 
     1219      !! ** Method  : Call relevant routines in asmbgc 
     1220      !! 
     1221      !! ** Action  : Call relevant routines in asmbgc 
     1222      !! 
     1223      !!---------------------------------------------------------------------- 
     1224      !! 
     1225      INTEGER, INTENT(in   ) :: kt        ! Current time step 
     1226      ! 
     1227      INTEGER                :: icycper   ! Dimension of wgtiau 
     1228      !! 
     1229      !!---------------------------------------------------------------------- 
     1230       
     1231      icycper = SIZE( wgtiau ) 
     1232       
     1233      ! Ocean colour variables first 
     1234      IF ( ln_slchltotinc .OR. ln_slchldiainc .OR. ln_slchlnoninc .OR. & 
     1235         & ln_schltotinc  .OR. ln_slphytotinc .OR. ln_slphydiainc .OR. & 
     1236         & ln_slphynoninc ) THEN 
     1237         CALL phyto2d_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau ) 
     1238      ENDIF 
     1239       
     1240      ! Surface pCO2/fCO2 next 
     1241      IF ( ln_sfco2inc .OR. ln_spco2inc ) THEN 
     1242         CALL pco2_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau, & 
     1243            &               ln_trainc, t_bkginc, s_bkginc ) 
     1244      ENDIF 
     1245       
     1246      ! Profile pH next 
     1247      IF ( ln_pphinc ) THEN 
     1248         CALL ph_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau, & 
     1249            &             ln_trainc, t_bkginc, s_bkginc ) 
     1250      ENDIF 
     1251       
     1252      ! Then chlorophyll profiles 
     1253      IF ( ln_plchltotinc .OR. ln_pchltotinc ) THEN 
     1254         CALL phyto3d_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau ) 
     1255      ENDIF 
     1256       
     1257      ! Remaining bgc profile variables 
     1258      IF ( ln_pno3inc .OR. ln_psi4inc .OR. ln_pdicinc .OR. & 
     1259         & ln_palkinc .OR. ln_po2inc ) THEN 
     1260         CALL bgc3d_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau ) 
     1261      ENDIF 
     1262 
     1263   END SUBROUTINE bgc_asm_inc 
    11571264    
    11581265   !!====================================================================== 
  • branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/ASM/asmpar.F90

    r6486 r10149  
    2020      & c_asmtrj = 'assim_trj',                  & !: Filename for storing the  
    2121                                                   !: reference trajectory 
    22       & c_asminc = 'assim_background_increments'  !: Filename for storing the  
     22      & c_asminc = 'assim_background_increments', & !: Filename for storing the  
    2323                                                   !: increments to the background 
    2424                                                   !: state 
     25      & c_asmbal = 'assim.balincs'                 !: Filename for storing the  
     26                                                   !: balancing increments calculated 
     27                                                   !: for biogeochemistry 
    2528 
    2629   INTEGER, PUBLIC :: nitbkg_r      !: Background time step referenced to nit000 
  • branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftmx.F90

    r7179 r10149  
    3838   LOGICAL, PUBLIC, PARAMETER ::   lk_zdftmx = .TRUE.    !: tidal mixing flag 
    3939 
    40    !                       !!* Namelist  namzdf_tmx : tidal mixing * 
    41    REAL(wp) ::  rn_htmx     ! vertical decay scale for turbulence (meters) 
    42    REAL(wp) ::  rn_n2min    ! threshold of the Brunt-Vaisala frequency (s-1) 
    43    REAL(wp) ::  rn_tfe      ! tidal dissipation efficiency (St Laurent et al. 2002) 
    44    REAL(wp) ::  rn_me       ! mixing efficiency (Osborn 1980) 
    45    LOGICAL  ::  ln_tmx_itf  ! Indonesian Through Flow (ITF): Koch-Larrouy et al. (2007) parameterization 
    46    REAL(wp) ::  rn_tfe_itf  ! ITF tidal dissipation efficiency (St Laurent et al. 2002) 
    47  
    48    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   en_tmx     ! energy available for tidal mixing (W/m2) 
    49    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)  ::   mask_itf   ! mask to use over Indonesian area 
    50    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   az_tmx     ! coefficient used to evaluate the tidal induced Kz 
     40   !                              !!* Namelist  namzdf_tmx : tidal mixing * 
     41   REAL(wp)        ::  rn_htmx     ! vertical decay scale for turbulence (meters) 
     42   REAL(wp)        ::  rn_n2min    ! threshold of the Brunt-Vaisala frequency (s-1) 
     43   REAL(wp)        ::  rn_tfe      ! tidal dissipation efficiency (St Laurent et al. 2002) 
     44   REAL(wp)        ::  rn_me       ! mixing efficiency (Osborn 1980) 
     45   LOGICAL, PUBLIC ::  ln_tmx_itf  ! Indonesian Through Flow (ITF): Koch-Larrouy et al. (2007) parameterization 
     46   REAL(wp)        ::  rn_tfe_itf  ! ITF tidal dissipation efficiency (St Laurent et al. 2002) 
     47 
     48   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)         ::   en_tmx     ! energy available for tidal mixing (W/m2) 
     49   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:), PUBLIC ::   mask_itf   ! mask to use over Indonesian area 
     50   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:)       ::   az_tmx     ! coefficient used to evaluate the tidal induced Kz 
    5151 
    5252   !! * Substitutions 
  • branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90

    r9321 r10149  
    6161   USE asminc          ! assimilation increments      
    6262   USE asmbkg          ! writing out state trajectory 
     63   USE asmbgc          ! biogeochemical assimilation increments 
    6364   USE diaptr          ! poleward transports           (dia_ptr_init routine) 
    6465   USE diadct          ! sections transports           (dia_dct_init routine) 
     
    160161                IF( ln_dyninc ) CALL dyn_asm_inc( nit000 - 1 )    ! Dynamics 
    161162                IF( ln_sshinc ) CALL ssh_asm_inc( nit000 - 1 )    ! SSH 
     163                IF( lk_bgcinc ) CALL bgc_asm_inc( nit000 - 1 )    ! BGC 
    162164             ENDIF 
    163165          ENDIF 
     
    191193 
    192194      IF( lk_diaobs   )   CALL dia_obs_wri 
     195      ! 
     196      IF( ( lk_asminc ).AND.( ln_balwri ) ) CALL asm_bgc_bal_wri( nitend )  ! Output balancing increments 
    193197      ! 
    194198      IF( ln_icebergs )   CALL icb_end( nitend ) 
  • branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/step.F90

    r8400 r10149  
    253253      ! Passive Tracer Model 
    254254      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
     255      IF( lk_asminc .AND. ln_asmiau .AND. lk_bgcinc ) & 
     256         &               CALL bgc_asm_inc( kstp )     ! biogeochemistry assimilation 
    255257                         CALL trc_stp( kstp )         ! time-stepping 
    256258#endif 
  • branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/MEDUSA/air_sea.F90

    r10020 r10149  
    7474                                   jriver_alk, jriver_c,                  & 
    7575                                   jriver_n, jriver_si,                   & 
     76                                   ln_foam_medusa,                        & 
    7677                                   riv_alk, riv_c, riv_n, riv_si,         & 
    7778                                   zn_dms_chd, zn_dms_chn, zn_dms_din,    & 
    7879                                   zn_dms_mld, zn_dms_qsr,                & 
     80                                   f2_pco2w, f2_fco2w,                    & 
    7981                                   xnln, xnld  
    8082      USE trc,               ONLY: med_diag 
     
    8789#  else 
    8890      USE trcco2_medusa,     ONLY: trc_co2_medusa 
     91      USE mocsy_mainmod,     ONLY: p2fCO2 
    8992#  endif 
    9093      USE trcdms_medusa,     ONLY: trc_dms_medusa 
     
    327330                     iters, ' AT (', ji, ', ', jj, ', 1) AT ', kt 
    328331               endif 
     332               IF ( ln_foam_medusa ) THEN 
     333                  !! DAF (Aug 2017): calculate fCO2 for observation operator 
     334                  CALL p2fCO2( f_pco2w, ztmp, f_pp0, 0.0, 1, f_fco2w ) 
     335               ENDIF 
    329336            ENDIF 
    330337         ENDDO 
     
    506513                              CO2flux_conv 
    507514               !! ENDIF 
     515               IF ( ln_foam_medusa ) THEN 
     516                  !! DAF (Aug 2017): Save pCO2 and fCO2 for observation operator 
     517                  f2_pco2w(ji,jj) = f_pco2w(ji,jj) 
     518                  f2_fco2w(ji,jj) = f_pco2w(ji,jj) 
     519               ENDIF 
    508520               IF ( lk_iomput ) THEN 
    509521                  IF( med_diag%ATM_PCO2%dgsave ) THEN 
  • branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_fin.F90

    r10020 r10149  
    4646                                   f3_co3, f3_h2co3, f3_hco3,           & 
    4747                                   f3_omarg, f3_omcal, f3_pH,           & 
     48                                   ln_foam_medusa, mld_max, pgrow_avg,  & 
     49                                   ploss_avg, phyt_avg,                 & 
    4850                                   za_sed_c, za_sed_ca, za_sed_fe,      & 
    4951                                   za_sed_n, za_sed_si,                 & 
     
    5557      USE trc,               ONLY: med_diag, nittrc000, trn  
    5658      USE trcnam_trp,        ONLY: ln_trcadv_cen2, ln_trcadv_tvd 
     59      USE zdfmxl,            ONLY: hmld 
    5760  
    5861      !! time (integer timestep) 
     
    113116# endif       
    114117 
     118      IF ( ln_foam_medusa ) THEN 
     119         !!---------------------------------------------------------------------- 
     120         !! Diagnostics required for ocean colour assimilation: 
     121         !! Mixed layer average phytoplankton growth, loss and concentration 
     122         !! Maximum mixed layer depth 
     123         !!---------------------------------------------------------------------- 
     124         !! 
     125         DO jj = 2,jpjm1 
     126            DO ji = 2,jpim1 
     127               IF ( hmld(ji,jj) .GT. 0.0 ) THEN 
     128                  pgrow_avg(ji,jj) = pgrow_avg(ji,jj) / hmld(ji,jj) 
     129                  ploss_avg(ji,jj) = ploss_avg(ji,jj) / hmld(ji,jj) 
     130                  phyt_avg(ji,jj)  = phyt_avg(ji,jj)  / hmld(ji,jj) 
     131                  IF ( hmld(ji,jj) .GT. mld_max(ji,jj) ) THEN 
     132                     mld_max(ji,jj) = hmld(ji,jj) 
     133                  ENDIF 
     134               ENDIF 
     135            END DO 
     136         END DO 
     137      ENDIF 
     138 
    115139#  if defined key_debug_medusa 
    116140         !! AXY (12/07/17) 
  • branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_init.F90

    r10020 r10149  
    3535      USE bio_medusa_mod 
    3636      USE par_oce,           ONLY: jpi, jpj, jpk 
    37       USE sms_medusa,        ONLY: jdms 
     37      USE sms_medusa,        ONLY: jdms, pgrow_avg, ploss_avg, phyt_avg, mld_max 
    3838      USE trc,               ONLY: ln_diatrc, med_diag, nittrc000  
    3939      USE in_out_manager,    ONLY: lwp, numout 
     
    195195      fslowsinkc(:,:) = 0.0 
    196196# endif       
     197      !! 
     198      pgrow_avg(:,:) = 0.0 
     199      ploss_avg(:,:) = 0.0 
     200      phyt_avg(:,:)  = 0.0 
     201      IF( kt == nittrc000 ) THEN 
     202         mld_max(:,:) = 0.0 
     203      ENDIF 
    197204      !! 
    198205      !! allocate and initiate 2D diag 
  • branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/MEDUSA/plankton.F90

    r8441 r10149  
    3636                                   fdpn, fdpn2, fdzme, fdzme2,             & 
    3737                                   fdzmi, fdzmi2, fsdiss, fsin,            & 
     38                                   fdep1, fprn, fprd,                      & 
     39                                   fgmepd, fgmepn, fgmipn,                 & 
    3840                                   zphd, zphn, zpds, zzme, zzmi 
    39       USE dom_oce,           ONLY: tmask 
     41      USE dom_oce,           ONLY: e3t_0, e3t_n, gdepw_0, gdepw_n, tmask 
     42      USE par_kind,          ONLY: wp 
    4043      USE par_oce,           ONLY: jpim1, jpjm1 
    4144      USE phytoplankton_mod, ONLY: phytoplankton 
    4245      USE sms_medusa,        ONLY: jmpd, jmpn, jmzme, jmzmi,               & 
     46                                   ln_foam_medusa,                         & 
     47                                   pgrow_avg, ploss_avg, phyt_avg,         & 
    4348                                   xkphd, xkphn, xkzme, xkzmi,             & 
    4449                                   xmetapd, xmetapn, xmetazme, xmetazmi,   & 
    4550                                   xmpd, xmpn, xmzme, xmzmi, xsdiss 
     51      USE zdfmxl,            ONLY: hmld 
    4652      USE zooplankton_mod,   ONLY: zooplankton 
     53 
     54   !!* Substitution 
     55#  include "domzgr_substitute.h90" 
    4756 
    4857      !! Level 
     
    5059 
    5160      INTEGER :: ji, jj 
     61 
     62      REAL(wp) :: fq0 
    5263 
    5364      !!------------------------------------------------------------------- 
     
    188199      ENDDO 
    189200 
     201      IF ( ln_foam_medusa ) THEN 
     202         !! Mixed layer averages for ocean colour assimilation 
     203         !! 
     204         DO jj = 2,jpjm1 
     205            DO ji = 2,jpim1 
     206               IF (tmask(ji,jj,jk) == 1) THEN 
     207                  if (fdep1(ji,jj).le.hmld(ji,jj)) then 
     208                     !! this level is entirely in the mixed layer 
     209                     fq0 = 1.0 
     210                  elseif (fsdepw(ji,jj,jk).ge.hmld(ji,jj)) then 
     211                     !! this level is entirely below the mixed layer 
     212                     fq0 = 0.0 
     213                  else 
     214                     !! this level straddles the mixed layer 
     215                     fq0 = (hmld(ji,jj) - fsdepw(ji,jj,jk)) / fse3t(ji,jj,jk) 
     216                  endif 
     217                  !! 
     218                  pgrow_avg(ji,jj) = pgrow_avg(ji,jj) +                   & 
     219                                     (((fprn(ji,jj) * zphn(ji,jj)) +      & 
     220                                       (fprd(ji,jj) * zphd(ji,jj))  ) *   & 
     221                                      fse3t(ji,jj,jk) * fq0) 
     222                  ploss_avg(ji,jj) = ploss_avg(ji,jj) +                   & 
     223                                     ((fgmepd(ji,jj) + fdpd(ji,jj) +      & 
     224                                       fdpd2(ji,jj)                +      & 
     225                                       fgmepn(ji,jj) + fdpn(ji,jj) +      & 
     226                                       fdpn2(ji,jj)  + fgmipn(ji,jj) ) *  & 
     227                                      fse3t(ji,jj,jk) * fq0) 
     228                  phyt_avg(ji,jj)  = phyt_avg(ji,jj)  +                   & 
     229                                     ((zphn(ji,jj) + zphd(ji,jj)) *       & 
     230                                      fse3t(ji,jj,jk) * fq0) 
     231               ENDIF 
     232            ENDDO 
     233         ENDDO 
     234      ENDIF 
     235 
    190236   END SUBROUTINE plankton 
    191237 
  • branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/MEDUSA/sms_medusa.F90

    r9385 r10149  
    212212   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: f2_ccd_arg  !: 2D aragonite CCD depth 
    213213!! 
     214!! 2D fields of pCO2 and fCO2 for observation operator 
     215   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: f2_pco2w    !: 2D pCO2 
     216   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: f2_fco2w    !: 2D fCO2 
     217!! 
    214218!! 2D fields of organic and inorganic material sedimented on the seafloor 
    215219   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: zb_sed_n    !: 2D organic nitrogen   (before) 
     
    289293   INTEGER  :: co2_rec 
    290294   REAL(wp) :: co2_yinit, co2_yend    !: First and Last year read in the xCO2.atm file 
     295   REAL(wp) :: xobs_xco2a             !: Observed atmospheric xCO2, from namelist 
    291296#endif 
    292297 
     
    349354   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: cmask       !: ??? 
    350355 
     356!!---------------------------------------------------------------------- 
     357!! Parameters required for ocean colour assimilation 
     358!!---------------------------------------------------------------------- 
     359!! 
     360   LOGICAL :: ln_foam_medusa                                 !: Flag to calculate and save diagnostics 
     361   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: pgrow_avg  !: Mixed layer average phytoplankton growth 
     362   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: ploss_avg  !: Mixed layer average phytoplankton loss 
     363   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: phyt_avg   !: Mixed layer average phytoplankton 
     364   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: mld_max    !: Maximum mixed layer depth 
     365!! 
     366 
    351367   !!---------------------------------------------------------------------- 
    352368   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
     
    361377      !!---------------------------------------------------------------------- 
    362378      USE lib_mpp , ONLY: ctl_warn 
    363       INTEGER ::   ierr(8)        ! Local variables 
     379      INTEGER ::   ierr(9)        ! Local variables 
    364380      !!---------------------------------------------------------------------- 
    365381      ierr(:) = 0 
     
    371387      !* 2D and 3D fields of carbonate system parameters 
    372388      ALLOCATE( f2_ccd_cal(jpi,jpj)  , f2_ccd_arg(jpi,jpj)  ,       & 
     389                f2_pco2w(jpi,jpj)    , f2_fco2w(jpi,jpj)    ,       & 
    373390         &      f3_pH(jpi,jpj,jpk)   , f3_h2co3(jpi,jpj,jpk),       & 
    374391         &      f3_hco3(jpi,jpj,jpk) , f3_co3(jpi,jpj,jpk)  ,       & 
     
    419436         &      ffln(jpi,jpj,jpk)    , fflf(jpi,jpj,jpk)    ,       & 
    420437         &      ffls(jpi,jpj,jpk)    , cmask(jpi,jpj)       ,    STAT=ierr(8) )  
     438      !* Fields for ocean colour data assimilation 
     439      ALLOCATE( pgrow_avg(jpi,jpj)   , ploss_avg(jpi,jpj)   ,       & 
     440         &      phyt_avg(jpi,jpj)    , mld_max(jpi,jpj)     ,    STAT=ierr(9) ) 
    421441#endif 
    422442      ! 
  • branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcbio_medusa.F90

    r10020 r10149  
    105105      USE sbc_oce,                    ONLY: lk_oasis 
    106106      USE sms_medusa,                 ONLY: hist_pco2, co2_yinit, co2_yend, & 
    107                                             lk_pi_co2 
     107# if defined key_roam 
     108                                            xobs_xco2a,                     & 
     109# endif 
     110                                            pgrow_avg,                      & 
     111                                            ploss_avg, phyt_avg, mld_max,   & 
     112                                            lk_pi_co2, ln_foam_medusa 
    108113      USE trc,                        ONLY: ln_rsttr, nittrc000, trn 
    109114      USE bio_medusa_init_mod,        ONLY: bio_medusa_init 
     
    330335         !! f_xco2a(:,:) = 284.725       !! CMIP5 pre-industrial pCO2 
    331336         f_xco2a(:,:) = 284.317          !! CMIP6 pre-industrial pCO2  
     337      ELSEIF ( xobs_xco2a > 0.0 ) THEN 
     338         IF(lwp) WRITE(numout,*) ' using observed atm pCO2 = ', xobs_xco2a 
     339         f_xco2a(:,:) = xobs_xco2a 
    332340      ELSE       
    333341         !! xCO2 from file 
     
    418426      !! now use the NEMO calendar tool : nsec_month to be sure to call  
    419427      !! at the beginning of a new month . 
     428      !! DAF: For FOAM we want to run daily 
    420429      IF ( (kt == nittrc000 .AND. .NOT.ln_rsttr) .OR.                        & 
    421            ( nsec_month .LE. INT(rdt) ) )  THEN 
     430           ( nsec_month .LE. INT(rdt) )          .OR.                        & 
     431           ( nsec_day   .LE. INT(rdt) .AND. ln_foam_medusa ) )  THEN 
    422432           IF ( lwp )  WRITE(numout,*)                                       &          
    423433                              ' *** 3D carb chem call *** -- kt:', kt,       & 
  • branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcini_medusa.F90

    r9385 r10149  
    330330      !!---------------------------------------------------------------------- 
    331331      !!  
    332       IF( ( .NOT.lk_oasis ) .AND. ( .NOT.lk_pi_co2 ) ) THEN 
     332      IF( ( .NOT.lk_oasis ) .AND. ( .NOT.lk_pi_co2 ) .AND. ( xobs_xco2a <= 0.0 ) ) THEN 
    333333         IF(lwp) WRITE(numout,*) ' trc_ini_medusa: initialisating atm CO2 record' 
    334334         CALL trc_ini_medusa_co2atm 
  • branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcnam_medusa.F90

    r9258 r10149  
    8787      &  xsdiss,                                              & 
    8888      &  sedlam,sedlostpoc,jpkb,jdms,jdms_input,jdms_model,   & 
    89       &  scl_chl, chl_out, dmsmin, dmscut, dmsslp 
     89      &  scl_chl, chl_out, dmsmin, dmscut, dmsslp,            & 
     90      &  ln_foam_medusa 
    9091#if defined key_roam 
    9192      NAMELIST/natroam/ xthetaphy,xthetazoo,xthetanit,        & 
     93      &    xobs_xco2a,                                        & 
    9294      &    xthetarem,xo2min  
    9395#endif 
     
    255257      dmscut      = 1.72 !! Anderson DMS default 
    256258      dmsslp      = 8.24 !! Anderson DMS default 
     259!! 
     260      ln_foam_medusa = .FALSE. 
    257261             
    258262      !REWIND(numnatm) 
     
    415419!!       chl_out     : select the chl field to send at the UM: 
    416420!!                     1- Surf Chl ; 2- MLD Chl  
     421!! 
     422!! FOAM - observation operator and data assimilation 
     423!!       ln_foam_medusa : calculate required diagnostics 
    417424 
    418425      IF(lwp) THEN 
     
    975982            ENDIF 
    976983         ENDIF ! IF lk_oasis=true 
     984!! FOAM 
     985         WRITE(numout,*) '=== FOAM-related parameters' 
     986         WRITE(numout,*)     & 
     987         &   ' calculate diagnostics for data assimilation,            ln_foam_medusa = ', ln_foam_medusa 
    977988!! 
    978989      ENDIF 
     
    10301041      xthetarem = 0. 
    10311042      xo2min    = 0. 
     1043      xobs_xco2a = 0. 
    10321044 
    10331045      !READ(numnatm,natroam) 
     
    10491061!!       xthetarem :  oxygen consumption by carbon remineralisation 
    10501062!!       xo2min    :  oxygen minimum concentration 
     1063!!       xobs_xco2a : observed atmospheric xCO2 (not used if <= 0) 
    10511064 
    10521065      IF(lwp) THEN 
     
    10661079          WRITE(numout,*)     & 
    10671080          &   ' oxygen minimum concentration                               xo2min      = ', xo2min 
     1081          WRITE(numout,*)     & 
     1082          &   ' observed atmospheric xCO2 (not used if <= 0)               xobs_xco2a  = ', xobs_xco2a 
    10681083       ENDIF 
    10691084 
  • branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/trcini.F90

    r9262 r10149  
    3636   USE sbc_oce 
    3737   USE trcice          ! tracers in sea ice 
     38# if defined key_medusa 
    3839   USE sms_medusa      ! MEDUSA   initialisation 
     40# endif 
    3941   IMPLICIT NONE 
    4042   PRIVATE 
     
    107109      !                                                              ! total volume of the ocean  
    108110      areatot = glob_sum( cvol(:,:,:) ) 
     111# if defined key_medusa && defined key_roam 
    109112      carea(:,:) = e1e2t(:,:) * tmask(:,:,1)  
     113# endif 
    110114 
    111115      IF( lk_pisces  )       CALL trc_ini_pisces       ! PISCES  bio-model 
  • branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/trcrst.F90

    r9975 r10149  
    4545   USE oce,     ONLY: CO2Flux_out_cpl, DMS_out_cpl, chloro_out_cpl  !! Coupling variable 
    4646   USE trcstat 
     47   USE obs_const, ONLY: obfillflt  ! Observation operator fill value 
    4748 
    4849   IMPLICIT NONE 
     
    338339         IF(lwp) WRITE(numout,*) 'Or don t start from uncomplete restart...'  
    339340      ENDIF 
     341      ! 
     342      IF ( ln_foam_medusa ) THEN 
     343         !! 2D fields of pCO2 and fCO2 for observation operator on first timestep 
     344         IF( iom_varid( numrtr, 'PCO2W', ldstop = .FALSE. ) > 0 ) THEN 
     345            IF(lwp) WRITE(numout,*) ' MEDUSA pCO2 present - reading in ...' 
     346            CALL iom_get( numrtr, jpdom_autoglo, 'PCO2W',  f2_pco2w(:,:)  ) 
     347            CALL iom_get( numrtr, jpdom_autoglo, 'FCO2W',  f2_fco2w(:,:)  ) 
     348         ELSE 
     349            IF(lwp) WRITE(numout,*) ' MEDUSA pCO2 absent - setting to fill ...' 
     350            f2_pco2w(:,:) = obfillflt * tmask(:,:,1) 
     351            f2_fco2w(:,:) = obfillflt * tmask(:,:,1) 
     352         ENDIF 
     353      ENDIF 
    340354# endif 
    341  
     355      IF ( ln_foam_medusa ) THEN 
     356         !! Fields for ocean colour assimilation on first timestep 
     357         IF( iom_varid( numrtr, 'pgrow_avg', ldstop = .FALSE. ) > 0 ) THEN 
     358            IF(lwp) WRITE(numout,*) ' MEDUSA pgrow_avg present - reading in ...' 
     359            CALL iom_get( numrtr, jpdom_autoglo, 'pgrow_avg',  pgrow_avg(:,:)  ) 
     360            CALL iom_get( numrtr, jpdom_autoglo, 'ploss_avg',  ploss_avg(:,:)  ) 
     361            CALL iom_get( numrtr, jpdom_autoglo, 'phyt_avg',   phyt_avg(:,:)   ) 
     362            CALL iom_get( numrtr, jpdom_autoglo, 'mld_max',    mld_max(:,:)    ) 
     363         ELSE 
     364            IF(lwp) WRITE(numout,*) ' MEDUSA pgrow_avg absent - setting to zero ...' 
     365            pgrow_avg(:,:) = 0.0 
     366            ploss_avg(:,:) = 0.0 
     367            phyt_avg(:,:)  = 0.0 
     368            mld_max(:,:)   = 0.0 
     369         ENDIF 
     370      ENDIF 
    342371 
    343372#endif 
     
    510539      call trc_rst_dia_stat( f2_ccd_arg(:,:),'CCD_ARG') 
    511540      !! 
     541      IF ( ln_foam_medusa ) THEN 
     542         !! Fields for observation operator on first timestep 
     543         IF(lwp) WRITE(numout,*) ' MEDUSA OBS fields - writing out ...' 
     544         CALL iom_rstput( kt, nitrst, numrtw, 'PCO2W', f2_pco2w(:,:)  ) 
     545         CALL iom_rstput( kt, nitrst, numrtw, 'FCO2W', f2_fco2w(:,:)  ) 
     546      ENDIF 
    512547# endif 
     548      IF ( ln_foam_medusa ) THEN 
     549         !! Fields for assimilation on first timestep 
     550         IF(lwp) WRITE(numout,*) ' MEDUSA ASM fields - writing out ...' 
     551         CALL iom_rstput( kt, nitrst, numrtw, 'pgrow_avg', pgrow_avg(:,:) ) 
     552         CALL iom_rstput( kt, nitrst, numrtw, 'ploss_avg', ploss_avg(:,:) ) 
     553         CALL iom_rstput( kt, nitrst, numrtw, 'phyt_avg',  phyt_avg(:,:)  ) 
     554         CALL iom_rstput( kt, nitrst, numrtw, 'mld_max',   mld_max(:,:)   ) 
     555      ENDIF 
    513556!! 
    514557#endif 
Note: See TracChangeset for help on using the changeset viewer.