Changeset 11573 for NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp/tests/VORTEX/MY_SRC/usrdef_nam.F90
- Timestamp:
- 2019-09-19T11:18:03+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp/tests/VORTEX/MY_SRC/usrdef_nam.F90
r10074 r11573 40 40 CONTAINS 41 41 42 SUBROUTINE usr_def_nam( ldtxt, ldnam,cd_cfg, kk_cfg, kpi, kpj, kpk, kperio )42 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 43 43 !!---------------------------------------------------------------------- 44 44 !! *** ROUTINE dom_nam *** … … 52 52 !! ** input : - namusr_def namelist found in namelist_cfg 53 53 !!---------------------------------------------------------------------- 54 CHARACTER(len=*), DIMENSION(:), INTENT(out) :: ldtxt, ldnam ! stored print information55 54 CHARACTER(len=*) , INTENT(out) :: cd_cfg ! configuration name 56 55 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution … … 58 57 INTEGER , INTENT(out) :: kperio ! lateral global domain b.c. 59 58 ! 60 INTEGER :: ios , ii! Local integer59 INTEGER :: ios ! Local integer 61 60 REAL(wp):: zlx, zly, zh ! Local scalars 62 61 !! … … 64 63 !!---------------------------------------------------------------------- 65 64 ! 66 ii = 167 !68 65 REWIND( numnam_cfg ) ! Namelist namusr_def (exist in namelist_cfg only) 69 66 READ ( numnam_cfg, namusr_def, IOSTAT = ios, ERR = 902 ) 70 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namusr_def in configuration namelist' , .TRUE.)67 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namusr_def in configuration namelist' ) 71 68 ! 72 69 #if defined key_agrif … … 80 77 #endif 81 78 ! 82 WRITE( ldnam(:), namusr_def )79 IF(lwm) WRITE( numond, namusr_def ) 83 80 ! 84 81 cd_cfg = 'VORTEX' ! name & resolution (not used) 85 kk_cfg = INT( rn_dx )82 kk_cfg = nINT( rn_dx ) 86 83 ! 87 ! Global Domain size: VORTEX global domain is 1800 km x 1800 Km x 5000 m 88 kpi = INT( 1800.e3 / rn_dx ) + 3 89 kpj = INT( 1800.e3 / rn_dy ) + 3 90 kpk = INT( 5000._wp / rn_dz ) + 1 91 #if defined key_agrif 92 IF( .NOT. Agrif_Root() ) THEN 84 IF( Agrif_Root() ) THEN ! Global Domain size: VORTEX global domain is 1800 km x 1800 Km x 5000 m 85 kpi = NINT( 1800.e3 / rn_dx ) + 3 86 kpj = NINT( 1800.e3 / rn_dy ) + 3 87 ELSE 93 88 kpi = nbcellsx + 2 + 2*nbghostcells 94 89 kpj = nbcellsy + 2 + 2*nbghostcells 95 90 ENDIF 96 #endif 91 kpk = NINT( 5000._wp / rn_dz ) + 1 97 92 ! 98 93 zlx = (kpi-2)*rn_dx*1.e-3 99 94 zly = (kpj-2)*rn_dy*1.e-3 100 95 zh = (kpk-1)*rn_dz 101 ! ! control print102 WRITE(ldtxt(ii),*) ' ' ; ii = ii + 1103 WRITE(ldtxt(ii),*) 'usr_def_nam : read the user defined namelist (namusr_def) in namelist_cfg' ; ii = ii + 1104 WRITE(ldtxt(ii),*) '~~~~~~~~~~~ ' ; ii = ii + 1105 WRITE(ldtxt(ii),*) ' Namelist namusr_def : VORTEX test case' ; ii = ii + 1106 WRITE(ldtxt(ii),*) ' horizontal resolution rn_dx = ', rn_dx, ' m' ; ii = ii + 1107 WRITE(ldtxt(ii),*) ' horizontal resolution rn_dy = ', rn_dy, ' m' ; ii = ii + 1108 WRITE(ldtxt(ii),*) ' vertical resolution rn_dz = ', rn_dz, ' m' ; ii = ii + 1109 WRITE(ldtxt(ii),*) ' VORTEX domain: ' ; ii = ii + 1110 WRITE(ldtxt(ii),*) ' LX [km]: ', zlx ; ii = ii + 1111 WRITE(ldtxt(ii),*) ' LY [km]: ', zly ; ii = ii + 1112 WRITE(ldtxt(ii),*) ' H [m] : ', zh ; ii = ii + 1113 WRITE(ldtxt(ii),*) ' Reference latitude rn_ppgphi0 = ', rn_ppgphi0 ; ii = ii + 1114 !115 96 ! ! Set the lateral boundary condition of the global domain 116 97 kperio = 0 ! VORTEX configuration : closed basin 117 ! 118 WRITE(ldtxt(ii),*) ' ' ; ii = ii + 1 119 WRITE(ldtxt(ii),*) ' Lateral boundary condition of the global domain' ; ii = ii + 1 120 WRITE(ldtxt(ii),*) ' VORTEX : closed basin jperio = ', kperio ; ii = ii + 1 98 ! ! control print 99 IF(lwp) THEN 100 WRITE(numout,*) ' ' 101 WRITE(numout,*) 'usr_def_nam : read the user defined namelist (namusr_def) in namelist_cfg' 102 WRITE(numout,*) '~~~~~~~~~~~ ' 103 WRITE(numout,*) ' Namelist namusr_def : VORTEX test case' 104 WRITE(numout,*) ' horizontal resolution rn_dx = ', rn_dx, ' m' 105 WRITE(numout,*) ' horizontal resolution rn_dy = ', rn_dy, ' m' 106 WRITE(numout,*) ' vertical resolution rn_dz = ', rn_dz, ' m' 107 WRITE(numout,*) ' VORTEX domain: ' 108 WRITE(numout,*) ' LX [km]: ', zlx 109 WRITE(numout,*) ' LY [km]: ', zly 110 WRITE(numout,*) ' H [m] : ', zh 111 WRITE(numout,*) ' Reference latitude rn_ppgphi0 = ', rn_ppgphi0 112 WRITE(numout,*) ' ' 113 WRITE(numout,*) ' Lateral boundary condition of the global domain' 114 WRITE(numout,*) ' VORTEX : closed basin jperio = ', kperio 115 ENDIF 121 116 ! 122 117 END SUBROUTINE usr_def_nam
Note: See TracChangeset
for help on using the changeset viewer.