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 15745 for NEMO/branches/UKMO/tools_r4.0-HEAD_dev_DMP_TOOLS/DMP_TOOLS/src/coast_dist.F90 – NEMO

Ignore:
Timestamp:
2022-03-08T18:55:08+01:00 (2 years ago)
Author:
dbruciaferri
Message:

modifications for restoring upper 300 m to EN4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/tools_r4.0-HEAD_dev_DMP_TOOLS/DMP_TOOLS/src/coast_dist.F90

    r4739 r15745  
    99   CONTAINS 
    1010 
    11    SUBROUTINE coast_dist_weight( presto )  
     11   SUBROUTINE coast_dist_weight( presto, zdct )  
    1212      !!---------------------------------------------------------------------- 
    1313      !!                 *** ROUTINE coast_dist_weight *** 
     
    2020      IMPLICIT NONE 
    2121      REAL(wp), DIMENSION(jpi,jpj), INTENT( inout ) :: presto 
    22       REAL(wp), DIMENSION(jpi,jpj) :: zdct 
    23       REAL(wp) :: zinfl = 1000.e3_wp  ! Distance of influence of coast line (could be 
    24                                   ! a namelist setting) 
    25       INTEGER :: jj, ji           ! dummy loop indices 
     22      REAL(wp), DIMENSION(jpi,jpj), INTENT( in    ) :: zdct 
     23      REAL(wp) :: zinfl = 200.e3_wp  ! Distance of influence of coast line (could be 
     24                                     ! a namelist setting) 
     25      REAL(wp) :: rdct               ! coastal distance factor 
     26      INTEGER  :: jj, ji             ! dummy loop indices 
    2627       
    2728 
    28       CALL cofdis( zdct ) 
     29      zinfl = pn_cst * 1000._wp ! in m 
     30 
     31      !CALL cofdis( zdct ) 
    2932      DO jj = 1, jpj 
    3033         DO ji = 1, jpi 
    31             zdct(ji,jj) = MIN( zinfl, zdct(ji,jj) ) 
    32             presto(ji,jj) = presto(ji, jj) * 0.5_wp * (  1._wp - COS( rpi*zdct(ji,jj)/zinfl) ) 
     34            !zdct(ji,jj) = MIN( zinfl, zdct(ji,jj) ) 
     35            rdct = MIN( zinfl, zdct(ji,jj) ) / zinfl 
     36            !presto(ji,jj) = presto(ji, jj) * 0.5_wp * (  1._wp - COS( rpi*zdct(ji,jj)/zinfl) ) 
     37            presto(ji,jj) = presto(ji, jj) * 0.5_wp * (  1._wp - COS( rpi*rdct) ) 
    3338         END DO 
    3439      END DO 
Note: See TracChangeset for help on using the changeset viewer.