[11637] | 1 | MODULE usrdef_hgr |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE usrdef_hgr *** |
---|
| 4 | !! |
---|
| 5 | !! === STATION_ASF configuration === |
---|
| 6 | !! |
---|
| 7 | !! User defined : mesh and Coriolis parameter of a user configuration |
---|
| 8 | !!====================================================================== |
---|
| 9 | !! History : 4.0 ! 2016-03 (S. Flavoni) |
---|
| 10 | !! History : 4.0 ! 2019-10 (L. Brodeau) |
---|
| 11 | !!---------------------------------------------------------------------- |
---|
| 12 | |
---|
| 13 | !!---------------------------------------------------------------------- |
---|
[14770] | 14 | !! usr_def_hgr : initialize the horizontal mesh |
---|
[11637] | 15 | !!---------------------------------------------------------------------- |
---|
[14770] | 16 | USE dom_oce , ONLY: nimpp, njmpp ! ocean space and time domain |
---|
[11637] | 17 | USE c1d , ONLY: rn_lon1d, rn_lat1d ! ocean lon/lat define by namelist |
---|
| 18 | USE par_oce ! ocean space and time domain |
---|
| 19 | USE phycst ! physical constants |
---|
| 20 | USE usrdef_nam ! |
---|
| 21 | ! |
---|
| 22 | USE in_out_manager ! I/O manager |
---|
| 23 | USE lib_mpp ! MPP library |
---|
[14770] | 24 | |
---|
[11637] | 25 | IMPLICIT NONE |
---|
| 26 | PRIVATE |
---|
| 27 | |
---|
| 28 | PUBLIC usr_def_hgr ! called in domhgr.F90 |
---|
| 29 | |
---|
| 30 | !!---------------------------------------------------------------------- |
---|
| 31 | !! NEMO/OCE 4.0 , NEMO Consortium (2018) |
---|
[14770] | 32 | !! $Id: usrdef_hgr.F90 13216 2020-07-02 09:25:49Z rblod $ |
---|
[11637] | 33 | !! Software governed by the CeCILL license (see ./LICENSE) |
---|
| 34 | !!---------------------------------------------------------------------- |
---|
| 35 | CONTAINS |
---|
| 36 | |
---|
| 37 | SUBROUTINE usr_def_hgr( plamt , plamu , plamv , plamf , & ! geographic position (required) |
---|
| 38 | & pphit , pphiu , pphiv , pphif , & ! |
---|
| 39 | & kff , pff_f , pff_t , & ! Coriolis parameter (if domain not on the sphere) |
---|
| 40 | & pe1t , pe1u , pe1v , pe1f , & ! scale factors (required) |
---|
| 41 | & pe2t , pe2u , pe2v , pe2f , & ! |
---|
| 42 | & ke1e2u_v , pe1e2u , pe1e2v ) ! u- & v-surfaces (if gridsize reduction is used in strait(s)) |
---|
| 43 | !!---------------------------------------------------------------------- |
---|
| 44 | !! *** ROUTINE usr_def_hgr *** |
---|
| 45 | !! |
---|
| 46 | !! ** Purpose : user defined mesh and Coriolis parameter |
---|
| 47 | !! |
---|
| 48 | !! ** Method : set all intent(out) argument to a proper value |
---|
| 49 | !! |
---|
| 50 | !! Here STATION_ASF configuration : |
---|
[14770] | 51 | !! Rectangular 3x3 domain |
---|
[11637] | 52 | !! - Located at 150E-50N |
---|
[14770] | 53 | !! - a constant horizontal resolution |
---|
[11637] | 54 | !! |
---|
[14770] | 55 | !! ** Action : - define longitude & latitude of t-, u-, v- and f-points (in degrees) |
---|
[12629] | 56 | !! - define coriolis parameter at f-point if the domain in not on the sphere (on beta-plane) |
---|
[11637] | 57 | !! - define i- & j-scale factors at t-, u-, v- and f-points (in meters) |
---|
| 58 | !! - define u- & v-surfaces (if gridsize reduction is used in some straits) (in m2) |
---|
| 59 | !!---------------------------------------------------------------------- |
---|
| 60 | REAL(wp), DIMENSION(:,:), INTENT(out) :: plamt, plamu, plamv, plamf ! longitude outputs [degrees] |
---|
| 61 | REAL(wp), DIMENSION(:,:), INTENT(out) :: pphit, pphiu, pphiv, pphif ! latitude outputs [degrees] |
---|
| 62 | INTEGER , INTENT(out) :: kff ! =1 Coriolis parameter computed here, =0 otherwise |
---|
| 63 | REAL(wp), DIMENSION(:,:), INTENT(out) :: pff_f, pff_t ! Coriolis factor at f-point [1/s] |
---|
| 64 | REAL(wp), DIMENSION(:,:), INTENT(out) :: pe1t, pe1u, pe1v, pe1f ! i-scale factors [m] |
---|
| 65 | REAL(wp), DIMENSION(:,:), INTENT(out) :: pe2t, pe2u, pe2v, pe2f ! j-scale factors [m] |
---|
[14770] | 66 | INTEGER , INTENT(out) :: ke1e2u_v ! =1 u- & v-surfaces computed here, =0 otherwise |
---|
[11637] | 67 | REAL(wp), DIMENSION(:,:), INTENT(out) :: pe1e2u, pe1e2v ! u- & v-surfaces (if reduction in strait) [m2] |
---|
| 68 | ! |
---|
[11930] | 69 | REAL(wp) :: zf0 ! local scalar |
---|
[11637] | 70 | !!------------------------------------------------------------------------------- |
---|
| 71 | ! |
---|
| 72 | IF(lwp) WRITE(numout,*) |
---|
[11930] | 73 | IF(lwp) WRITE(numout,*) 'usr_def_hgr : STATION_ASF configuration' |
---|
[11637] | 74 | IF(lwp) WRITE(numout,*) '~~~~~~~~~~~ uniform grid spacing WITH Coriolis force' |
---|
[11930] | 75 | IF(lwp) WRITE(numout,*) ' coordinates of station =>', rn_lon1d, rn_lat1d |
---|
[11637] | 76 | ! |
---|
| 77 | ! !== grid point position ==! (Special case of 1D config: all lon/lat are the same) |
---|
| 78 | ! ! longitude |
---|
| 79 | plamt(:,:) = rn_lon1d |
---|
[14770] | 80 | plamu(:,:) = rn_lon1d |
---|
[11637] | 81 | plamv(:,:) = rn_lon1d |
---|
| 82 | plamf(:,:) = rn_lon1d |
---|
| 83 | ! ! latitude |
---|
| 84 | pphit(:,:) = rn_lat1d |
---|
| 85 | pphiu(:,:) = rn_lat1d |
---|
| 86 | pphiv(:,:) = rn_lat1d |
---|
| 87 | pphif(:,:) = rn_lat1d |
---|
[11930] | 88 | |
---|
[11637] | 89 | ! !== Horizontal scale factors ==! (in meters) |
---|
| 90 | ! ! constant grid spacing |
---|
| 91 | pe1t(:,:) = 100. ; pe2t(:,:) = 100. |
---|
| 92 | pe1u(:,:) = 100. ; pe2u(:,:) = 100. |
---|
| 93 | pe1v(:,:) = 100. ; pe2v(:,:) = 100. |
---|
| 94 | pe1f(:,:) = 100. ; pe2f(:,:) = 100. |
---|
| 95 | ! |
---|
[14770] | 96 | ! ! NO reduction of grid size in some straits |
---|
[11637] | 97 | ke1e2u_v = 0 ! ==>> u_ & v_surfaces will be computed in dom_ghr routine |
---|
| 98 | pe1e2u(:,:) = 0._wp ! CAUTION: set to zero to avoid error with some compilers that |
---|
| 99 | pe1e2v(:,:) = 0._wp ! require an initialization of INTENT(out) arguments |
---|
| 100 | ! |
---|
| 101 | ! |
---|
| 102 | ! !== Coriolis parameter ==! |
---|
[14770] | 103 | zf0 = 2._wp * omega * SIN( rad * rn_lat1d ) |
---|
[11930] | 104 | pff_f(:,:) = zf0 |
---|
[14770] | 105 | pff_t(:,:) = zf0 |
---|
[11930] | 106 | kff = 1 ! indicate to skip computing Coriolis parameter afterward |
---|
[11637] | 107 | ! |
---|
| 108 | END SUBROUTINE usr_def_hgr |
---|
| 109 | |
---|
| 110 | !!====================================================================== |
---|
| 111 | END MODULE usrdef_hgr |
---|