Changeset 14433 for NEMO/trunk/tests/TSUNAMI/MY_SRC
- Timestamp:
- 2021-02-11T09:06:49+01:00 (3 years ago)
- Location:
- NEMO/trunk/tests/TSUNAMI/MY_SRC
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/tests/TSUNAMI/MY_SRC/usrdef_hgr.F90
r14225 r14433 64 64 ! 65 65 INTEGER :: ji, jj ! dummy loop indices 66 REAL(wp) :: zphi0, zlam0, zbeta, zf0 66 INTEGER :: ii0, ij0 ! dummy loop indices 67 REAL(wp) :: zbeta, zf0 67 68 REAL(wp) :: zti, ztj ! local scalars 68 69 !!------------------------------------------------------------------------------- … … 77 78 ! Position coordinates (in kilometers) 78 79 ! ========== 79 zlam0 = -REAL(Ni0glo, wp) * rn_0xratio * rn_dx80 zphi0 = -REAL(Nj0glo, wp) * rn_0yratio * rn_dy80 ii0 = NINT( REAL(Ni0glo, wp) * rn_0xratio ) 81 ij0 = NINT( REAL(Nj0glo, wp) * rn_0yratio ) 81 82 82 83 #if defined key_agrif 83 84 ! ! let lower left longitude and latitude from parent 84 85 IF (.NOT.Agrif_root()) THEN 85 zlam0 = (0.5_wp-(Agrif_parent(jpiglo)-1)/2)*Agrif_irhox()*rn_dx & 86 &+(Agrif_Ix()+nbghostcells-1)*Agrif_irhox()*rn_dx-(0.5_wp+nbghostcells)*rn_dx 87 zphi0 = (0.5_wp-(Agrif_parent(jpjglo)-1)/2)*Agrif_irhoy()*rn_dy & 88 &+(Agrif_Iy()+nbghostcells-1)*Agrif_irhoy()*rn_dy-(0.5_wp+nbghostcells)*rn_dy 86 to be coded... 89 87 ENDIF 90 88 #endif 91 89 92 90 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 93 zti = REAL( mig0(ji) , wp ) - 0.5_wp ! start at i=0.5in the global grid without halos94 ztj = REAL( mjg0(jj) , wp ) - 0.5_wp ! start at j=0.5in the global grid without halos91 zti = REAL( mig0(ji)-ii0, wp ) ! =0 at i=ii0 in the global grid without halos 92 ztj = REAL( mjg0(jj)-ij0, wp ) ! =0 at i=ij0 in the global grid without halos 95 93 96 plamt(ji,jj) = zlam0 +rn_dx * zti97 plamu(ji,jj) = zlam0 +rn_dx * ( zti + 0.5_wp )94 plamt(ji,jj) = rn_dx * zti 95 plamu(ji,jj) = rn_dx * ( zti + 0.5_wp ) 98 96 plamv(ji,jj) = plamt(ji,jj) 99 97 plamf(ji,jj) = plamu(ji,jj) 100 98 101 pphit(ji,jj) = zphi0 +rn_dy * ztj102 pphiv(ji,jj) = zphi0 +rn_dy * ( ztj + 0.5_wp )99 pphit(ji,jj) = rn_dy * ztj 100 pphiv(ji,jj) = rn_dy * ( ztj + 0.5_wp ) 103 101 pphiu(ji,jj) = pphit(ji,jj) 104 102 pphif(ji,jj) = pphiv(ji,jj) -
NEMO/trunk/tests/TSUNAMI/MY_SRC/usrdef_nam.F90
r14297 r14433 37 37 INTEGER , PUBLIC :: nn_fcase = 1 ! F computation (0:f0, 1:Beta, 2:real) 38 38 REAL(wp), PUBLIC :: rn_ppgphi0 = 38.5 ! reference latitude for beta-plane 39 INTEGER , PUBLIC :: nn_perio = 0 ! periodicity of the channel (0=closed, 1=E-W)40 39 41 40 !!---------------------------------------------------------------------- … … 46 45 CONTAINS 47 46 48 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio)47 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 49 48 !!---------------------------------------------------------------------- 50 49 !! *** ROUTINE dom_nam *** … … 58 57 !! ** input : - namusr_def namelist found in namelist_cfg 59 58 !!---------------------------------------------------------------------- 60 CHARACTER(len=*) , INTENT(out) :: cd_cfg ! configuration name 61 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 62 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 63 INTEGER , INTENT(out) :: kperio ! lateral global domain b.c. 59 CHARACTER(len=*), INTENT(out) :: cd_cfg ! configuration name 60 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 61 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 62 LOGICAL , INTENT(out) :: ldIperio, ldJperio ! i- and j- periodicity 63 LOGICAL , INTENT(out) :: ldNFold ! North pole folding 64 CHARACTER(len=1), INTENT(out) :: cdNFtype ! Folding type: T or F 64 65 ! 65 66 INTEGER :: ios ! Local integer 67 LOGICAL :: ln_Iperio, ln_Jperio 66 68 !! 67 69 NAMELIST/namusr_def/ rn_domszx, rn_domszy, rn_domszz, rn_dx, rn_dy, rn_0xratio, rn_0yratio & 68 & , nn_fcase, rn_ppgphi0, nn_perio70 & , nn_fcase, rn_ppgphi0, ln_Iperio, ln_Jperio 69 71 !!---------------------------------------------------------------------- 70 72 ! … … 85 87 #endif 86 88 ! 87 IF(lwm) WRITE( numond, namusr_def )88 !89 89 cd_cfg = 'TSUNAMI' ! name & resolution (not used) 90 90 kk_cfg = INT( rn_dx ) … … 92 92 IF( Agrif_Root() ) THEN ! Global Domain size: TSUNAMI global domain is 1800 km x 1800 Km x 5000 m 93 93 kpi = NINT( rn_domszx / rn_dx ) + 1 94 kpj = NINT( rn_domszy / rn_dy ) + 394 kpj = NINT( rn_domszy / rn_dy ) + 1 95 95 ELSE ! Global Domain size: add nbghostcells + 1 "land" point on each side 96 96 kpi = nbcellsx + nbghostcells_x + nbghostcells_x + 2 … … 98 98 ENDIF 99 99 kpk = 2 100 ! ! Set the lateral boundary condition of the global domain 101 kperio = 1 ! TSUNAMI configuration : closed basin 102 ! ! control print 100 ! ! Set the lateral boundary condition of the global domain 101 ! 102 ldIperio = ln_Iperio ; ldJperio = ln_Jperio 103 ldNFold = .FALSE. ; cdNFtype = '-' 104 ! 105 ! ! control print 103 106 IF(lwp) THEN 104 107 WRITE(numout,*) ' ' … … 115 118 WRITE(numout,*) ' F computation nn_fcase = ', nn_fcase 116 119 WRITE(numout,*) ' Reference latitude rn_ppgphi0 = ', rn_ppgphi0 117 WRITE(numout,*) ' Periodicity of the basin nn_perio = ', nn_perio120 WRITE(numout,*) ' ' 118 121 ENDIF 119 ! ! Set the lateral boundary condition of the global domain120 kperio = nn_perio ! TSUNAMI configuration : closed basin121 122 ! 122 123 END SUBROUTINE usr_def_nam -
NEMO/trunk/tests/TSUNAMI/MY_SRC/usrdef_sbc.F90
r14225 r14433 3 3 !! *** MODULE usrdef_sbc *** 4 4 !! 5 !! === CANALconfiguration ===5 !! === TSUNAMI configuration === 6 6 !! 7 7 !! User defined : surface forcing of a user configuration … … 44 44 !! condition, i.e. the momentum, heat and freshwater fluxes. 45 45 !! 46 !! ** Method : all 0 fields, for CANALcase46 !! ** Method : all 0 fields, for TSUNAMI case 47 47 !! CAUTION : never mask the surface stress field ! 48 48 !! … … 57 57 IF( kt == nit000 ) THEN 58 58 ! 59 IF(lwp) WRITE(numout,*)' usr_sbc : EW_CANALcase: surface forcing'59 IF(lwp) WRITE(numout,*)' usr_sbc : TSUNAMI case: surface forcing' 60 60 IF(lwp) WRITE(numout,*)' ~~~~~~~~~~~ vtau = taum = wndm = qns = qsr = emp = sfx = 0' 61 61 !
Note: See TracChangeset
for help on using the changeset viewer.