Ticket #1892: agrifcontrol.patch
File agrifcontrol.patch, 4.8 KB (added by mdunphy, 7 years ago) |
---|
-
NEMOGCM/CONFIG/SalishSea/MY_SRC/agrif_user.F90
# HG changeset patch # User Michael Dunphy # Date 1494273926 25200 # Mon May 08 13:05:26 2017 -0700 # Node ID 2912b6b92669b16a971cf52bf8a660ad72141b18 # Parent aef169d93cf2e2817b72db1bb56e7c32c2b19576 Move AGRIF time step and run length control from agrif_user.F90 to domain.F90 diff -r aef169d93cf2 -r 2912b6b92669 NEMOGCM/CONFIG/SalishSea/MY_SRC/agrif_user.F90
a b 221 221 check_namelist = .TRUE. 222 222 223 223 IF( check_namelist ) THEN 224 225 ! Check time steps226 IF( NINT(Agrif_Rhot()) * NINT(rdt) .NE. Agrif_Parent(rdt) ) THEN227 WRITE(cl_check1,*) NINT(Agrif_Parent(rdt))228 WRITE(cl_check2,*) NINT(rdt)229 WRITE(cl_check3,*) NINT(Agrif_Parent(rdt)/Agrif_Rhot())230 CALL ctl_warn( 'incompatible time step between grids', &231 & 'parent grid value : '//cl_check1 , &232 & 'child grid value : '//cl_check2 , &233 & 'value on child grid will be changed to : '//cl_check3 )234 rdt=Agrif_Parent(rdt)/Agrif_Rhot()235 ENDIF236 237 ! Check run length238 IF( Agrif_IRhot() * (Agrif_Parent(nitend)- &239 Agrif_Parent(nit000)+1) .NE. (nitend-nit000+1) ) THEN240 WRITE(cl_check1,*) (Agrif_Parent(nit000)-1)*Agrif_IRhot() + 1241 WRITE(cl_check2,*) Agrif_Parent(nitend) *Agrif_IRhot()242 CALL ctl_warn( 'incompatible run length between grids' , &243 & ' nit000 on fine grid will be change to : '//cl_check1, &244 & ' nitend on fine grid will be change to : '//cl_check2 )245 nit000 = (Agrif_Parent(nit000)-1)*Agrif_IRhot() + 1246 nitend = Agrif_Parent(nitend) *Agrif_IRhot()247 ENDIF248 249 224 ! Check coordinates 250 225 IF( ln_zps ) THEN 251 226 ! check parameters for partial steps -
NEMOGCM/CONFIG/SalishSea/MY_SRC/domain.F90
diff -r aef169d93cf2 -r 2912b6b92669 NEMOGCM/CONFIG/SalishSea/MY_SRC/domain.F90
a b 150 150 NAMELIST/namnc4/ nn_nchunks_i, nn_nchunks_j, nn_nchunks_k, ln_nc4zip 151 151 #endif 152 152 INTEGER :: ios ! Local integer output status for namelist read 153 CHARACTER(len=15) :: cl_check1, cl_check2, cl_check3 153 154 !!---------------------------------------------------------------------- 154 155 155 156 REWIND( numnam_ref ) ! Namelist namrun in reference namelist : Parameters of the run … … 241 242 ENDIF 242 243 #endif 243 244 245 #if defined key_agrif 246 IF( .NOT. Agrif_Root() ) THEN 247 ! Check run length 248 IF( Agrif_IRhot() * (Agrif_Parent(nitend)- & 249 Agrif_Parent(nit000)+1) .NE. (nitend-nit000+1) ) THEN 250 WRITE(cl_check1,*) (Agrif_Parent(nit000)-1)*Agrif_IRhot() + 1 251 WRITE(cl_check2,*) Agrif_Parent(nitend) *Agrif_IRhot() 252 CALL ctl_warn( 'incompatible run length between grids' , & 253 & ' nit000 on fine grid will be changed to : '//cl_check1, & 254 & ' nitend on fine grid will be changed to : '//cl_check2 ) 255 nit000 = (Agrif_Parent(nit000)-1)*Agrif_IRhot() + 1 256 nitend = Agrif_Parent(nitend) *Agrif_IRhot() 257 ENDIF 258 ENDIF 259 #endif 260 244 261 REWIND( numnam_ref ) ! Namelist namdom in reference namelist : space & time domain (bathymetry, mesh, timestep) 245 262 READ ( numnam_ref, namdom, IOSTAT = ios, ERR = 903) 246 263 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdom in reference namelist', lwp ) … … 304 321 rdtmax = rn_rdtmin 305 322 rdth = rn_rdth 306 323 324 #if defined key_agrif 325 IF( .NOT. Agrif_Root() ) THEN 326 ! Check time steps 327 IF( NINT(Agrif_Rhot()) * NINT(rdt) .NE. Agrif_Parent(rdt) ) THEN 328 WRITE(cl_check1,*) NINT(Agrif_Parent(rdt)) 329 WRITE(cl_check2,*) NINT(rdt) 330 WRITE(cl_check3,*) NINT(Agrif_Parent(rdt)/Agrif_Rhot()) 331 CALL ctl_warn( 'incompatible time step between grids', & 332 & 'parent grid value : '//cl_check1 , & 333 & 'child grid value : '//cl_check2 , & 334 & 'value on child grid will be changed to : '//cl_check3 ) 335 rdt=Agrif_Parent(rdt)/Agrif_Rhot() 336 ENDIF 337 ENDIF 338 #endif 339 307 340 REWIND( numnam_ref ) ! Namelist namcla in reference namelist : Cross land advection 308 341 READ ( numnam_ref, namcla, IOSTAT = ios, ERR = 905) 309 342 905 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcla in reference namelist', lwp )