Changeset 4739 for branches/2014/dev_r4650_UKMO3_masked_damping/NEMOGCM/TOOLS/DMP_TOOLS/src/zoom.F90
- Timestamp:
- 2014-08-13T10:46:04+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2014/dev_r4650_UKMO3_masked_damping/NEMOGCM/TOOLS/DMP_TOOLS/src/zoom.F90
r4738 r4739 18 18 !! ** Action : - resto, the damping coeff. for T and S 19 19 !!---------------------------------------------------------------------- 20 REAL( 8), DIMENSION(jpi,jpj), INTENT(inout) :: presto ! restoring coeff. (s-1)21 REAL( 8), DIMENSION(jpi,jpj), INTENT(in) :: mask ! restoring coeff. (s-1)20 REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) :: presto ! restoring coeff. (s-1) 21 REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: mask ! restoring coeff. (s-1) 22 22 ! 23 23 INTEGER :: ji, jj, jn ! dummy loop indices 24 REAL(8) :: zlat, zlat0, zlat1, zlat2, z1_5d ! local scalar 25 REAL(8), DIMENSION(6) :: zfact ! 1Dworkspace 24 REAL(wp) :: zlat, zlat0, zlat1, zlat2, z1_5d ! local scalar 25 REAL(wp), DIMENSION(6) :: zfact ! 1Dworkspace 26 27 !Namelist variables 28 LOGICAL :: lzoom_w, lzoom_e, lzoom_n, lzoom_s 29 NAMELIST/nam_zoom_dmp/lzoom_n,lzoom_e,lzoom_w,lzoom_s 26 30 !!---------------------------------------------------------------------- 27 31 ! … … 29 33 ! 30 34 35 ! Read namelist 36 OPEN( UNIT=numnam, FILE='namelist', FORM='FORMATTED', STATUS='OLD' ) 37 READ( numnam, nam_dmp_create ) 38 CLOSE( numnam ) 31 39 32 zfact(1) = 1. 33 zfact(2) = 1. 34 zfact(3) = 11. / 12.35 zfact(4) = 8. / 12.36 zfact(5) = 4. / 12.37 zfact(6) = 1. / 12.38 zfact(:) = zfact(:) / ( 5. * rday ) ! 5 days max restoring time scale40 zfact(1) = 1._wp 41 zfact(2) = 1._wp 42 zfact(3) = 11._wp / 12._wp 43 zfact(4) = 8._wp / 12._wp 44 zfact(5) = 4._wp / 12._wp 45 zfact(6) = 1._wp / 12._wp 46 zfact(:) = zfact(:) / ( 5._wp * rday ) ! 5 days max restoring time scale 39 47 40 presto(:,:) = 0. 48 presto(:,:) = 0._wp 41 49 42 50 ! damping along the forced closed boundary over 6 grid-points … … 51 59 IF( cp_cfz == "arctic" .OR. cp_cfz == "antarctic" ) THEN ! ORCA configuration : arctic or antarctic zoom 52 60 ! ! ==================================================== 53 IF(lwp)WRITE(numout,*)54 IF( lwp .AND.cp_cfz == "arctic" ) WRITE(numout,*) ' dtacof_zoom : ORCA Arctic zoom'55 IF( lwp .AND.cp_cfz == "antarctic" ) WRITE(numout,*) ' dtacof_zoom : ORCA Antarctic zoom'56 IF(lwp)WRITE(numout,*)61 WRITE(numout,*) 62 IF(cp_cfz == "arctic" ) WRITE(numout,*) ' dtacof_zoom : ORCA Arctic zoom' 63 IF(cp_cfz == "antarctic" ) WRITE(numout,*) ' dtacof_zoom : ORCA Antarctic zoom' 64 WRITE(numout,*) 57 65 ! 58 66 ! ! Initialization : 59 presto(:,:) = 0. 60 zlat0 = 10. ! zlat0 : latitude strip where resto decreases61 zlat1 = 30. ! zlat1 : resto = 1 before zlat167 presto(:,:) = 0._wp 68 zlat0 = 10._wp ! zlat0 : latitude strip where resto decreases 69 zlat1 = 30._wp ! zlat1 : resto = 1 before zlat1 62 70 zlat2 = zlat1 + zlat0 ! zlat2 : resto decreases from 1 to 0 between zlat1 and zlat2 63 z1_5d = 1. / ( 5.* rday ) ! z1_5d : 1 / 5days71 z1_5d = 1._wp / ( 5._wp * rday ) ! z1_5d : 1 / 5days 64 72 65 73 DO jj = 1, jpj … … 67 75 zlat = ABS( gphit(ji,jj) ) 68 76 IF( zlat1 <= zlat .AND. zlat <= zlat2 ) THEN 69 presto(ji,jj) = 0.5 * z1_5d * ( 1.- COS( rpi*(zlat2-zlat)/zlat0 ) )77 presto(ji,jj) = 0.5_wp * z1_5d * ( 1._wp - COS( rpi*(zlat2-zlat)/zlat0 ) ) 70 78 ELSEIF( zlat < zlat1 ) THEN 71 79 presto(ji,jj) = z1_5d
Note: See TracChangeset
for help on using the changeset viewer.