Changeset 6914 for branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/LOCK_EXCHANGE/MY_SRC/usrdef_zgr.F90
- Timestamp:
- 2016-09-06T13:27:38+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/LOCK_EXCHANGE/MY_SRC/usrdef_zgr.F90
r6906 r6914 2 2 !!============================================================================== 3 3 !! *** MODULE usrdef_zgr *** 4 !! 5 !! === LOCK_EXCHANGE case === 6 !! 4 7 !! Ocean domain : user defined vertical coordinate system 5 !!6 !! === LOCK_EXCHANGE case ===7 !!8 8 !!============================================================================== 9 !! History : 4.0 ! 2016-08 (G. Madec ) Original code9 !! History : 4.0 ! 2016-08 (G. Madec, S. Flavoni) Original code 10 10 !!---------------------------------------------------------------------- 11 11 12 12 !!---------------------------------------------------------------------- 13 !! usr_def_zgr : user defined vertical coordinate system (required) 14 !! zgr_z1d : reference 1D z-coordinate 15 !! zgr_zps : 3D vertical coordinate in z-partial cell coordinate 13 !! usr_def_zgr : user defined vertical coordinate system (required) 14 !! zgr_z1d : reference 1D z-coordinate 16 15 !!--------------------------------------------------------------------- 17 USE oce ! ocean variables 18 USE dom_oce , ONLY: ln_zco, ln_zps, ln_sco ! ocean space and time domain 19 USE dom_oce , ONLY: nimpp, njmpp ! ocean space and time domain 20 USE dom_oce , ONLY: glamt ! ocean space and time domain 21 USE usrdef_nam ! User defined : namelist variables 16 USE oce ! ocean variables 17 USE dom_oce , ONLY: ln_zco, ln_zps, ln_sco ! ocean space and time domain 18 USE usrdef_nam ! User defined : namelist variables 22 19 ! 23 USE in_out_manager 24 USE lbclnk 25 USE lib_mpp 26 USE wrk_nemo 27 USE timing 20 USE in_out_manager ! I/O manager 21 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 22 USE lib_mpp ! distributed memory computing library 23 USE wrk_nemo ! Memory allocation 24 USE timing ! Timing 28 25 29 26 IMPLICIT NONE … … 62 59 INTEGER , DIMENSION(:,:) , INTENT(out) :: k_top, k_bot ! first & last ocean level 63 60 ! 64 INTEGER :: ji, jj, jk ! dummy indices 65 INTEGER :: ik ! local integers 66 REAL(wp) :: zfact, z1_jpkm1 ! local scalar 67 REAL(wp) :: ze3min ! local scalar 68 REAL(wp), DIMENSION(jpi,jpj) :: zht, zhu, z2d ! 2D workspace 61 INTEGER :: jk ! dummy indices 62 REAL(wp), DIMENSION(jpi,jpj) :: z2d ! 2D workspace 69 63 !!---------------------------------------------------------------------- 70 64 ! … … 77 71 ! --------------------------- 78 72 ! set in usrdef_nam.F90 by reading the namusr_def namelist only ln_zco 73 ln_zco = .TRUE. ! z-partial-step coordinate 79 74 ln_zps = .FALSE. ! z-partial-step coordinate 80 75 ln_sco = .FALSE. ! s-coordinate … … 87 82 ! !== UNmasked meter bathymetry ==! 88 83 ! 89 ! flat bassin (20m deep and 64000m wide )84 ! flat bassin (20m deep and 64000m wide, set through the jpk and jpi (see userdef_nam.F90)) 90 85 CALL zgr_z1d( pdept_1d, pdepw_1d, pe3t_1d , pe3w_1d ) ! Reference z-coordinate system 91 86 ! … … 96 91 ! the ocean basin surrounded by land (1 grid-point) set through lbc_lnk call as jperio=0 97 92 z2d(:,:) = 1._wp ! surface ocean is the 1st level 98 CALL lbc_lnk( z2d, 'T', 1. ) ! closed basin 99 k_top(:,:) = z2d(:,:)93 CALL lbc_lnk( z2d, 'T', 1. ) ! closed basin since jperio = 0 (see userdef_nam.F90) 94 k_top(:,:) = NINT( z2d(:,:) ) 100 95 ! 101 96 ! 102 IF ( ln_zco ) THEN !== z-coordinate ==! (step-like topography) 103 ! 104 ! !* bottom ocean compute from the depth of grid-points 105 k_bot(:,:) = jpkm1 * k_top(:,:) ! here use k_top as a land mask 106 ! !* horizontally uniform coordinate (reference z-co everywhere) 107 DO jk = 1, jpk 108 pdept(:,:,jk) = pdept_1d(jk) 109 pdepw(:,:,jk) = pdepw_1d(jk) 110 pe3t (:,:,jk) = pe3t_1d (jk) 111 pe3u (:,:,jk) = pe3t_1d (jk) 112 pe3v (:,:,jk) = pe3t_1d (jk) 113 pe3f (:,:,jk) = pe3t_1d (jk) 114 pe3w (:,:,jk) = pe3w_1d (jk) 115 pe3uw(:,:,jk) = pe3w_1d (jk) 116 pe3vw(:,:,jk) = pe3w_1d (jk) 117 END DO 118 ENDIF 97 ! !== z-coordinate ==! (step-like topography) 119 98 ! 99 ! !* bottom ocean compute from the depth of grid-points 100 k_bot(:,:) = jpkm1 * k_top(:,:) ! here use k_top as a land mask 101 ! !* horizontally uniform coordinate (reference z-co everywhere) 102 DO jk = 1, jpk 103 pdept(:,:,jk) = pdept_1d(jk) 104 pdepw(:,:,jk) = pdepw_1d(jk) 105 pe3t (:,:,jk) = pe3t_1d (jk) 106 pe3u (:,:,jk) = pe3t_1d (jk) 107 pe3v (:,:,jk) = pe3t_1d (jk) 108 pe3f (:,:,jk) = pe3t_1d (jk) 109 pe3w (:,:,jk) = pe3w_1d (jk) 110 pe3uw(:,:,jk) = pe3w_1d (jk) 111 pe3vw(:,:,jk) = pe3w_1d (jk) 112 END DO 120 113 ! 121 114 END SUBROUTINE usr_def_zgr
Note: See TracChangeset
for help on using the changeset viewer.