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 9181 for branches/UKMO/AMM15_v3_6_STABLE_package/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfmxl.F90 – NEMO

Ignore:
Timestamp:
2018-01-04T15:38:10+01:00 (6 years ago)
Author:
kingr
Message:

Adding changes required for surface temperature increments to be projected through mixed layer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/AMM15_v3_6_STABLE_package/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfmxl.F90

    r8393 r9181  
    2727   PRIVATE 
    2828 
     29   PUBLIC   zdf_mxl_tref  ! called by asminc.F90 
    2930   PUBLIC   zdf_mxl       ! called by step.F90 
    3031 
     32   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hmld_tref  !: mixed layer depth at t-points - temperature criterion [m] 
    3133   INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   nmln    !: number of level in the mixed layer (used by TOP) 
    3234   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hmld    !: mixing layer depth (turbocline)      [m] 
     
    7880        &          ll_found(jpi,jpj), ll_belowml(jpi,jpj,jpk), STAT= zdf_mxl_alloc ) 
    7981         ! 
     82         ALLOCATE(hmld_tref(jpi,jpj)) 
    8083         IF( lk_mpp             )   CALL mpp_sum ( zdf_mxl_alloc ) 
    8184         IF( zdf_mxl_alloc /= 0 )   CALL ctl_warn('zdf_mxl_alloc: failed to allocate arrays.') 
     
    8487   END FUNCTION zdf_mxl_alloc 
    8588 
     89 
     90   SUBROUTINE zdf_mxl_tref() 
     91      !!---------------------------------------------------------------------- 
     92      !!                  ***  ROUTINE zdf_mxl_tref  *** 
     93      !!                    
     94      !! ** Purpose :   Compute the mixed layer depth with temperature criteria. 
     95      !! 
     96      !! ** Method  :   The temperature-defined mixed layer depth is required 
     97      !!                   when assimilating SST in a 2D analysis.  
     98      !! 
     99      !! ** Action  :   hmld_tref 
     100      !!---------------------------------------------------------------------- 
     101      ! 
     102      INTEGER  ::   ji, jj, jk   ! dummy loop indices 
     103      REAL(wp) ::   t_ref               ! Reference temperature   
     104      REAL(wp) ::   temp_c = 0.2        ! temperature criterion for mixed layer depth   
     105      !!---------------------------------------------------------------------- 
     106      ! 
     107      ! Initialise array 
     108      IF( zdf_mxl_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'zdf_mxl_tref : unable to allocate arrays' ) 
     109       
     110      !For the AMM model assimiation uses a temperature based mixed layer depth   
     111      !This is defined here   
     112      DO jj = 1, jpj   
     113         DO ji = 1, jpi   
     114           hmld_tref(ji,jj)=fsdept(ji,jj,1  )    
     115           IF(ssmask(ji,jj) > 0.)THEN   
     116             t_ref=tsn(ji,jj,1,jp_tem)  
     117             DO jk=2,jpk   
     118               IF(ssmask(ji,jj)==0.)THEN   
     119                  hmld_tref(ji,jj)=fsdept(ji,jj,jk )   
     120                  EXIT   
     121               ELSEIF( ABS(tsn(ji,jj,jk,jp_tem)-t_ref) < temp_c)THEN   
     122                  hmld_tref(ji,jj)=fsdept(ji,jj,jk )   
     123               ELSE   
     124                  EXIT   
     125               ENDIF   
     126             ENDDO   
     127           ENDIF   
     128         ENDDO   
     129      ENDDO 
     130 
     131   END SUBROUTINE zdf_mxl_tref 
    86132 
    87133   SUBROUTINE zdf_mxl( kt ) 
Note: See TracChangeset for help on using the changeset viewer.