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 10722 for branches/UKMO/dev_r5518_DMP_TOOLS/NEMOGCM/TOOLS/DMP_TOOLS – NEMO

Ignore:
Timestamp:
2019-02-25T15:19:53+01:00 (5 years ago)
Author:
jenniewaters
Message:

Changes to make sure original functionality works correctly.

Location:
branches/UKMO/dev_r5518_DMP_TOOLS/NEMOGCM/TOOLS/DMP_TOOLS/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_DMP_TOOLS/NEMOGCM/TOOLS/DMP_TOOLS/src/coast_dist.F90

    r10199 r10722  
    99   CONTAINS 
    1010 
    11    SUBROUTINE coast_dist_weight( presto, ln_read , klev )  
     11   SUBROUTINE coast_dist_weight( presto, zdct, ln_read , klev, ln_distcoast_calc )  
    1212      !!---------------------------------------------------------------------- 
    1313      !!                 *** ROUTINE coast_dist_weight *** 
     
    2020      IMPLICIT NONE 
    2121      REAL(wp), DIMENSION(jpi,jpj), INTENT( inout ) :: presto 
     22      REAL(wp), DIMENSION(jpi,jpj), INTENT( inout ) :: zdct 
    2223      LOGICAL, INTENT( in )                         :: ln_read 
    2324      INTEGER, INTENT( in )                         :: klev 
     25      LOGICAL, INTENT( inout )                      :: ln_distcoast_calc 
    2426      REAL(wp), DIMENSION(jpi,jpj) :: zdct 
    2527      REAL(wp) :: zinfl = 1000.e3_wp  ! Distance of influence of coast line (could be 
     
    3739      ELSE 
    3840 
    39          IF (klev == 1 ) THEN ! Since only a the surface distance to coast is used, only calculate once. 
     41         IF (ln_distcoast_calc ) THEN ! Since only the surface distance to coast is used, only calculate once. 
    4042            CALL cofdis( zdct ) 
     43            ln_distcoast_calc=.false. 
    4144         ENDIF 
    4245 
  • branches/UKMO/dev_r5518_DMP_TOOLS/NEMOGCM/TOOLS/DMP_TOOLS/src/make_dmp_file.F90

    r10199 r10722  
    3232  CHARACTER(LEN=200) :: outfile = 'resto.nc'     ! output file 
    3333  REAL(wp) :: zlat, zlat2, zlat0 
     34  LOGICAL  :: ln_distcoast_calc                  ! logical for calculating the distance 
     35                                                 ! to coast on the first depth. 
     36  REAL(wp), DIMENSION(:,:),   ALLOCATABLE :: zdct! distance to coast field 
    3437 
    3538  ! Read namelist 
     
    4851  WRITE(numout, *) 'jpk = ',jpk 
    4952 
     53  ln_distcoast_calc=.true. 
     54 
    5055  ALLOCATE( resto(jpi, jpj) ) 
     56  ALLOCATE( zdct(jpi, jpj) ) 
    5157 
    5258  !Create output file 
     
    94100           IF (ln_coast) THEN 
    95101              ! Reduce damping in vicinity of coastlines 
    96               CALL coast_dist_weight(resto, ln_readdistcoast, jk) 
     102              CALL coast_dist_weight(resto, zdct, ln_readdistcoast, jk, ln_distcoast_calc) 
    97103           ENDIF 
    98104        ENDIF 
Note: See TracChangeset for help on using the changeset viewer.