Changeset 15745 for NEMO/branches/UKMO/tools_r4.0-HEAD_dev_DMP_TOOLS/DMP_TOOLS/src/make_dmp_file.F90
- Timestamp:
- 2022-03-08T18:55:08+01:00 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/UKMO/tools_r4.0-HEAD_dev_DMP_TOOLS/DMP_TOOLS/src/make_dmp_file.F90
r4745 r15745 49 49 50 50 ALLOCATE( resto(jpi, jpj) ) 51 ALLOCATE( dcst(jpi, jpj) ) 51 52 52 53 !Create output file … … 57 58 !Calculate surface and bottom damping coefficients 58 59 zsdmp = 1._wp / ( pn_surf * rday ) 59 zbdmp = 1._wp / ( pn_bot * rday ) 60 IF (pn_bot > 0.) THEN 61 zbdmp = 1._wp / ( pn_bot * rday ) 62 ELSE 63 zbdmp = 0. 64 ENDIF 65 66 ! Calculate distance from the coast 67 IF (ln_coast) CALL cofdis( dcst ) 60 68 61 69 !Loop through levels and read in tmask for each level as starting point for … … 74 82 DO jj = 1, jpj 75 83 DO ji = 1, jpi 76 resto(ji,jj) = tmask(ji, jj) * (zbdmp + (zsdmp-zbdmp) * EXP(-gdept(ji,jj)/pn_dep)) 84 IF ( ln_exp ) THEN 85 resto(ji,jj) = tmask(ji, jj) * (zbdmp + (zsdmp-zbdmp) * EXP(-gdept(ji,jj)/pn_dep)) 86 ELSE 87 resto(ji,jj) = tmask(ji, jj) * (zbdmp + (zsdmp-zbdmp) / & 88 & (1._wp + EXP(rn_k * (gdept(ji,jj) - pn_dep) / 100._wp))) 89 ENDIF 77 90 END DO 78 91 END DO … … 94 107 IF (ln_coast) THEN 95 108 ! Reduce damping in vicinity of coastlines 96 CALL coast_dist_weight(resto )109 CALL coast_dist_weight(resto, dcst) 97 110 ENDIF 98 111 ENDIF … … 109 122 !Any user modifications can be added in the custom module 110 123 IF ( ln_custom ) THEN 111 CALL custom_resto( resto ) 124 WHERE (resto(:,:) <= 1.e-07) resto(:,:) = 0._wp 125 !CALL custom_resto( resto ) 112 126 ENDIF 113 127 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.