Changeset 14976 for NEMO/trunk/tests/DOME/MY_SRC/usrdef_hgr.F90
- Timestamp:
- 2021-06-11T11:14:27+02:00 (3 years ago)
- Location:
- NEMO/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk
- Property svn:externals
-
old new 3 3 ^/utils/build/mk@HEAD mk 4 4 ^/utils/tools@HEAD tools 5 ^/vendors/AGRIF/dev @HEAD ext/AGRIF5 ^/vendors/AGRIF/dev_r14608_AGRIF_domcfg@HEAD ext/AGRIF 6 6 ^/vendors/FCM@HEAD ext/FCM 7 7 ^/vendors/IOIPSL@HEAD ext/IOIPSL
-
- Property svn:externals
-
NEMO/trunk/tests/DOME/MY_SRC/usrdef_hgr.F90
r14254 r14976 23 23 IMPLICIT NONE 24 24 PRIVATE 25 26 REAL(wp) :: roffsetx, roffsety ! Offset in km to first f-point 25 27 26 28 PUBLIC usr_def_hgr ! called by domhgr.F90 … … 64 66 ! 65 67 INTEGER :: ji, jj ! dummy loop indices 66 REAL(wp) :: zphi0, zlam067 68 REAL(wp) :: zti, ztj ! local scalars 68 69 !!------------------------------------------------------------------------------- … … 77 78 ! Position coordinates (in kilometers) 78 79 ! ========== 79 zlam0 = -REAL( 0.5 + 1700._wp * 1.e3 / rn_dx) 80 zphi0 = -REAL( 0.5 + 800._wp * 1.e3 / rn_dy) 80 ! Offsets in km of the first south west f-point: 81 roffsetx = -1700._wp 82 roffsety = -800._wp 81 83 #if defined key_agrif 82 IF( .NOT.Agrif_Root() ) THEN 83 zlam0 = - REAL( 0.5 + 1700._wp * 1.e3 / rn_dx + nbghostcells) & 84 & + REAL((nbghostcells + Agrif_Ix() - 1)*Agrif_irhox()) 85 zphi0 = - REAL( 0.5 + 800._wp * 1.e3 / rn_dy + nbghostcells) & 86 & + REAL((nbghostcells + Agrif_Iy() - 1)*Agrif_irhoy()) 87 ENDIF 84 IF( .NOT.Agrif_Root() ) THEN 85 ! deduce offset from parent: 86 roffsetx = Agrif_Parent(roffsetx) & 87 & + (-(nbghostcells_x - 1) + (Agrif_Parent(nbghostcells_x ) & 88 & + Agrif_Ix()-2)*Agrif_Rhox()) * 1.e-3 * rn_dx 89 roffsety = Agrif_Parent(roffsety) & 90 & + (-(nbghostcells_y_s - 1) + (Agrif_Parent(nbghostcells_y_s) & 91 & + Agrif_Iy()-2)*Agrif_Rhoy()) * 1.e-3 * rn_dy 92 ENDIF 88 93 #endif 89 94 90 DO_2D( 1, 1, 1, 1)91 zti = REAL( mig0 _oldcmp(ji) - 1, wp ) ! start at i=0 in the global grid without halos92 ztj = REAL( mjg0 _oldcmp(jj) - 1, wp ) ! start at j=0 in the global grid without halos95 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 96 zti = REAL( mig0(ji) - 1, wp ) ! start at i=0 in the global grid without halos 97 ztj = REAL( mjg0(jj) - 1, wp ) ! start at j=0 in the global grid without halos 93 98 94 plamt(ji,jj) = r n_dx * 1.e-3 * ( zlam0 + zti)95 plamu(ji,jj) = r n_dx * 1.e-3 * ( zlam0 + zti + 0.5_wp )99 plamt(ji,jj) = roffsetx + rn_dx * 1.e-3 * ( zti - 0.5_wp ) 100 plamu(ji,jj) = roffsetx + rn_dx * 1.e-3 * zti 96 101 plamv(ji,jj) = plamt(ji,jj) 97 102 plamf(ji,jj) = plamu(ji,jj) 98 103 99 pphit(ji,jj) = r n_dy * 1.e-3 * ( zphi0 + ztj)100 pphiv(ji,jj) = r n_dy * 1.e-3 * ( zphi0 + ztj + 0.5_wp )104 pphit(ji,jj) = roffsety + rn_dy * 1.e-3 * ( ztj - 0.5_wp ) 105 pphiv(ji,jj) = roffsety + rn_dy * 1.e-3 * ztj 101 106 pphiu(ji,jj) = pphit(ji,jj) 102 107 pphif(ji,jj) = pphiv(ji,jj)
Note: See TracChangeset
for help on using the changeset viewer.