- Timestamp:
- 2018-10-17T11:13:02+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_DMP_TOOLS/NEMOGCM/TOOLS/DMP_TOOLS/src/coast_dist.F90
r4739 r10199 9 9 CONTAINS 10 10 11 SUBROUTINE coast_dist_weight( presto )11 SUBROUTINE coast_dist_weight( presto, ln_read , klev ) 12 12 !!---------------------------------------------------------------------- 13 13 !! *** ROUTINE coast_dist_weight *** … … 20 20 IMPLICIT NONE 21 21 REAL(wp), DIMENSION(jpi,jpj), INTENT( inout ) :: presto 22 LOGICAL, INTENT( in ) :: ln_read 23 INTEGER, INTENT( in ) :: klev 22 24 REAL(wp), DIMENSION(jpi,jpj) :: zdct 23 25 REAL(wp) :: zinfl = 1000.e3_wp ! Distance of influence of coast line (could be 24 26 ! a namelist setting) 25 27 INTEGER :: jj, ji ! dummy loop indices 26 27 28 CALL cofdis( zdct ) 28 INTEGER :: ncin, tdist_id 29 30 IF ( ln_read ) THEN 31 32 CALL check_nf90( nf90_open('dist_coast_uvtf.nc', NF90_NOWRITE, ncin), 'Error opening dist to coast file' ) 33 CALL check_nf90( nf90_inq_varid( ncin, 'tdist', tdist_id ), 'Cannot get variable ID for tmask') 34 CALL check_nf90( nf90_get_var( ncin, tdist_id, zdct, (/ 1,1,klev /), (/ jpi, jpj,1 /) ) ) 35 CALL check_nf90( nf90_close(ncin) ) 36 37 ELSE 38 39 IF (klev == 1 ) THEN ! Since only a the surface distance to coast is used, only calculate once. 40 CALL cofdis( zdct ) 41 ENDIF 42 43 ENDIF 44 29 45 DO jj = 1, jpj 30 46 DO ji = 1, jpi
Note: See TracChangeset
for help on using the changeset viewer.