Changeset 15745
- Timestamp:
- 2022-03-08T18:55:08+01:00 (2 years ago)
- Location:
- NEMO/branches/UKMO/tools_r4.0-HEAD_dev_DMP_TOOLS/DMP_TOOLS
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/UKMO/tools_r4.0-HEAD_dev_DMP_TOOLS/DMP_TOOLS/namelist
r4745 r15745 1 1 &nam_dmp_create 2 cp_cfg = 'orca' ! Name of model grid (orca and C1D have special options - otherwise ignored) 3 cp_cfz = 'antarctic' ! Name of zoom configuration (arctic and antarctic have some special treatment if lzoom=.true.) 4 jp_cfg = 2 ! Resolution of the model (used for med_red_seas damping) 5 lzoom = .false. ! Zoom configuration or not 6 ln_full_field = .false. ! Calculate coefficient over whole of domain 7 ln_med_red_seas = .true. ! Damping in Med/Red Seas (or local modifications here if ln_full_field=.true.) 8 ln_old_31_lev_code = .true. ! Replicate behaviour of old online code for 31 level model (Med/Red seas damping based on level number instead of depth) 9 ln_coast = .true. ! Reduce near to coastlines 10 ln_zero_top_layer = .true. ! No damping in top layer 11 ln_custom = .false. ! Call "custom" module to apply user modifications to the damping coefficient field 12 nn_hdmp = 10 ! Damp poleward of this latitude (smooth transition up to maximum damping) 13 pn_surf = 0.25 ! Surface Relaxation timescale (days) 14 pn_bot = 0.25 ! Bottom relaxation timescale (days) 15 pn_dep = 1000 ! Transition depth from upper to deep ocean 16 jperio = 2 ! Lateral boundary condition (as specified in namelist_cfg for model run). 2 cp_cfg = 'orca025' ! Name of model grid (orca and C1D have 3 ! special options - otherwise ignored) 4 cp_cfz = 'antarctic' ! Name of zoom configuration (arctic and 5 ! antarctic have some special 6 ! treatment if lzoom=.true.) 7 jp_cfg = 2 ! Resolution of the model (used for med_red_seas damping) 8 lzoom = .false. ! Zoom configuration or not 9 ln_full_field = .true. ! Calculate coefficient over whole of domain 10 ln_med_red_seas = .false. ! Damping in Med/Red Seas (or local modifications 11 ! here if ln_full_field=.true.) 12 ln_old_31_lev_code = .false. ! Replicate behaviour of old online code for 31 level model 13 ! (Med/Red seas damping based on level number instead of depth) 14 ln_coast = .true. ! Reduce near to coastlines 15 ln_zero_top_layer = .false. ! No damping in top layer 16 ln_custom = .true. ! Call "custom" module to apply user modifications to 17 ! the damping coefficient field 18 nn_hdmp = 0 ! Damp poleward of this latitude 19 ! (smooth transition up to maximum damping) 20 pn_surf = 0.25 ! Surface Relaxation timescale (days) 21 pn_bot = 0. ! Bottom relaxation timescale (days) 22 ln_exp = .false. ! Using exponential (T) or logistic (F) 23 ! vertical decay of restoring 24 pn_dep = 250. ! Transition depth from upper to deep ocean 25 ! (value of the sigmoid's midpoint if logistic decay) 26 rn_k = 4. ! steepness of logistic curve 27 pn_cst = 200. ! distance from the coast (km) 28 jperio = 4 ! Lateral boundary condition 29 ! (as specified in namelist_cfg for model run). 17 30 / 18 31 -
NEMO/branches/UKMO/tools_r4.0-HEAD_dev_DMP_TOOLS/DMP_TOOLS/src/coast_dist.F90
r4739 r15745 9 9 CONTAINS 10 10 11 SUBROUTINE coast_dist_weight( presto )11 SUBROUTINE coast_dist_weight( presto, zdct ) 12 12 !!---------------------------------------------------------------------- 13 13 !! *** ROUTINE coast_dist_weight *** … … 20 20 IMPLICIT NONE 21 21 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 26 27 27 28 28 CALL cofdis( zdct ) 29 zinfl = pn_cst * 1000._wp ! in m 30 31 !CALL cofdis( zdct ) 29 32 DO jj = 1, jpj 30 33 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) ) 33 38 END DO 34 39 END DO -
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 -
NEMO/branches/UKMO/tools_r4.0-HEAD_dev_DMP_TOOLS/DMP_TOOLS/src/utils.F90
r4739 r15745 19 19 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: gphif, glamf 20 20 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: tmask, umask, vmask, fmask 21 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: dcst 21 22 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: gdept 22 23 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: resto … … 37 38 REAL(KIND=8) :: pn_bot = 1 38 39 REAL(KIND=8) :: pn_dep = 1000 40 REAL(KIND=8) :: pn_cst = 1000 41 REAL(KIND=8) :: rn_k = 50 39 42 INTEGER :: nn_hdmp = 0 ! damping option 40 43 INTEGER :: jperio = 0 ! damping option … … 46 49 LOGICAL :: ln_zero_top_layer = .false. 47 50 LOGICAL :: ln_custom = .false. 51 LOGICAL :: ln_exp = .true. 48 52 49 NAMELIST/nam_dmp_create/cp_cfg, cp_cfz, jp_cfg, lzoom, ln_full_field, &53 NAMELIST/nam_dmp_create/cp_cfg, cp_cfz, jp_cfg, lzoom, ln_full_field, & 50 54 ln_med_red_seas, ln_old_31_lev_code, ln_coast, & 51 ln_zero_top_layer, ln_custom, &52 pn_surf, pn_bot, pn_dep, nn_hdmp, jperio55 ln_zero_top_layer, ln_custom, ln_exp, & 56 pn_surf, pn_bot, pn_dep, rn_k, pn_cst, nn_hdmp, jperio 53 57 54 58 CONTAINS
Note: See TracChangeset
for help on using the changeset viewer.