Changeset 10199
- Timestamp:
- 2018-10-17T11:13:02+02:00 (6 years ago)
- Location:
- branches/UKMO/dev_r5518_DMP_TOOLS/NEMOGCM/TOOLS/DMP_TOOLS
- Files:
-
- 1 added
- 3 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 -
branches/UKMO/dev_r5518_DMP_TOOLS/NEMOGCM/TOOLS/DMP_TOOLS/src/make_dmp_file.F90
r4745 r10199 94 94 IF (ln_coast) THEN 95 95 ! Reduce damping in vicinity of coastlines 96 CALL coast_dist_weight(resto )96 CALL coast_dist_weight(resto, ln_readdistcoast, jk) 97 97 ENDIF 98 98 ENDIF -
branches/UKMO/dev_r5518_DMP_TOOLS/NEMOGCM/TOOLS/DMP_TOOLS/src/utils.F90
r4739 r10199 46 46 LOGICAL :: ln_zero_top_layer = .false. 47 47 LOGICAL :: ln_custom = .false. 48 LOGICAL :: ln_readdistcoast = .false. 48 49 49 50 NAMELIST/nam_dmp_create/cp_cfg, cp_cfz, jp_cfg, lzoom, ln_full_field, & 50 51 ln_med_red_seas, ln_old_31_lev_code, ln_coast, & 51 52 ln_zero_top_layer, ln_custom, & 52 pn_surf, pn_bot, pn_dep, nn_hdmp, jperio 53 pn_surf, pn_bot, pn_dep, nn_hdmp, jperio, ln_readdistcoast 53 54 54 55 CONTAINS … … 72 73 CALL check_nf90( nf90_inq_varid( ncin, 'vmask', vmask_id ), 'Cannot get variable ID for vmask') 73 74 CALL check_nf90( nf90_inq_varid( ncin, 'fmask', fmask_id ), 'Cannot get variable ID for fmask') 74 CALL check_nf90( nf90_inq_varid( ncin, 'gdept _0', gdept_id ), 'Cannot get variable ID for gdept_0')75 CALL check_nf90( nf90_inq_varid( ncin, 'gdept', gdept_id ), 'Cannot get variable ID for gdept_0') 75 76 CALL check_nf90( nf90_inq_varid( ncin, 'gphit', gphit_id ), 'Cannot get variable ID for gphit') 76 77 CALL check_nf90( nf90_inq_varid( ncin, 'gphiu', gphiu_id ), 'Cannot get variable ID for gphiu')
Note: See TracChangeset
for help on using the changeset viewer.