Changeset 6900 for branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/OVERFLOW/MY_SRC/usrdef_hgr.F90
- Timestamp:
- 2016-08-29T17:55:22+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/OVERFLOW/MY_SRC/usrdef_hgr.F90
r6895 r6900 2 2 !!============================================================================== 3 3 !! *** MODULE usrdef_hgr *** 4 !! User defined module: used like example to define domain, init, sbc, ... 4 !! 5 !! === OVERFLOW configuration === 6 !! 7 !! User defined : horizontal mesh 5 8 !!============================================================================== 6 !! History : NEMO ! 2016-03 (S. Flavoni)9 !! History : NEMO ! 2016-08 (S. Flavoni, G. Madec) Original code 7 10 !!---------------------------------------------------------------------- 8 11 9 12 !!---------------------------------------------------------------------- 10 !! usr_def_hgr : initialize the horizontal mesh13 !! usr_def_hgr : initialize the horizontal mesh for OVERFLOW configuration 11 14 !!---------------------------------------------------------------------- 12 USE dom_oce , ONLY: nimpp, njmpp ! ocean space and time domain13 USE par_oce ! ocean space and time domain14 USE phycst ! physical constants15 USE usrdef_nam !15 USE dom_oce , ONLY: nimpp, njmpp ! ocean space and time domain 16 USE par_oce ! ocean space and time domain 17 USE phycst ! physical constants 18 USE usrdef_nam, ONLY: rn_dx ! horizontal resolution in meters 16 19 ! 17 USE in_out_manager ! I/O manager18 USE lib_mpp ! MPP library19 USE timing ! Timing20 USE in_out_manager ! I/O manager 21 USE lib_mpp ! MPP library 22 USE timing ! Timing 20 23 21 24 IMPLICIT NONE … … 43 46 !! 44 47 !! ** Method : set all intent(out) argument to a proper value 45 !! 46 !! Here OVERFLOW configuration : 47 !! periodic domain (north/south) over an overflow bathymetry 48 !! - on a beta-plane 49 !! - with NO Coriolis 48 !! OVERFLOW configuration : uniform grid spacing (1km) 49 !! without Coriolis force (f=0) 50 50 !! 51 51 !! ** Action : - define longitude & latitude of t-, u-, v- and f-points (in degrees) … … 63 63 REAL(wp), DIMENSION(:,:), INTENT(out) :: pe1e2u, pe1e2v ! u- & v-surfaces (if reduction in strait) [m2] 64 64 ! 65 INTEGER :: ji, jj ! dummy loop indices 66 REAL(wp) :: zlam1, zlam0, zcos_alpha, zim1 , zjm1 , ze1 , ze1deg, zf0 ! local scalars 67 REAL(wp) :: zphi1, zphi0, zsin_alpha, zim05, zjm05, zbeta, znorme ! - - 65 INTEGER :: ji, jj ! dummy loop indices 66 REAL(wp) :: zfact ! local scalars 68 67 !!------------------------------------------------------------------------------- 69 68 ! 70 69 IF( nn_timing == 1 ) CALL timing_start('usr_def_hgr') 71 70 ! 72 ! !== beta-plane with regular grid-spacing and rotated domain ==! (OVERFLOW configuration) 71 IF(lwp) WRITE(numout,*) 72 IF(lwp) WRITE(numout,*) 'usr_def_hgr : OVERFLOW configuration bassin' 73 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~ uniform 1km grid spacing WITHOUT Coriolis force (f=0)' 73 74 ! 74 IF(lwp) WRITE(numout,*) 75 IF(lwp) WRITE(numout,*) 'usr_def_hgr : OVERFLOW configuration bassin on beta-plane with NO Coriolis)' 76 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~' 77 ! 78 ! 79 ! !== grid point position ==! 80 ! !== f-plane with regular grid-spacing ==! 81 ! 82 IF(lwp) WRITE(numout,*) 83 IF(lwp) WRITE(numout,*) ' OVERFLOW f-plane with regular grid-spacing' 84 ! 85 ! Position coordinates 86 ! ========== 75 ! !== grid point position ==! (in kilometers) 76 zfact = rn_dx * 1.e-3 ! conversion in km 87 77 DO jj = 1, jpj 88 DO ji = 1, jpi 89 ! glamt(i,j) longitude at T-point 90 pglamt(ji,jj) = - 0.5 + ( REAL( ji - 1 + nimpp - 1 ) ) 91 ! glamu(i,j) longitude at U-point 92 pglamu(ji,jj) = - 0.5 + ( REAL( ji - 1 + nimpp - 1 ) + 0.5 ) 93 ! glamv(i,j) longitude at V-point 78 DO ji = 1, jpi ! longitude 79 pglamt(ji,jj) = zfact * ( - 0.5 + ( REAL( ji-1 + nimpp-1 ) , wp ) ) 80 pglamu(ji,jj) = zfact * ( - 0.5 + ( REAL( ji-1 + nimpp-1 ) + 0.5 , wp ) ) 94 81 pglamv(ji,jj) = pglamt(ji,jj) 95 ! glamf(i,j) longitude at F-point96 82 pglamf(ji,jj) = pglamu(ji,jj) 97 ! 98 !gphit(i,j) latitude at T-point 99 pgphit(ji,jj) = - 0.5 + ( REAL( jj - 1 + njmpp - 1 ) ) 100 !gphiu(i,j) latitude at U-point 83 ! ! latitude 84 pgphit(ji,jj) = zfact * ( - 0.5 + ( REAL( jj-1 + njmpp-1 ) , wp ) ) 101 85 pgphiu(ji,jj) = pgphit(ji,jj) 102 !gphiv(i,j) latitude at V-point 103 pgphiv(ji,jj) = - 0.5 + ( REAL( jj - 1 + njmpp - 1 ) + 0.5 ) 104 !gphif(i,j) latitude at F-point 86 pgphiv(ji,jj) = zfact * ( - 0.5 + ( REAL( jj-1 + njmpp-1 ) + 0.5 , wp ) ) 105 87 pgphif(ji,jj) = pgphiv(ji,jj) 106 88 END DO 107 89 END DO 108 90 ! 109 ! Horizontal scale factors (in meters) 110 ! ====== 111 pe1t(:,:) = 1000 ; pe2t(:,:) = 1000 112 pe1u(:,:) = 1000 ; pe2u(:,:) = 1000 113 pe1v(:,:) = 1000 ; pe2v(:,:) = 1000 114 pe1f(:,:) = 1000 ; pe2f(:,:) = 1000 91 ! !== Horizontal scale factors ==! (in meters) 92 pe1t(:,:) = rn_dx ; pe2t(:,:) = rn_dx 93 pe1u(:,:) = rn_dx ; pe2u(:,:) = rn_dx 94 pe1v(:,:) = rn_dx ; pe2v(:,:) = rn_dx 95 pe1f(:,:) = rn_dx ; pe2f(:,:) = rn_dx 115 96 ! 116 ! 117 ke1e2u_v = 0 97 ! ! NO reduction of grid size in some straits 98 ke1e2u_v = 0 ! ==>> u_ & v_surfaces will be computed in dom_ghr routine 118 99 ! 119 100 ! 120 101 ! !== Coriolis parameter ==! 121 kff = 1 ! indicate not to compute ffafterward102 kff = 1 ! indicate not to compute Coriolis parameter afterward 122 103 ! 123 pff_f(:,:) = 0 124 pff_t(:,:) = 0 125 ! 126 IF(lwp) WRITE(numout,*) ' beta-plane used. beta = ', zbeta, ' 1/(s.m)' 104 pff_f(:,:) = 0._wp ! here No earth rotation: f=0 105 pff_t(:,:) = 0._wp 127 106 ! 128 107 IF( nn_timing == 1 ) CALL timing_stop('usr_def_hgr')
Note: See TracChangeset
for help on using the changeset viewer.