- Timestamp:
- 2019-07-22T10:32:59+02:00 (5 years ago)
- Location:
- NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE
- Files:
-
- 72 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/ASM/asminc.F90
r10425 r11317 147 147 REWIND( numnam_ref ) ! Namelist nam_asminc in reference namelist : Assimilation increment 148 148 READ ( numnam_ref, nam_asminc, IOSTAT = ios, ERR = 901) 149 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_asminc in reference namelist' , lwp)149 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_asminc in reference namelist' ) 150 150 REWIND( numnam_cfg ) ! Namelist nam_asminc in configuration namelist : Assimilation increment 151 151 READ ( numnam_cfg, nam_asminc, IOSTAT = ios, ERR = 902 ) 152 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'nam_asminc in configuration namelist' , lwp)152 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'nam_asminc in configuration namelist' ) 153 153 IF(lwm) WRITE ( numond, nam_asminc ) 154 154 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/BDY/bdydta.F90
r11268 r11317 376 376 REWIND(numnam_ref) 377 377 READ ( numnam_ref, nambdy_dta, IOSTAT = ios, ERR = 901) 378 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambdy_dta in reference namelist' , lwp)378 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambdy_dta in reference namelist' ) 379 379 380 380 ! by-pass nambdy_dta reading if no input data used in this bdy … … 385 385 ! WARNING: we don't do a rewind here, each bdy reads its own nambdy_dta block one after another 386 386 READ ( numnam_cfg, nambdy_dta, IOSTAT = ios, ERR = 902 ) 387 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'nambdy_dta in configuration namelist' , lwp)387 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'nambdy_dta in configuration namelist' ) 388 388 IF(lwm) WRITE( numond, nambdy_dta ) 389 389 ENDIF -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/BDY/bdyini.F90
r11258 r11317 78 78 REWIND( numnam_ref ) ! Namelist nambdy in reference namelist :Unstructured open boundaries 79 79 READ ( numnam_ref, nambdy, IOSTAT = ios, ERR = 901) 80 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambdy in reference namelist' , lwp)80 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambdy in reference namelist' ) 81 81 ! make sur that all elements of the namelist variables have a default definition from namelist_ref 82 82 ln_coords_file (2:jp_bdy) = ln_coords_file (1) … … 99 99 REWIND( numnam_cfg ) ! Namelist nambdy in configuration namelist :Unstructured open boundaries 100 100 READ ( numnam_cfg, nambdy, IOSTAT = ios, ERR = 902 ) 101 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'nambdy in configuration namelist' , lwp)101 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'nambdy in configuration namelist' ) 102 102 IF(lwm) WRITE ( numond, nambdy ) 103 103 … … 1094 1094 ! keep full control of the configuration namelist 1095 1095 READ ( numnam_cfg, nambdy_index, IOSTAT = ios, ERR = 904 ) 1096 904 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambdy_index in configuration namelist' , lwp)1096 904 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambdy_index in configuration namelist' ) 1097 1097 IF(lwm) WRITE ( numond, nambdy_index ) 1098 1098 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/BDY/bdytides.F90
r11223 r11317 96 96 REWIND( numnam_ref ) 97 97 READ ( numnam_ref, nambdy_tide, IOSTAT = ios, ERR = 901) 98 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambdy_tide in reference namelist' , lwp)98 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambdy_tide in reference namelist' ) 99 99 ! Don't REWIND here - may need to read more than one of these namelists. 100 100 READ ( numnam_cfg, nambdy_tide, IOSTAT = ios, ERR = 902 ) 101 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'nambdy_tide in configuration namelist' , lwp)101 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'nambdy_tide in configuration namelist' ) 102 102 IF(lwm) WRITE ( numond, nambdy_tide ) 103 103 ! ! Parameter control and print -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/C1D/c1d.F90
r10068 r11317 52 52 REWIND( numnam_ref ) ! Namelist namc1d in reference namelist : Tracer advection scheme 53 53 READ ( numnam_ref, namc1d, IOSTAT = ios, ERR = 901) 54 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc1d in reference namelist' , lwp)54 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc1d in reference namelist' ) 55 55 ! 56 56 REWIND( numnam_cfg ) ! Namelist namtra_adv in configuration namelist : Tracer advection scheme 57 57 READ ( numnam_cfg, namc1d, IOSTAT = ios, ERR = 902 ) 58 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namc1d in configuration namelist' , lwp)58 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namc1d in configuration namelist' ) 59 59 IF(lwm) WRITE ( numond, namc1d ) 60 60 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/C1D/dtauvd.F90
r10068 r11317 62 62 REWIND( numnam_ref ) ! Namelist namc1d_uvd in reference namelist : 63 63 READ ( numnam_ref, namc1d_uvd, IOSTAT = ios, ERR = 901) 64 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc1d_uvd in reference namelist' , lwp)64 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc1d_uvd in reference namelist' ) 65 65 ! 66 66 REWIND( numnam_cfg ) ! Namelist namc1d_uvd in configuration namelist : Parameters of the run 67 67 READ ( numnam_cfg, namc1d_uvd, IOSTAT = ios, ERR = 902 ) 68 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namc1d_uvd in configuration namelist' , lwp)68 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namc1d_uvd in configuration namelist' ) 69 69 IF(lwm) WRITE ( numond, namc1d_uvd ) 70 70 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/C1D/dyndmp.F90
r10425 r11317 81 81 REWIND( numnam_ref ) ! Namelist namc1d_dyndmp in reference namelist : 82 82 READ ( numnam_ref, namc1d_dyndmp, IOSTAT = ios, ERR = 901) 83 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc1d_dyndmp in reference namelist' , lwp)83 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc1d_dyndmp in reference namelist' ) 84 84 REWIND( numnam_cfg ) ! Namelist namc1d_dyndmp in configuration namelist : Parameters of the run 85 85 READ ( numnam_cfg, namc1d_dyndmp, IOSTAT = ios, ERR = 902 ) 86 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namc1d_dyndmp in configuration namelist' , lwp)86 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namc1d_dyndmp in configuration namelist' ) 87 87 IF(lwm) WRITE ( numond, namc1d_dyndmp ) 88 88 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/CRS/crsdom.F90
r11192 r11317 579 579 ENDDO 580 580 CASE DEFAULT 581 STOP581 CALL ctl_stop( 'STOP', 'error from crs_dom_ope_3d, you should not be there...' ) 582 582 END SELECT 583 583 … … 1947 1947 1948 1948 CASE DEFAULT 1949 STOP1949 CALL ctl_stop( 'STOP', 'error from crs_dom_def, you should not be there (1) ...' ) 1950 1950 END SELECT 1951 1951 IF( nlcjt_crs(jn) > jpj_crs ) jpj_crs = jpj_crs + 1 … … 1996 1996 1997 1997 CASE DEFAULT 1998 STOP1998 CALL ctl_stop( 'STOP', 'error from crs_dom_def, you should not be there (2) ...' ) 1999 1999 END SELECT 2000 2000 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/CRS/crsini.F90
r10068 r11317 82 82 REWIND( numnam_ref ) ! Namelist namrun in reference namelist : Parameters of the run 83 83 READ ( numnam_ref, namcrs, IOSTAT = ios, ERR = 901) 84 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcrs in reference namelist' , lwp)84 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcrs in reference namelist' ) 85 85 REWIND( numnam_cfg ) ! Namelist namrun in configuration namelist : Parameters of the run 86 86 READ ( numnam_cfg, namcrs, IOSTAT = ios, ERR = 902 ) 87 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namcrs in configuration namelist' , lwp)87 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namcrs in configuration namelist' ) 88 88 IF(lwm) WRITE ( numond, namcrs ) 89 89 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DIA/dia25h.F90
r10641 r11317 55 55 REWIND ( numnam_ref ) ! Read Namelist nam_dia25h in reference namelist : 25hour mean diagnostics 56 56 READ ( numnam_ref, nam_dia25h, IOSTAT=ios, ERR= 901 ) 57 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_dia25h in reference namelist' , lwp)57 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_dia25h in reference namelist' ) 58 58 REWIND( numnam_cfg ) ! Namelist nam_dia25h in configuration namelist 25hour diagnostics 59 59 READ ( numnam_cfg, nam_dia25h, IOSTAT = ios, ERR = 902 ) 60 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'nam_dia25h in configuration namelist' , lwp)60 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'nam_dia25h in configuration namelist' ) 61 61 IF(lwm) WRITE ( numond, nam_dia25h ) 62 62 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DIA/diadct.F90
r10425 r11317 135 135 REWIND( numnam_ref ) ! Namelist namdct in reference namelist : Diagnostic: transport through sections 136 136 READ ( numnam_ref, namdct, IOSTAT = ios, ERR = 901) 137 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdct in reference namelist' , lwp)137 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdct in reference namelist' ) 138 138 139 139 REWIND( numnam_cfg ) ! Namelist namdct in configuration namelist : Diagnostic: transport through sections 140 140 READ ( numnam_cfg, namdct, IOSTAT = ios, ERR = 902 ) 141 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namdct in configuration namelist' , lwp)141 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namdct in configuration namelist' ) 142 142 IF(lwm) WRITE ( numond, namdct ) 143 143 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DIA/diaharm.F90
r10835 r11317 89 89 REWIND( numnam_ref ) ! Namelist nam_diaharm in reference namelist : Tidal harmonic analysis 90 90 READ ( numnam_ref, nam_diaharm, IOSTAT = ios, ERR = 901) 91 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_diaharm in reference namelist' , lwp)91 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_diaharm in reference namelist' ) 92 92 REWIND( numnam_cfg ) ! Namelist nam_diaharm in configuration namelist : Tidal harmonic analysis 93 93 READ ( numnam_cfg, nam_diaharm, IOSTAT = ios, ERR = 902 ) 94 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'nam_diaharm in configuration namelist' , lwp)94 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'nam_diaharm in configuration namelist' ) 95 95 IF(lwm) WRITE ( numond, nam_diaharm ) 96 96 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DIA/diahsb.F90
r10425 r11317 362 362 REWIND( numnam_ref ) ! Namelist namhsb in reference namelist 363 363 READ ( numnam_ref, namhsb, IOSTAT = ios, ERR = 901) 364 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namhsb in reference namelist' , lwp)364 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namhsb in reference namelist' ) 365 365 REWIND( numnam_cfg ) ! Namelist namhsb in configuration namelist 366 366 READ ( numnam_cfg, namhsb, IOSTAT = ios, ERR = 902 ) 367 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namhsb in configuration namelist' , lwp)367 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namhsb in configuration namelist' ) 368 368 IF(lwm) WRITE( numond, namhsb ) 369 369 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DIA/diaptr.F90
r10425 r11317 393 393 REWIND( numnam_ref ) ! Namelist namptr in reference namelist : Poleward transport 394 394 READ ( numnam_ref, namptr, IOSTAT = ios, ERR = 901) 395 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namptr in reference namelist' , lwp)395 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namptr in reference namelist' ) 396 396 397 397 REWIND( numnam_cfg ) ! Namelist namptr in configuration namelist : Poleward transport 398 398 READ ( numnam_cfg, namptr, IOSTAT = ios, ERR = 902 ) 399 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namptr in configuration namelist' , lwp)399 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namptr in configuration namelist' ) 400 400 IF(lwm) WRITE ( numond, namptr ) 401 401 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DIA/diatmb.F90
r10499 r11317 43 43 REWIND( numnam_ref ) ! Read Namelist nam_diatmb in reference namelist : TMB diagnostics 44 44 READ ( numnam_ref, nam_diatmb, IOSTAT=ios, ERR= 901 ) 45 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_diatmb in reference namelist' , lwp)45 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_diatmb in reference namelist' ) 46 46 47 47 REWIND( numnam_cfg ) ! Namelist nam_diatmb in configuration namelist TMB diagnostics 48 48 READ ( numnam_cfg, nam_diatmb, IOSTAT = ios, ERR = 902 ) 49 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'nam_diatmb in configuration namelist' , lwp)49 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'nam_diatmb in configuration namelist' ) 50 50 IF(lwm) WRITE ( numond, nam_diatmb ) 51 51 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DIU/diurnal_bulk.F90
r10069 r11317 54 54 REWIND( numnam_ref ) 55 55 READ ( numnam_ref, namdiu, IOSTAT = ios, ERR = 901 ) 56 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdiu in reference namelist' , lwp)56 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdiu in reference namelist' ) 57 57 REWIND( numnam_cfg ) 58 58 READ ( numnam_cfg, namdiu, IOSTAT = ios, ERR = 902 ) 59 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namdiu in configuration namelist' , lwp)59 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namdiu in configuration namelist' ) 60 60 ! 61 61 IF( ln_diurnal_only .AND. ( .NOT. ln_diurnal ) ) THEN -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DOM/domain.F90
r11258 r11317 308 308 REWIND( numnam_ref ) ! Namelist namrun in reference namelist : Parameters of the run 309 309 READ ( numnam_ref, namrun, IOSTAT = ios, ERR = 901) 310 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namrun in reference namelist' , lwp)310 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namrun in reference namelist' ) 311 311 REWIND( numnam_cfg ) ! Namelist namrun in configuration namelist : Parameters of the run 312 312 READ ( numnam_cfg, namrun, IOSTAT = ios, ERR = 902 ) 313 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namrun in configuration namelist' , lwp)313 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namrun in configuration namelist' ) 314 314 IF(lwm) WRITE ( numond, namrun ) 315 315 ! … … 401 401 REWIND( numnam_ref ) ! Namelist namdom in reference namelist : space & time domain (bathymetry, mesh, timestep) 402 402 READ ( numnam_ref, namdom, IOSTAT = ios, ERR = 903) 403 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdom in reference namelist' , lwp)403 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdom in reference namelist' ) 404 404 REWIND( numnam_cfg ) ! Namelist namdom in configuration namelist : space & time domain (bathymetry, mesh, timestep) 405 405 READ ( numnam_cfg, namdom, IOSTAT = ios, ERR = 904 ) 406 904 IF( ios > 0 ) CALL ctl_nam ( ios , 'namdom in configuration namelist' , lwp)406 904 IF( ios > 0 ) CALL ctl_nam ( ios , 'namdom in configuration namelist' ) 407 407 IF(lwm) WRITE( numond, namdom ) 408 408 ! … … 433 433 REWIND( numnam_ref ) ! Namelist namnc4 in reference namelist : NETCDF 434 434 READ ( numnam_ref, namnc4, IOSTAT = ios, ERR = 907) 435 907 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namnc4 in reference namelist' , lwp)435 907 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namnc4 in reference namelist' ) 436 436 REWIND( numnam_cfg ) ! Namelist namnc4 in configuration namelist : NETCDF 437 437 READ ( numnam_cfg, namnc4, IOSTAT = ios, ERR = 908 ) 438 908 IF( ios > 0 ) CALL ctl_nam ( ios , 'namnc4 in configuration namelist' , lwp)438 908 IF( ios > 0 ) CALL ctl_nam ( ios , 'namnc4 in configuration namelist' ) 439 439 IF(lwm) WRITE( numond, namnc4 ) 440 440 … … 511 511 512 512 513 SUBROUTINE domain_cfg( ldtxt,cd_cfg, kk_cfg, kpi, kpj, kpk, kperio )513 SUBROUTINE domain_cfg( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 514 514 !!---------------------------------------------------------------------- 515 515 !! *** ROUTINE dom_nam *** … … 519 519 !! ** Method : read the cn_domcfg NetCDF file 520 520 !!---------------------------------------------------------------------- 521 CHARACTER(len=*), DIMENSION(:), INTENT(out) :: ldtxt ! stored print information522 521 CHARACTER(len=*) , INTENT(out) :: cd_cfg ! configuration name 523 522 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution … … 525 524 INTEGER , INTENT(out) :: kperio ! lateral global domain b.c. 526 525 ! 527 INTEGER :: inum , ii! local integer526 INTEGER :: inum ! local integer 528 527 REAL(wp) :: zorca_res ! local scalars 529 528 REAL(wp) :: zperio ! - - … … 531 530 !!---------------------------------------------------------------------- 532 531 ! 533 ii = 1 534 WRITE(ldtxt(ii),*) ' ' ; ii = ii+1 535 WRITE(ldtxt(ii),*) 'domain_cfg : domain size read in ', TRIM( cn_domcfg ), ' file' ; ii = ii+1 536 WRITE(ldtxt(ii),*) '~~~~~~~~~~ ' ; ii = ii+1 532 WRITE(numout,*) ' ' 533 WRITE(numout,*) 'domain_cfg : domain size read in ', TRIM( cn_domcfg ), ' file' 534 WRITE(numout,*) '~~~~~~~~~~ ' 537 535 ! 538 536 CALL iom_open( cn_domcfg, inum ) … … 545 543 CALL iom_get( inum, 'ORCA_index', zorca_res ) ; kk_cfg = NINT( zorca_res ) 546 544 ! 547 WRITE( ldtxt(ii),*) ' .' ; ii = ii+1548 WRITE( ldtxt(ii),*) ' ==>>> ORCA configuration ' ; ii = ii+1549 WRITE( ldtxt(ii),*) ' .' ; ii = ii+1545 WRITE(numout,*) ' .' 546 WRITE(numout,*) ' ==>>> ORCA configuration ' 547 WRITE(numout,*) ' .' 550 548 ! 551 549 ELSE !- cd_cfg & k_cfg are not used … … 568 566 CALL iom_close( inum ) 569 567 ! 570 WRITE( ldtxt(ii),*) ' cn_cfg = ', TRIM(cd_cfg), ' nn_cfg = ', kk_cfg ; ii = ii+1571 WRITE( ldtxt(ii),*) ' jpiglo = ', kpi ; ii = ii+1572 WRITE( ldtxt(ii),*) ' jpjglo = ', kpj ; ii = ii+1573 WRITE( ldtxt(ii),*) ' jpkglo = ', kpk ; ii = ii+1574 WRITE( ldtxt(ii),*) ' type of global domain lateral boundary jperio = ', kperio ; ii = ii+1568 WRITE(numout,*) ' cn_cfg = ', TRIM(cd_cfg), ' nn_cfg = ', kk_cfg 569 WRITE(numout,*) ' jpiglo = ', kpi 570 WRITE(numout,*) ' jpjglo = ', kpj 571 WRITE(numout,*) ' jpkglo = ', kpk 572 WRITE(numout,*) ' type of global domain lateral boundary jperio = ', kperio 575 573 ! 576 574 END SUBROUTINE domain_cfg -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DOM/dommsk.F90
r11263 r11317 106 106 REWIND( numnam_ref ) ! Namelist namlbc in reference namelist : Lateral momentum boundary condition 107 107 READ ( numnam_ref, namlbc, IOSTAT = ios, ERR = 901 ) 108 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namlbc in reference namelist' , lwp)108 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namlbc in reference namelist' ) 109 109 REWIND( numnam_cfg ) ! Namelist namlbc in configuration namelist : Lateral momentum boundary condition 110 110 READ ( numnam_cfg, namlbc, IOSTAT = ios, ERR = 902 ) 111 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namlbc in configuration namelist' , lwp)111 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namlbc in configuration namelist' ) 112 112 IF(lwm) WRITE ( numond, namlbc ) 113 113 … … 151 151 REWIND( numnam_ref ) ! Namelist nambdy in reference namelist :Unstructured open boundaries 152 152 READ ( numnam_ref, nambdy, IOSTAT = ios, ERR = 903) 153 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambdy in reference namelist' , lwp)153 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambdy in reference namelist' ) 154 154 REWIND( numnam_cfg ) ! Namelist nambdy in configuration namelist :Unstructured open boundaries 155 155 READ ( numnam_cfg, nambdy, IOSTAT = ios, ERR = 904 ) 156 904 IF( ios > 0 ) CALL ctl_nam ( ios , 'nambdy in configuration namelist' , lwp)156 904 IF( ios > 0 ) CALL ctl_nam ( ios , 'nambdy in configuration namelist' ) 157 157 ! ------------------------ 158 158 IF ( ln_bdy .AND. ln_mask_file ) THEN -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DOM/domvvl.F90
r10425 r11317 993 993 REWIND( numnam_ref ) ! Namelist nam_vvl in reference namelist : 994 994 READ ( numnam_ref, nam_vvl, IOSTAT = ios, ERR = 901) 995 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_vvl in reference namelist' , lwp)995 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_vvl in reference namelist' ) 996 996 REWIND( numnam_cfg ) ! Namelist nam_vvl in configuration namelist : Parameters of the run 997 997 READ ( numnam_cfg, nam_vvl, IOSTAT = ios, ERR = 902 ) 998 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'nam_vvl in configuration namelist' , lwp)998 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'nam_vvl in configuration namelist' ) 999 999 IF(lwm) WRITE ( numond, nam_vvl ) 1000 1000 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DOM/dtatsd.F90
r10213 r11317 67 67 REWIND( numnam_ref ) ! Namelist namtsd in reference namelist : 68 68 READ ( numnam_ref, namtsd, IOSTAT = ios, ERR = 901) 69 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtsd in reference namelist' , lwp)69 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtsd in reference namelist' ) 70 70 REWIND( numnam_cfg ) ! Namelist namtsd in configuration namelist : Parameters of the run 71 71 READ ( numnam_cfg, namtsd, IOSTAT = ios, ERR = 902 ) 72 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namtsd in configuration namelist' , lwp)72 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namtsd in configuration namelist' ) 73 73 IF(lwm) WRITE ( numond, namtsd ) 74 74 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DOM/iscplhsb.F90
r10425 r11317 186 186 ! CALL lbc_sum(pts_flx (:,:,:,jp_sal),'T',1.) 187 187 ! CALL lbc_sum(pts_flx (:,:,:,jp_tem),'T',1.) 188 STOP ' iscpl_cons: please modify this module !'188 CALL ctl_stop( 'STOP', ' iscpl_cons: please modify this MODULE !' ) 189 189 !!gm end 190 190 ! if no neighbour wet cell in case of 2close a cell", need to find the nearest wet point -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DOM/iscplini.F90
r10425 r11317 64 64 REWIND( numnam_ref ) ! Namelist namsbc_iscpl in reference namelist : Ice sheet coupling 65 65 READ ( numnam_ref, namsbc_iscpl, IOSTAT = ios, ERR = 901) 66 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_iscpl in reference namelist' , lwp)66 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_iscpl in reference namelist' ) 67 67 REWIND( numnam_cfg ) ! Namelist namsbc_iscpl in configuration namelist : Ice Sheet coupling 68 68 READ ( numnam_cfg, namsbc_iscpl, IOSTAT = ios, ERR = 902 ) 69 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namsbc_iscpl in configuration namelist' , lwp)69 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namsbc_iscpl in configuration namelist' ) 70 70 IF(lwm) WRITE ( numond, namsbc_iscpl ) 71 71 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DYN/dynadv.F90
r10068 r11317 106 106 REWIND( numnam_ref ) ! Namelist namdyn_adv in reference namelist : Momentum advection scheme 107 107 READ ( numnam_ref, namdyn_adv, IOSTAT = ios, ERR = 901) 108 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_adv in reference namelist' , lwp)108 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_adv in reference namelist' ) 109 109 REWIND( numnam_cfg ) ! Namelist namdyn_adv in configuration namelist : Momentum advection scheme 110 110 READ ( numnam_cfg, namdyn_adv, IOSTAT = ios, ERR = 902 ) 111 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namdyn_adv in configuration namelist' , lwp)111 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namdyn_adv in configuration namelist' ) 112 112 IF(lwm) WRITE ( numond, namdyn_adv ) 113 113 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DYN/dynhpg.F90
r10491 r11317 152 152 REWIND( numnam_ref ) ! Namelist namdyn_hpg in reference namelist : Hydrostatic pressure gradient 153 153 READ ( numnam_ref, namdyn_hpg, IOSTAT = ios, ERR = 901) 154 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_hpg in reference namelist' , lwp)154 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_hpg in reference namelist' ) 155 155 ! 156 156 REWIND( numnam_cfg ) ! Namelist namdyn_hpg in configuration namelist : Hydrostatic pressure gradient 157 157 READ ( numnam_cfg, namdyn_hpg, IOSTAT = ios, ERR = 902 ) 158 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namdyn_hpg in configuration namelist' , lwp)158 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namdyn_hpg in configuration namelist' ) 159 159 IF(lwm) WRITE ( numond, namdyn_hpg ) 160 160 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DYN/dynspg.F90
r10068 r11317 202 202 REWIND( numnam_ref ) ! Namelist namdyn_spg in reference namelist : Free surface 203 203 READ ( numnam_ref, namdyn_spg, IOSTAT = ios, ERR = 901) 204 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_spg in reference namelist' , lwp)204 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_spg in reference namelist' ) 205 205 ! 206 206 REWIND( numnam_cfg ) ! Namelist namdyn_spg in configuration namelist : Free surface 207 207 READ ( numnam_cfg, namdyn_spg, IOSTAT = ios, ERR = 902 ) 208 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namdyn_spg in configuration namelist' , lwp)208 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namdyn_spg in configuration namelist' ) 209 209 IF(lwm) WRITE ( numond, namdyn_spg ) 210 210 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DYN/dynvor.F90
r10425 r11317 851 851 REWIND( numnam_ref ) ! Namelist namdyn_vor in reference namelist : Vorticity scheme options 852 852 READ ( numnam_ref, namdyn_vor, IOSTAT = ios, ERR = 901) 853 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_vor in reference namelist' , lwp)853 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_vor in reference namelist' ) 854 854 REWIND( numnam_cfg ) ! Namelist namdyn_vor in configuration namelist : Vorticity scheme options 855 855 READ ( numnam_cfg, namdyn_vor, IOSTAT = ios, ERR = 902 ) 856 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namdyn_vor in configuration namelist' , lwp)856 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namdyn_vor in configuration namelist' ) 857 857 IF(lwm) WRITE ( numond, namdyn_vor ) 858 858 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DYN/wet_dry.F90
r10499 r11317 81 81 REWIND( numnam_ref ) ! Namelist namwad in reference namelist : Parameters for Wetting/Drying 82 82 READ ( numnam_ref, namwad, IOSTAT = ios, ERR = 905) 83 905 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namwad in reference namelist' , .TRUE.)83 905 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namwad in reference namelist' ) 84 84 REWIND( numnam_cfg ) ! Namelist namwad in configuration namelist : Parameters for Wetting/Drying 85 85 READ ( numnam_cfg, namwad, IOSTAT = ios, ERR = 906) 86 906 IF( ios > 0 ) CALL ctl_nam ( ios , 'namwad in configuration namelist' , .TRUE.)86 906 IF( ios > 0 ) CALL ctl_nam ( ios , 'namwad in configuration namelist' ) 87 87 IF(lwm) WRITE ( numond, namwad ) 88 88 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/FLO/floats.F90
r10068 r11317 90 90 REWIND( numnam_ref ) ! Namelist namflo in reference namelist : Floats 91 91 READ ( numnam_ref, namflo, IOSTAT = ios, ERR = 901) 92 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namflo in reference namelist' , lwp)92 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namflo in reference namelist' ) 93 93 94 94 REWIND( numnam_cfg ) ! Namelist namflo in configuration namelist : Floats 95 95 READ ( numnam_cfg, namflo, IOSTAT = ios, ERR = 902 ) 96 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namflo in configuration namelist' , lwp)96 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namflo in configuration namelist' ) 97 97 IF(lwm) WRITE ( numond, namflo ) 98 98 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/ICB/icbini.F90
r10702 r11317 406 406 REWIND( numnam_ref ) ! Namelist namberg in reference namelist : Iceberg parameters 407 407 READ ( numnam_ref, namberg, IOSTAT = ios, ERR = 901) 408 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namberg in reference namelist' , lwp)408 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namberg in reference namelist' ) 409 409 REWIND( numnam_cfg ) ! Namelist namberg in configuration namelist : Iceberg parameters 410 410 READ ( numnam_cfg, namberg, IOSTAT = ios, ERR = 902 ) 411 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namberg in configuration namelist' , lwp)411 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namberg in configuration namelist' ) 412 412 IF(lwm) WRITE ( numond, namberg ) 413 413 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/ICB/icblbc.F90
r10570 r11317 278 278 CALL mppsend( 12, zwebergs(1), 1, ipe_E, iml_req1) 279 279 CALL mpprecv( 11, zewbergs(2), 1, ipe_E ) 280 IF( l_isend )CALL mpi_wait( iml_req1, iml_stat, iml_err )280 CALL mpi_wait( iml_req1, iml_stat, iml_err ) 281 281 ibergs_rcvd_from_e = INT( zewbergs(2) ) 282 282 CASE( 0 ) … … 287 287 CALL mpprecv( 11, zewbergs(2), 1, ipe_E ) 288 288 CALL mpprecv( 12, zwebergs(2), 1, ipe_W ) 289 IF( l_isend )CALL mpi_wait( iml_req2, iml_stat, iml_err )290 IF( l_isend )CALL mpi_wait( iml_req3, iml_stat, iml_err )289 CALL mpi_wait( iml_req2, iml_stat, iml_err ) 290 CALL mpi_wait( iml_req3, iml_stat, iml_err ) 291 291 ibergs_rcvd_from_e = INT( zewbergs(2) ) 292 292 ibergs_rcvd_from_w = INT( zwebergs(2) ) … … 295 295 CALL mppsend( 11, zewbergs(1), 1, ipe_W, iml_req4) 296 296 CALL mpprecv( 12, zwebergs(2), 1, ipe_W ) 297 IF( l_isend )CALL mpi_wait( iml_req4, iml_stat, iml_err )297 CALL mpi_wait( iml_req4, iml_stat, iml_err ) 298 298 ibergs_rcvd_from_w = INT( zwebergs(2) ) 299 299 END SELECT … … 310 310 CALL mpprecv( 13, ibuffer_e%data, ibergs_rcvd_from_e*jp_buffer_width ) 311 311 ENDIF 312 IF( ibergs_to_send_e > 0 .AND. l_isend) CALL mpi_wait( iml_req1, iml_stat, iml_err )312 IF( ibergs_to_send_e > 0 ) CALL mpi_wait( iml_req1, iml_stat, iml_err ) 313 313 DO i = 1, ibergs_rcvd_from_e 314 314 IF( nn_verbose_level >= 4 ) THEN … … 329 329 CALL mpprecv( 14, ibuffer_w%data, ibergs_rcvd_from_w*jp_buffer_width ) 330 330 ENDIF 331 IF( ibergs_to_send_w > 0 .AND. l_isend) CALL mpi_wait( iml_req2, iml_stat, iml_err )332 IF( ibergs_to_send_e > 0 .AND. l_isend) CALL mpi_wait( iml_req3, iml_stat, iml_err )331 IF( ibergs_to_send_w > 0 ) CALL mpi_wait( iml_req2, iml_stat, iml_err ) 332 IF( ibergs_to_send_e > 0 ) CALL mpi_wait( iml_req3, iml_stat, iml_err ) 333 333 DO i = 1, ibergs_rcvd_from_e 334 334 IF( nn_verbose_level >= 4 ) THEN … … 351 351 CALL mpprecv( 14, ibuffer_w%data, ibergs_rcvd_from_w*jp_buffer_width ) 352 352 ENDIF 353 IF( ibergs_to_send_w > 0 .AND. l_isend) CALL mpi_wait( iml_req4, iml_stat, iml_err )353 IF( ibergs_to_send_w > 0 ) CALL mpi_wait( iml_req4, iml_stat, iml_err ) 354 354 DO i = 1, ibergs_rcvd_from_w 355 355 IF( nn_verbose_level >= 4 ) THEN … … 409 409 CALL mppsend( 16, zsnbergs(1), 1, ipe_N, iml_req1) 410 410 CALL mpprecv( 15, znsbergs(2), 1, ipe_N ) 411 IF( l_isend )CALL mpi_wait( iml_req1, iml_stat, iml_err )411 CALL mpi_wait( iml_req1, iml_stat, iml_err ) 412 412 ibergs_rcvd_from_n = INT( znsbergs(2) ) 413 413 CASE( 0 ) … … 418 418 CALL mpprecv( 15, znsbergs(2), 1, ipe_N ) 419 419 CALL mpprecv( 16, zsnbergs(2), 1, ipe_S ) 420 IF( l_isend )CALL mpi_wait( iml_req2, iml_stat, iml_err )421 IF( l_isend )CALL mpi_wait( iml_req3, iml_stat, iml_err )420 CALL mpi_wait( iml_req2, iml_stat, iml_err ) 421 CALL mpi_wait( iml_req3, iml_stat, iml_err ) 422 422 ibergs_rcvd_from_n = INT( znsbergs(2) ) 423 423 ibergs_rcvd_from_s = INT( zsnbergs(2) ) … … 426 426 CALL mppsend( 15, znsbergs(1), 1, ipe_S, iml_req4) 427 427 CALL mpprecv( 16, zsnbergs(2), 1, ipe_S ) 428 IF( l_isend )CALL mpi_wait( iml_req4, iml_stat, iml_err )428 CALL mpi_wait( iml_req4, iml_stat, iml_err ) 429 429 ibergs_rcvd_from_s = INT( zsnbergs(2) ) 430 430 END SELECT … … 441 441 CALL mpprecv( 17, ibuffer_n%data, ibergs_rcvd_from_n*jp_buffer_width ) 442 442 ENDIF 443 IF( ibergs_to_send_n > 0 .AND. l_isend) CALL mpi_wait( iml_req1, iml_stat, iml_err )443 IF( ibergs_to_send_n > 0 ) CALL mpi_wait( iml_req1, iml_stat, iml_err ) 444 444 DO i = 1, ibergs_rcvd_from_n 445 445 IF( nn_verbose_level >= 4 ) THEN … … 460 460 CALL mpprecv( 18, ibuffer_s%data, ibergs_rcvd_from_s*jp_buffer_width ) 461 461 ENDIF 462 IF( ibergs_to_send_s > 0 .AND. l_isend) CALL mpi_wait( iml_req2, iml_stat, iml_err )463 IF( ibergs_to_send_n > 0 .AND. l_isend) CALL mpi_wait( iml_req3, iml_stat, iml_err )462 IF( ibergs_to_send_s > 0 ) CALL mpi_wait( iml_req2, iml_stat, iml_err ) 463 IF( ibergs_to_send_n > 0 ) CALL mpi_wait( iml_req3, iml_stat, iml_err ) 464 464 DO i = 1, ibergs_rcvd_from_n 465 465 IF( nn_verbose_level >= 4 ) THEN … … 482 482 CALL mpprecv( 18, ibuffer_s%data, ibergs_rcvd_from_s*jp_buffer_width ) 483 483 ENDIF 484 IF( ibergs_to_send_s > 0 .AND. l_isend) CALL mpi_wait( iml_req4, iml_stat, iml_err )484 IF( ibergs_to_send_s > 0 ) CALL mpi_wait( iml_req4, iml_stat, iml_err ) 485 485 DO i = 1, ibergs_rcvd_from_s 486 486 IF( nn_verbose_level >= 4 ) THEN … … 669 669 ifldproc = nicbfldproc(jn) 670 670 IF( ifldproc == narea ) CYCLE 671 672 IF( l_isend ) CALL mpi_wait( nicbfldreq(jn), iml_stat, iml_err ) 671 CALL mpi_wait( nicbfldreq(jn), iml_stat, iml_err ) 673 672 ENDIF 674 673 ! … … 770 769 ifldproc = nicbfldproc(jn) 771 770 IF( ifldproc == narea ) CYCLE 772 773 IF( l_isend ) CALL mpi_wait( nicbfldreq(jn), iml_stat, iml_err ) 771 CALL mpi_wait( nicbfldreq(jn), iml_stat, iml_err ) 774 772 ENDIF 775 773 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/IOM/in_out_manager.F90
r10817 r11317 167 167 CHARACTER(lc) :: ctmp7, ctmp8, ctmp9 !: temporary characters 7 to 9 168 168 CHARACTER(lc) :: ctmp10 !: temporary character 10 169 CHARACTER(lc) :: cform_err = "(/,' ===>>> : E R R O R', /,' ===========',/)" !:170 CHARACTER(lc) :: cform_war = "(/,' ===>>> : W A R N I N G', /,' ===============',/)" !:171 169 LOGICAL :: lwm = .FALSE. !: boolean : true on the 1st processor only (always) 172 170 LOGICAL :: lwp = .FALSE. !: boolean : true on the 1st processor only .OR. ln_ctl -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/LBC/lbc_nfd_nogather_generic.h90
r10425 r11317 74 74 ! 75 75 ! Security check for further developments 76 IF ( ipf > 1 ) THEN 77 write(6,*) 'lbc_nfd_nogather: multiple fields not allowed. Revise implementation' 78 write(6,*) 'You should not be there...' 79 STOP 80 ENDIF 76 IF ( ipf > 1 ) CALL ctl_stop( 'STOP', 'lbc_nfd_nogather: multiple fields not allowed. Revise implementation...' ) 81 77 ! 82 78 ijpj = 1 ! index of first modified line -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/LBC/lbclnk.F90
r11195 r11317 410 410 CALL mppsend( 2, r2dwe(1-kextj,1,1), imigr, noea, ml_req1 ) 411 411 CALL mpprecv( 1, r2dew(1-kextj,1,2), imigr, noea ) 412 IF(l_isend)CALL mpi_wait(ml_req1,ml_stat,ml_err)412 CALL mpi_wait(ml_req1,ml_stat,ml_err) 413 413 CASE ( 0 ) 414 414 CALL mppsend( 1, r2dew(1-kextj,1,1), imigr, nowe, ml_req1 ) … … 416 416 CALL mpprecv( 1, r2dew(1-kextj,1,2), imigr, noea ) 417 417 CALL mpprecv( 2, r2dwe(1-kextj,1,2), imigr, nowe ) 418 IF(l_isend)CALL mpi_wait(ml_req1,ml_stat,ml_err)419 IF(l_isend)CALL mpi_wait(ml_req2,ml_stat,ml_err)418 CALL mpi_wait(ml_req1,ml_stat,ml_err) 419 CALL mpi_wait(ml_req2,ml_stat,ml_err) 420 420 CASE ( 1 ) 421 421 CALL mppsend( 1, r2dew(1-kextj,1,1), imigr, nowe, ml_req1 ) 422 422 CALL mpprecv( 2, r2dwe(1-kextj,1,2), imigr, nowe ) 423 IF(l_isend)CALL mpi_wait(ml_req1,ml_stat,ml_err)423 CALL mpi_wait(ml_req1,ml_stat,ml_err) 424 424 END SELECT 425 425 ! … … 467 467 CALL mppsend( 4, r2dsn(1-kexti,1,1), imigr, nono, ml_req1 ) 468 468 CALL mpprecv( 3, r2dns(1-kexti,1,2), imigr, nono ) 469 IF(l_isend)CALL mpi_wait(ml_req1,ml_stat,ml_err)469 CALL mpi_wait(ml_req1,ml_stat,ml_err) 470 470 CASE ( 0 ) 471 471 CALL mppsend( 3, r2dns(1-kexti,1,1), imigr, noso, ml_req1 ) … … 473 473 CALL mpprecv( 3, r2dns(1-kexti,1,2), imigr, nono ) 474 474 CALL mpprecv( 4, r2dsn(1-kexti,1,2), imigr, noso ) 475 IF(l_isend)CALL mpi_wait(ml_req1,ml_stat,ml_err)476 IF(l_isend)CALL mpi_wait(ml_req2,ml_stat,ml_err)475 CALL mpi_wait(ml_req1,ml_stat,ml_err) 476 CALL mpi_wait(ml_req2,ml_stat,ml_err) 477 477 CASE ( 1 ) 478 478 CALL mppsend( 3, r2dns(1-kexti,1,1), imigr, noso, ml_req1 ) 479 479 CALL mpprecv( 4, r2dsn(1-kexti,1,2), imigr, noso ) 480 IF(l_isend)CALL mpi_wait(ml_req1,ml_stat,ml_err)480 CALL mpi_wait(ml_req1,ml_stat,ml_err) 481 481 END SELECT 482 482 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/LBC/lbcnfd.F90
r10425 r11317 20 20 USE dom_oce ! ocean space and time domain 21 21 USE in_out_manager ! I/O manager 22 USE lib_mpp ! MPP library 22 23 23 24 IMPLICIT NONE -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/LBC/lib_mpp.F90
r11194 r11317 32 32 !! ctl_opn : Open file and check if required file is available. 33 33 !! ctl_nam : Prints informations when an error occurs while reading a namelist 34 !! get_unit : give the index of an unused logical unit 35 !!---------------------------------------------------------------------- 36 !!---------------------------------------------------------------------- 37 !! mynode : indentify the processor unit 34 !!---------------------------------------------------------------------- 35 !!---------------------------------------------------------------------- 36 !! mpp_start : get local communicator its size and rank 38 37 !! mpp_lnk : interface (defined in lbclnk) for message passing of 2d or 3d arrays (mpp_lnk_2d, mpp_lnk_3d) 39 38 !! mpp_lnk_icb : interface for message passing of 2d arrays with extra halo for icebergs (mpp_lnk_2d_icb) … … 58 57 PRIVATE 59 58 ! 60 PUBLIC ctl_stop, ctl_warn, get_unit,ctl_opn, ctl_nam61 PUBLIC m ynode, mppstop, mppsync, mpp_comm_free59 PUBLIC ctl_stop, ctl_warn, ctl_opn, ctl_nam 60 PUBLIC mpp_start, mppstop, mppsync, mpp_comm_free 62 61 PUBLIC mpp_ini_north 63 62 PUBLIC mpp_min, mpp_max, mpp_sum, mpp_minloc, mpp_maxloc … … 131 130 INTEGER, PUBLIC, DIMENSION(:), ALLOCATABLE, SAVE :: nrank_north !: dimension ndim_rank_north 132 131 133 ! Type of send : standard, buffered, immediate134 CHARACTER(len=1), PUBLIC :: cn_mpi_send !: type od mpi send/recieve (S=standard, B=bsend, I=isend)135 LOGICAL , PUBLIC :: l_isend = .FALSE. !: isend use indicator (T if cn_mpi_send='I')136 INTEGER , PUBLIC :: nn_buffer !: size of the buffer in case of mpi_bsend137 138 132 ! Communications summary report 139 133 CHARACTER(len=128), DIMENSION(:), ALLOCATABLE :: crname_lbc !: names of lbc_lnk calling routines … … 180 174 CONTAINS 181 175 182 FUNCTION mynode( ldtxt, ldname, kumnam_ref, kumnam_cfg, kumond, kstop, localComm ) 183 !!---------------------------------------------------------------------- 184 !! *** routine mynode *** 185 !! 186 !! ** Purpose : Find processor unit 187 !!---------------------------------------------------------------------- 188 CHARACTER(len=*),DIMENSION(:), INTENT( out) :: ldtxt ! 189 CHARACTER(len=*) , INTENT(in ) :: ldname ! 190 INTEGER , INTENT(in ) :: kumnam_ref ! logical unit for reference namelist 191 INTEGER , INTENT(in ) :: kumnam_cfg ! logical unit for configuration namelist 192 INTEGER , INTENT(inout) :: kumond ! logical unit for namelist output 193 INTEGER , INTENT(inout) :: kstop ! stop indicator 176 SUBROUTINE mpp_start( localComm ) 177 !!---------------------------------------------------------------------- 178 !! *** routine mpp_start *** 179 !! 180 !! ** Purpose : get mpi_comm_oce, mpprank and mppsize 181 !!---------------------------------------------------------------------- 194 182 INTEGER , OPTIONAL , INTENT(in ) :: localComm ! 195 183 ! 196 INTEGER :: mynode, ierr, code, ji, ii, ios 197 LOGICAL :: mpi_was_called 198 ! 199 NAMELIST/nammpp/ cn_mpi_send, nn_buffer, jpni, jpnj, ln_nnogather 200 !!---------------------------------------------------------------------- 201 #if defined key_mpp_mpi 202 ! 203 ii = 1 204 WRITE(ldtxt(ii),*) ; ii = ii + 1 205 WRITE(ldtxt(ii),*) 'mynode : mpi initialisation' ; ii = ii + 1 206 WRITE(ldtxt(ii),*) '~~~~~~ ' ; ii = ii + 1 207 ! 208 REWIND( kumnam_ref ) ! Namelist nammpp in reference namelist: mpi variables 209 READ ( kumnam_ref, nammpp, IOSTAT = ios, ERR = 901) 210 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nammpp in reference namelist', lwp ) 211 ! 212 REWIND( kumnam_cfg ) ! Namelist nammpp in configuration namelist: mpi variables 213 READ ( kumnam_cfg, nammpp, IOSTAT = ios, ERR = 902 ) 214 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'nammpp in configuration namelist', lwp ) 215 ! 216 ! ! control print 217 WRITE(ldtxt(ii),*) ' Namelist nammpp' ; ii = ii + 1 218 WRITE(ldtxt(ii),*) ' mpi send type cn_mpi_send = ', cn_mpi_send ; ii = ii + 1 219 WRITE(ldtxt(ii),*) ' size exported buffer nn_buffer = ', nn_buffer,' bytes'; ii = ii + 1 220 ! 221 IF( jpni < 1 .OR. jpnj < 1 ) THEN 222 WRITE(ldtxt(ii),*) ' jpni and jpnj will be calculated automatically' ; ii = ii + 1 223 ELSE 224 WRITE(ldtxt(ii),*) ' processor grid extent in i jpni = ',jpni ; ii = ii + 1 225 WRITE(ldtxt(ii),*) ' processor grid extent in j jpnj = ',jpnj ; ii = ii + 1 226 ENDIF 227 228 WRITE(ldtxt(ii),*) ' avoid use of mpi_allgather at the north fold ln_nnogather = ', ln_nnogather ; ii = ii + 1 229 230 CALL mpi_initialized ( mpi_was_called, code ) 231 IF( code /= MPI_SUCCESS ) THEN 232 DO ji = 1, SIZE(ldtxt) 233 IF( TRIM(ldtxt(ji)) /= '' ) WRITE(*,*) ldtxt(ji) ! control print of mynode 234 END DO 235 WRITE(*, cform_err) 236 WRITE(*, *) 'lib_mpp: Error in routine mpi_initialized' 237 CALL mpi_abort( mpi_comm_world, code, ierr ) 238 ENDIF 239 240 IF( mpi_was_called ) THEN 241 ! 242 SELECT CASE ( cn_mpi_send ) 243 CASE ( 'S' ) ! Standard mpi send (blocking) 244 WRITE(ldtxt(ii),*) ' Standard blocking mpi send (send)' ; ii = ii + 1 245 CASE ( 'B' ) ! Buffer mpi send (blocking) 246 WRITE(ldtxt(ii),*) ' Buffer blocking mpi send (bsend)' ; ii = ii + 1 247 IF( Agrif_Root() ) CALL mpi_init_oce( ldtxt, ii, ierr ) 248 CASE ( 'I' ) ! Immediate mpi send (non-blocking send) 249 WRITE(ldtxt(ii),*) ' Immediate non-blocking send (isend)' ; ii = ii + 1 250 l_isend = .TRUE. 251 CASE DEFAULT 252 WRITE(ldtxt(ii),cform_err) ; ii = ii + 1 253 WRITE(ldtxt(ii),*) ' bad value for cn_mpi_send = ', cn_mpi_send ; ii = ii + 1 254 kstop = kstop + 1 255 END SELECT 256 ! 257 ELSEIF ( PRESENT(localComm) .AND. .NOT. mpi_was_called ) THEN 258 WRITE(ldtxt(ii),cform_err) ; ii = ii + 1 259 WRITE(ldtxt(ii),*) ' lib_mpp: You cannot provide a local communicator ' ; ii = ii + 1 260 WRITE(ldtxt(ii),*) ' without calling MPI_Init before ! ' ; ii = ii + 1 261 kstop = kstop + 1 262 ELSE 263 SELECT CASE ( cn_mpi_send ) 264 CASE ( 'S' ) ! Standard mpi send (blocking) 265 WRITE(ldtxt(ii),*) ' Standard blocking mpi send (send)' ; ii = ii + 1 266 CALL mpi_init( ierr ) 267 CASE ( 'B' ) ! Buffer mpi send (blocking) 268 WRITE(ldtxt(ii),*) ' Buffer blocking mpi send (bsend)' ; ii = ii + 1 269 IF( Agrif_Root() ) CALL mpi_init_oce( ldtxt, ii, ierr ) 270 CASE ( 'I' ) ! Immediate mpi send (non-blocking send) 271 WRITE(ldtxt(ii),*) ' Immediate non-blocking send (isend)' ; ii = ii + 1 272 l_isend = .TRUE. 273 CALL mpi_init( ierr ) 274 CASE DEFAULT 275 WRITE(ldtxt(ii),cform_err) ; ii = ii + 1 276 WRITE(ldtxt(ii),*) ' bad value for cn_mpi_send = ', cn_mpi_send ; ii = ii + 1 277 kstop = kstop + 1 278 END SELECT 279 ! 280 ENDIF 281 184 INTEGER :: ierr 185 LOGICAL :: llmpi_init 186 !!---------------------------------------------------------------------- 187 #if defined key_mpp_mpi 188 ! 189 CALL mpi_initialized ( llmpi_init, ierr ) 190 IF( ierr /= MPI_SUCCESS ) CALL ctl_stop( 'STOP', ' lib_mpp: Error in routine mpi_initialized' ) 191 192 IF( .NOT. llmpi_init ) THEN 193 IF( PRESENT(localComm) ) THEN 194 WRITE(ctmp1,*) ' lib_mpp: You cannot provide a local communicator ' 195 WRITE(ctmp2,*) ' without calling MPI_Init before ! ' 196 CALL ctl_stop( 'STOP', ctmp1, ctmp2 ) 197 ENDIF 198 CALL mpi_init( ierr ) 199 IF( ierr /= MPI_SUCCESS ) CALL ctl_stop( 'STOP', ' lib_mpp: Error in routine mpi_init' ) 200 ENDIF 201 282 202 IF( PRESENT(localComm) ) THEN 283 203 IF( Agrif_Root() ) THEN … … 285 205 ENDIF 286 206 ELSE 287 CALL mpi_comm_dup( mpi_comm_world, mpi_comm_oce, code) 288 IF( code /= MPI_SUCCESS ) THEN 289 DO ji = 1, SIZE(ldtxt) 290 IF( TRIM(ldtxt(ji)) /= '' ) WRITE(*,*) ldtxt(ji) ! control print of mynode 291 END DO 292 WRITE(*, cform_err) 293 WRITE(*, *) ' lib_mpp: Error in routine mpi_comm_dup' 294 CALL mpi_abort( mpi_comm_world, code, ierr ) 295 ENDIF 207 CALL mpi_comm_dup( mpi_comm_world, mpi_comm_oce, ierr) 208 IF( ierr /= MPI_SUCCESS ) CALL ctl_stop( 'STOP', ' lib_mpp: Error in routine mpi_comm_dup' ) 296 209 ENDIF 297 210 … … 306 219 CALL mpi_comm_rank( mpi_comm_oce, mpprank, ierr ) 307 220 CALL mpi_comm_size( mpi_comm_oce, mppsize, ierr ) 308 mynode = mpprank309 310 IF( mynode == 0 ) THEN311 CALL ctl_opn( kumond, TRIM(ldname), 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. , 1 )312 WRITE(kumond, nammpp)313 ENDIF314 221 ! 315 222 CALL MPI_OP_CREATE(DDPDD_MPI, .TRUE., MPI_SUMDD, ierr) … … 317 224 #else 318 225 IF( PRESENT( localComm ) ) mpi_comm_oce = localComm 319 m ynode = 0320 CALL ctl_opn( kumond, TRIM(ldname), 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. , 1 )321 #endif 322 END FUNCTION mynode226 mppsize = 1 227 mpprank = 0 228 #endif 229 END SUBROUTINE mpp_start 323 230 324 231 … … 340 247 ! 341 248 #if defined key_mpp_mpi 342 SELECT CASE ( cn_mpi_send ) 343 CASE ( 'S' ) ! Standard mpi send (blocking) 344 CALL mpi_send ( pmess, kbytes, mpi_double_precision, kdest , ktyp, mpi_comm_oce , iflag ) 345 CASE ( 'B' ) ! Buffer mpi send (blocking) 346 CALL mpi_bsend( pmess, kbytes, mpi_double_precision, kdest , ktyp, mpi_comm_oce , iflag ) 347 CASE ( 'I' ) ! Immediate mpi send (non-blocking send) 348 ! be carefull, one more argument here : the mpi request identifier.. 349 CALL mpi_isend( pmess, kbytes, mpi_double_precision, kdest , ktyp, mpi_comm_oce, md_req, iflag ) 350 END SELECT 249 CALL mpi_isend( pmess, kbytes, mpi_double_precision, kdest , ktyp, mpi_comm_oce, md_req, iflag ) 351 250 #endif 352 251 ! … … 836 735 ! 837 736 ALLOCATE( kwork(jpnij), STAT=ierr ) 838 IF( ierr /= 0 ) THEN 839 WRITE(kumout, cform_err) 840 WRITE(kumout,*) 'mpp_ini_znl : failed to allocate 1D array of length jpnij' 841 CALL mppstop 842 ENDIF 737 IF( ierr /= 0 ) CALL ctl_stop( 'STOP', 'mpp_ini_znl : failed to allocate 1D array of length jpnij') 843 738 844 739 IF( jpnj == 1 ) THEN … … 968 863 #endif 969 864 END SUBROUTINE mpp_ini_north 970 971 972 SUBROUTINE mpi_init_oce( ldtxt, ksft, code )973 !!---------------------------------------------------------------------974 !! *** routine mpp_init.opa ***975 !!976 !! ** Purpose :: export and attach a MPI buffer for bsend977 !!978 !! ** Method :: define buffer size in namelist, if 0 no buffer attachment979 !! but classical mpi_init980 !!981 !! History :: 01/11 :: IDRIS initial version for IBM only982 !! 08/04 :: R. Benshila, generalisation983 !!---------------------------------------------------------------------984 CHARACTER(len=*),DIMENSION(:), INTENT( out) :: ldtxt985 INTEGER , INTENT(inout) :: ksft986 INTEGER , INTENT( out) :: code987 INTEGER :: ierr, ji988 LOGICAL :: mpi_was_called989 !!---------------------------------------------------------------------990 #if defined key_mpp_mpi991 !992 CALL mpi_initialized( mpi_was_called, code ) ! MPI initialization993 IF ( code /= MPI_SUCCESS ) THEN994 DO ji = 1, SIZE(ldtxt)995 IF( TRIM(ldtxt(ji)) /= '' ) WRITE(*,*) ldtxt(ji) ! control print of mynode996 END DO997 WRITE(*, cform_err)998 WRITE(*, *) ' lib_mpp: Error in routine mpi_initialized'999 CALL mpi_abort( mpi_comm_world, code, ierr )1000 ENDIF1001 !1002 IF( .NOT. mpi_was_called ) THEN1003 CALL mpi_init( code )1004 CALL mpi_comm_dup( mpi_comm_world, mpi_comm_oce, code )1005 IF ( code /= MPI_SUCCESS ) THEN1006 DO ji = 1, SIZE(ldtxt)1007 IF( TRIM(ldtxt(ji)) /= '' ) WRITE(*,*) ldtxt(ji) ! control print of mynode1008 END DO1009 WRITE(*, cform_err)1010 WRITE(*, *) ' lib_mpp: Error in routine mpi_comm_dup'1011 CALL mpi_abort( mpi_comm_world, code, ierr )1012 ENDIF1013 ENDIF1014 !1015 IF( nn_buffer > 0 ) THEN1016 WRITE(ldtxt(ksft),*) 'mpi_bsend, buffer allocation of : ', nn_buffer ; ksft = ksft + 11017 ! Buffer allocation and attachment1018 ALLOCATE( tampon(nn_buffer), stat = ierr )1019 IF( ierr /= 0 ) THEN1020 DO ji = 1, SIZE(ldtxt)1021 IF( TRIM(ldtxt(ji)) /= '' ) WRITE(*,*) ldtxt(ji) ! control print of mynode1022 END DO1023 WRITE(*, cform_err)1024 WRITE(*, *) ' lib_mpp: Error in ALLOCATE', ierr1025 CALL mpi_abort( mpi_comm_world, code, ierr )1026 END IF1027 CALL mpi_buffer_attach( tampon, nn_buffer, code )1028 ENDIF1029 !1030 #endif1031 END SUBROUTINE mpi_init_oce1032 865 1033 866 … … 1240 1073 !! increment the error number (nstop) by one. 1241 1074 !!---------------------------------------------------------------------- 1242 CHARACTER(len=*), INTENT(in), OPTIONAL :: cd1, cd2, cd3, cd4, cd5 1243 CHARACTER(len=*), INTENT(in), OPTIONAL :: cd6, cd7, cd8, cd9, cd10 1075 CHARACTER(len=*), INTENT(in ) :: cd1 1076 CHARACTER(len=*), INTENT(in ), OPTIONAL :: cd2, cd3, cd4, cd5 1077 CHARACTER(len=*), INTENT(in ), OPTIONAL :: cd6, cd7, cd8, cd9, cd10 1244 1078 !!---------------------------------------------------------------------- 1245 1079 ! 1246 1080 nstop = nstop + 1 1247 1248 ! force to open ocean.output file 1081 ! 1082 ! force to open ocean.output file if not already opened 1249 1083 IF( numout == 6 ) CALL ctl_opn( numout, 'ocean.output', 'APPEND', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 1250 1251 WRITE(numout,cform_err) 1252 IF( PRESENT(cd1 ) ) WRITE(numout,*) TRIM(cd1) 1084 ! 1085 WRITE(numout,*) 1086 WRITE(numout,*) ' ===>>> : E R R O R' 1087 WRITE(numout,*) 1088 WRITE(numout,*) ' ===========' 1089 WRITE(numout,*) 1090 WRITE(numout,*) TRIM(cd1) 1253 1091 IF( PRESENT(cd2 ) ) WRITE(numout,*) TRIM(cd2) 1254 1092 IF( PRESENT(cd3 ) ) WRITE(numout,*) TRIM(cd3) … … 1260 1098 IF( PRESENT(cd9 ) ) WRITE(numout,*) TRIM(cd9) 1261 1099 IF( PRESENT(cd10) ) WRITE(numout,*) TRIM(cd10) 1262 1100 WRITE(numout,*) 1101 ! 1263 1102 CALL FLUSH(numout ) 1264 1103 IF( numstp /= -1 ) CALL FLUSH(numstp ) … … 1267 1106 ! 1268 1107 IF( cd1 == 'STOP' ) THEN 1108 WRITE(numout,*) 1269 1109 WRITE(numout,*) 'huge E-R-R-O-R : immediate stop' 1270 CALL mppstop(ld_force_abort = .true.) 1110 WRITE(numout,*) 1111 CALL mppstop( ld_force_abort = .true. ) 1271 1112 ENDIF 1272 1113 ! … … 1287 1128 ! 1288 1129 nwarn = nwarn + 1 1130 ! 1289 1131 IF(lwp) THEN 1290 WRITE(numout,cform_war) 1291 IF( PRESENT(cd1 ) ) WRITE(numout,*) TRIM(cd1) 1292 IF( PRESENT(cd2 ) ) WRITE(numout,*) TRIM(cd2) 1293 IF( PRESENT(cd3 ) ) WRITE(numout,*) TRIM(cd3) 1294 IF( PRESENT(cd4 ) ) WRITE(numout,*) TRIM(cd4) 1295 IF( PRESENT(cd5 ) ) WRITE(numout,*) TRIM(cd5) 1296 IF( PRESENT(cd6 ) ) WRITE(numout,*) TRIM(cd6) 1297 IF( PRESENT(cd7 ) ) WRITE(numout,*) TRIM(cd7) 1298 IF( PRESENT(cd8 ) ) WRITE(numout,*) TRIM(cd8) 1299 IF( PRESENT(cd9 ) ) WRITE(numout,*) TRIM(cd9) 1300 IF( PRESENT(cd10) ) WRITE(numout,*) TRIM(cd10) 1132 WRITE(numout,*) 1133 WRITE(numout,*) ' ===>>> : W A R N I N G' 1134 WRITE(numout,*) 1135 WRITE(numout,*) ' ===============' 1136 WRITE(numout,*) 1137 IF( PRESENT(cd1 ) ) WRITE(numout,*) TRIM(cd1) 1138 IF( PRESENT(cd2 ) ) WRITE(numout,*) TRIM(cd2) 1139 IF( PRESENT(cd3 ) ) WRITE(numout,*) TRIM(cd3) 1140 IF( PRESENT(cd4 ) ) WRITE(numout,*) TRIM(cd4) 1141 IF( PRESENT(cd5 ) ) WRITE(numout,*) TRIM(cd5) 1142 IF( PRESENT(cd6 ) ) WRITE(numout,*) TRIM(cd6) 1143 IF( PRESENT(cd7 ) ) WRITE(numout,*) TRIM(cd7) 1144 IF( PRESENT(cd8 ) ) WRITE(numout,*) TRIM(cd8) 1145 IF( PRESENT(cd9 ) ) WRITE(numout,*) TRIM(cd9) 1146 IF( PRESENT(cd10) ) WRITE(numout,*) TRIM(cd10) 1147 WRITE(numout,*) 1301 1148 ENDIF 1302 1149 CALL FLUSH(numout) … … 1341 1188 IF( TRIM(cdfile) == '/dev/null' ) clfile = TRIM(cdfile) ! force the use of /dev/null 1342 1189 ! 1343 iost=0 1344 IF( cdacce(1:6) == 'DIRECT' ) THEN ! cdacce has always more than 6 characters 1190 IF( cdacce(1:6) == 'DIRECT' ) THEN ! cdacce has always more than 6 characters 1345 1191 OPEN( UNIT=knum, FILE=clfile, FORM=cdform, ACCESS=cdacce, STATUS=cdstat, RECL=klengh , ERR=100, IOSTAT=iost ) 1346 1192 ELSE IF( TRIM(cdstat) == 'APPEND' ) THEN ! cdstat can have less than 6 characters … … 1363 1209 100 CONTINUE 1364 1210 IF( iost /= 0 ) THEN 1365 IF(ldwp) THEN 1366 WRITE(kout,*) 1367 WRITE(kout,*) ' ===>>>> : bad opening file: ', TRIM(clfile) 1368 WRITE(kout,*) ' ======= === ' 1369 WRITE(kout,*) ' unit = ', knum 1370 WRITE(kout,*) ' status = ', cdstat 1371 WRITE(kout,*) ' form = ', cdform 1372 WRITE(kout,*) ' access = ', cdacce 1373 WRITE(kout,*) ' iostat = ', iost 1374 WRITE(kout,*) ' we stop. verify the file ' 1375 WRITE(kout,*) 1376 ELSE !!! Force writing to make sure we get the information - at least once - in this violent STOP!! 1377 WRITE(*,*) 1378 WRITE(*,*) ' ===>>>> : bad opening file: ', TRIM(clfile) 1379 WRITE(*,*) ' ======= === ' 1380 WRITE(*,*) ' unit = ', knum 1381 WRITE(*,*) ' status = ', cdstat 1382 WRITE(*,*) ' form = ', cdform 1383 WRITE(*,*) ' access = ', cdacce 1384 WRITE(*,*) ' iostat = ', iost 1385 WRITE(*,*) ' we stop. verify the file ' 1386 WRITE(*,*) 1387 ENDIF 1388 CALL FLUSH( kout ) 1389 STOP 'ctl_opn bad opening' 1211 WRITE(ctmp1,*) ' ===>>>> : bad opening file: ', TRIM(clfile) 1212 WRITE(ctmp2,*) ' ======= === ' 1213 WRITE(ctmp3,*) ' unit = ', knum 1214 WRITE(ctmp4,*) ' status = ', cdstat 1215 WRITE(ctmp5,*) ' form = ', cdform 1216 WRITE(ctmp6,*) ' access = ', cdacce 1217 WRITE(ctmp7,*) ' iostat = ', iost 1218 WRITE(ctmp8,*) ' we stop. verify the file ' 1219 CALL ctl_stop( 'STOP', ctmp1, ctmp2, ctmp3, ctmp4, ctmp5, ctmp6, ctmp7, ctmp8 ) 1390 1220 ENDIF 1391 1221 ! … … 1393 1223 1394 1224 1395 SUBROUTINE ctl_nam ( kios, cdnam , ldwp)1225 SUBROUTINE ctl_nam ( kios, cdnam ) 1396 1226 !!---------------------------------------------------------------------- 1397 1227 !! *** ROUTINE ctl_nam *** … … 1401 1231 !! ** Method : Fortan open 1402 1232 !!---------------------------------------------------------------------- 1403 INTEGER , INTENT(inout) :: kios ! IO status after reading the namelist1404 CHARACTER(len=*) , INTENT(in ) :: cdnam ! group name of namelist for which error occurs1405 CHARACTER(len=5) :: clios ! string to convert iostat in character for print1406 LOGICAL , INTENT(in ) :: ldwp ! boolean termfor print1233 INTEGER , INTENT(inout) :: kios ! IO status after reading the namelist 1234 CHARACTER(len=*) , INTENT(in ) :: cdnam ! group name of namelist for which error occurs 1235 ! 1236 CHARACTER(len=5) :: clios ! string to convert iostat in character for print 1407 1237 !!---------------------------------------------------------------------- 1408 1238 ! … … 1418 1248 ENDIF 1419 1249 kios = 0 1420 RETURN1421 1250 ! 1422 1251 END SUBROUTINE ctl_nam … … 1439 1268 END DO 1440 1269 IF( (get_unit == 999) .AND. llopn ) THEN 1441 CALL ctl_stop( 'get_unit: All logical units until 999 are used...' ) 1442 get_unit = -1 1270 CALL ctl_stop( 'STOP', 'get_unit: All logical units until 999 are used...' ) 1443 1271 ENDIF 1444 1272 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/LBC/mpp_nfd_generic.h90
r10440 r11317 76 76 ipf = F_SIZE(ptab) ! 5th - use in "multi" case (array of pointers) 77 77 ! 78 IF( l_north_nogather ) THEN !== ????==!78 IF( l_north_nogather ) THEN !== no allgather exchanges ==! 79 79 80 80 ALLOCATE(ipj_s(ipf)) … … 200 200 ENDIF 201 201 END DO 202 IF( l_isend ) THEN 203 DO jr = 1,nsndto 204 IF( nfipproc(isendto(jr),jpnj) /= narea-1 .AND. nfipproc(isendto(jr),jpnj) /= -1 ) THEN 205 CALL mpi_wait( ml_req_nf(jr), ml_stat, ml_err ) 206 ENDIF 207 END DO 208 ENDIF 202 DO jr = 1,nsndto 203 IF( nfipproc(isendto(jr),jpnj) /= narea-1 .AND. nfipproc(isendto(jr),jpnj) /= -1 ) THEN 204 CALL mpi_wait( ml_req_nf(jr), ml_stat, ml_err ) 205 ENDIF 206 END DO 209 207 ! 210 208 IF( ln_timing ) CALL tic_tac(.FALSE.) … … 213 211 ! 214 212 DO jf = 1, ipf 215 CALL lbc_nfd_nogather(ARRAY_IN(:,:,:,:,jf), ztabr(:,1:ipj_s(jf),:,:,jf), cd_nat LBC_ARG, psgn LBC_ARG ) 216 END DO 217 ! 218 DEALLOCATE( zfoldwk ) 219 DEALLOCATE( ztabr ) 220 DEALLOCATE( jj_s ) 221 DEALLOCATE( ipj_s ) 222 ELSE !== ???? ==! 213 CALL lbc_nfd_nogather( ARRAY_IN(:,:,:,:,jf), ztabr(:,1:ipj_s(jf),:,:,jf), cd_nat LBC_ARG, psgn LBC_ARG ) 214 END DO 215 ! 216 DEALLOCATE( zfoldwk, ztabr, jj_s, ipj_s ) 217 ! 218 ELSE !== allgather exchanges ==! 223 219 ! 224 220 ipj = 4 ! 2nd dimension of message transfers (last j-lines) -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/LBC/mppini.F90
r11263 r11317 168 168 & rn_ice_tem, rn_ice_sal, rn_ice_age, & 169 169 & ln_vol, nn_volctl, nn_rimwidth 170 !!---------------------------------------------------------------------- 171 170 NAMELIST/nammpp/ jpni, jpnj, ln_nnogather 171 !!---------------------------------------------------------------------- 172 ! 172 173 llwrtlay = lwp .OR. ln_ctl .OR. sn_cfctl%l_layout 174 ! 175 ! 0. read namelists parameters 176 ! ----------------------------------- 177 ! 178 REWIND( numnam_ref ) ! Namelist nammpp in reference namelist 179 READ ( numnam_ref, nammpp, IOSTAT = ios, ERR = 901 ) 180 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nammpp in reference namelist' ) 181 REWIND( numnam_cfg ) ! Namelist nammpp in confguration namelist 182 READ ( numnam_cfg, nammpp, IOSTAT = ios, ERR = 902 ) 183 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'nammpp in configuration namelist' ) 184 ! 185 IF(lwp) THEN 186 WRITE(numout,*) ' Namelist nammpp' 187 IF( jpni < 1 .OR. jpnj < 1 ) THEN 188 WRITE(numout,*) ' jpni and jpnj will be calculated automatically' 189 ELSE 190 WRITE(numout,*) ' processor grid extent in i jpni = ', jpni 191 WRITE(numout,*) ' processor grid extent in j jpnj = ', jpnj 192 ENDIF 193 WRITE(numout,*) ' avoid use of mpi_allgather at the north fold ln_nnogather = ', ln_nnogather 194 ENDIF 195 ! 196 IF(lwm) WRITE( numond, nammpp ) 197 173 198 ! do we need to take into account bdy_msk? 174 199 REWIND( numnam_ref ) ! Namelist nambdy in reference namelist : BDY 175 200 READ ( numnam_ref, nambdy, IOSTAT = ios, ERR = 903) 176 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambdy in reference namelist (mppini)' , lwp)201 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambdy in reference namelist (mppini)' ) 177 202 REWIND( numnam_cfg ) ! Namelist nambdy in configuration namelist : BDY 178 203 READ ( numnam_cfg, nambdy, IOSTAT = ios, ERR = 904 ) 179 904 IF( ios > 0 ) CALL ctl_nam ( ios , 'nambdy in configuration namelist (mppini)' , lwp)204 904 IF( ios > 0 ) CALL ctl_nam ( ios , 'nambdy in configuration namelist (mppini)' ) 180 205 ! 181 206 IF( ln_read_cfg ) CALL iom_open( cn_domcfg, numbot ) -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/LDF/ldfdyn.F90
r10784 r11317 117 117 REWIND( numnam_ref ) ! Namelist namdyn_ldf in reference namelist : Lateral physics 118 118 READ ( numnam_ref, namdyn_ldf, IOSTAT = ios, ERR = 901) 119 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_ldf in reference namelist' , lwp)119 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_ldf in reference namelist' ) 120 120 121 121 REWIND( numnam_cfg ) ! Namelist namdyn_ldf in configuration namelist : Lateral physics 122 122 READ ( numnam_cfg, namdyn_ldf, IOSTAT = ios, ERR = 902 ) 123 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namdyn_ldf in configuration namelist' , lwp)123 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namdyn_ldf in configuration namelist' ) 124 124 IF(lwm) WRITE ( numond, namdyn_ldf ) 125 125 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/LDF/ldftra.F90
r10425 r11317 154 154 REWIND( numnam_ref ) ! Namelist namtra_ldf in reference namelist : Lateral physics on tracers 155 155 READ ( numnam_ref, namtra_ldf, IOSTAT = ios, ERR = 901) 156 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtra_ldf in reference namelist' , lwp)156 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtra_ldf in reference namelist' ) 157 157 REWIND( numnam_cfg ) ! Namelist namtra_ldf in configuration namelist : Lateral physics on tracers 158 158 READ ( numnam_cfg, namtra_ldf, IOSTAT = ios, ERR = 902 ) 159 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namtra_ldf in configuration namelist' , lwp)159 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namtra_ldf in configuration namelist' ) 160 160 IF(lwm) WRITE( numond, namtra_ldf ) 161 161 ! … … 512 512 REWIND( numnam_ref ) ! Namelist namtra_eiv in reference namelist : eddy induced velocity param. 513 513 READ ( numnam_ref, namtra_eiv, IOSTAT = ios, ERR = 901) 514 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtra_eiv in reference namelist' , lwp)514 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtra_eiv in reference namelist' ) 515 515 ! 516 516 REWIND( numnam_cfg ) ! Namelist namtra_eiv in configuration namelist : eddy induced velocity param. 517 517 READ ( numnam_cfg, namtra_eiv, IOSTAT = ios, ERR = 902 ) 518 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namtra_eiv in configuration namelist' , lwp)518 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namtra_eiv in configuration namelist' ) 519 519 IF(lwm) WRITE ( numond, namtra_eiv ) 520 520 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/OBS/diaobs.F90
r10068 r11317 203 203 REWIND( numnam_ref ) ! Namelist namobs in reference namelist 204 204 READ ( numnam_ref, namobs, IOSTAT = ios, ERR = 901) 205 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namobs in reference namelist' , lwp)205 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namobs in reference namelist' ) 206 206 REWIND( numnam_cfg ) ! Namelist namobs in configuration namelist 207 207 READ ( numnam_cfg, namobs, IOSTAT = ios, ERR = 902 ) 208 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namobs in configuration namelist' , lwp)208 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namobs in configuration namelist' ) 209 209 IF(lwm) WRITE ( numond, namobs ) 210 210 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/SBC/sbcapr.F90
r11263 r11317 71 71 REWIND( numnam_ref ) ! Namelist namsbc_apr in reference namelist : File for atmospheric pressure forcing 72 72 READ ( numnam_ref, namsbc_apr, IOSTAT = ios, ERR = 901) 73 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_apr in reference namelist' , lwp)73 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_apr in reference namelist' ) 74 74 75 75 REWIND( numnam_cfg ) ! Namelist namsbc_apr in configuration namelist : File for atmospheric pressure forcing 76 76 READ ( numnam_cfg, namsbc_apr, IOSTAT = ios, ERR = 902 ) 77 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namsbc_apr in configuration namelist' , lwp)77 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namsbc_apr in configuration namelist' ) 78 78 IF(lwm) WRITE ( numond, namsbc_apr ) 79 79 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/SBC/sbcblk.F90
r11267 r11317 182 182 REWIND( numnam_ref ) !* Namelist namsbc_blk in reference namelist : bulk parameters 183 183 READ ( numnam_ref, namsbc_blk, IOSTAT = ios, ERR = 901) 184 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_blk in reference namelist' , lwp)184 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_blk in reference namelist' ) 185 185 ! 186 186 REWIND( numnam_cfg ) !* Namelist namsbc_blk in configuration namelist : bulk parameters 187 187 READ ( numnam_cfg, namsbc_blk, IOSTAT = ios, ERR = 902 ) 188 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namsbc_blk in configuration namelist' , lwp)188 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namsbc_blk in configuration namelist' ) 189 189 ! 190 190 IF(lwm) WRITE( numond, namsbc_blk ) -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/SBC/sbccpl.F90
r10617 r11317 266 266 REWIND( numnam_ref ) ! Namelist namsbc_cpl in reference namelist : Variables for OASIS coupling 267 267 READ ( numnam_ref, namsbc_cpl, IOSTAT = ios, ERR = 901) 268 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_cpl in reference namelist' , lwp)268 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_cpl in reference namelist' ) 269 269 ! 270 270 REWIND( numnam_cfg ) ! Namelist namsbc_cpl in configuration namelist : Variables for OASIS coupling 271 271 READ ( numnam_cfg, namsbc_cpl, IOSTAT = ios, ERR = 902 ) 272 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namsbc_cpl in configuration namelist' , lwp)272 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namsbc_cpl in configuration namelist' ) 273 273 IF(lwm) WRITE ( numond, namsbc_cpl ) 274 274 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/SBC/sbcflx.F90
r11267 r11317 93 93 REWIND( numnam_ref ) ! Namelist namsbc_flx in reference namelist : Files for fluxes 94 94 READ ( numnam_ref, namsbc_flx, IOSTAT = ios, ERR = 901) 95 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_flx in reference namelist' , lwp)95 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_flx in reference namelist' ) 96 96 97 97 REWIND( numnam_cfg ) ! Namelist namsbc_flx in configuration namelist : Files for fluxes 98 98 READ ( numnam_cfg, namsbc_flx, IOSTAT = ios, ERR = 902 ) 99 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namsbc_flx in configuration namelist' , lwp)99 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namsbc_flx in configuration namelist' ) 100 100 IF(lwm) WRITE ( numond, namsbc_flx ) 101 101 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/SBC/sbcice_cice.F90
r10425 r11317 764 764 REWIND( numnam_ref ) ! Namelist namsbc_cice in reference namelist : 765 765 READ ( numnam_ref, namsbc_cice, IOSTAT = ios, ERR = 901) 766 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_cice in reference namelist' , lwp)766 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_cice in reference namelist' ) 767 767 768 768 REWIND( numnam_cfg ) ! Namelist namsbc_cice in configuration namelist : Parameters of the run 769 769 READ ( numnam_cfg, namsbc_cice, IOSTAT = ios, ERR = 902 ) 770 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namsbc_cice in configuration namelist' , lwp)770 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namsbc_cice in configuration namelist' ) 771 771 IF(lwm) WRITE ( numond, namsbc_cice ) 772 772 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/SBC/sbcice_if.F90
r10068 r11317 76 76 REWIND( numnam_ref ) ! Namelist namsbc_iif in reference namelist : Ice if file 77 77 READ ( numnam_ref, namsbc_iif, IOSTAT = ios, ERR = 901) 78 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_iif in reference namelist' , lwp)78 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_iif in reference namelist' ) 79 79 80 80 REWIND( numnam_cfg ) ! Namelist Namelist namsbc_iif in configuration namelist : Ice if file 81 81 READ ( numnam_cfg, namsbc_iif, IOSTAT = ios, ERR = 902 ) 82 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namsbc_iif in configuration namelist' , lwp)82 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namsbc_iif in configuration namelist' ) 83 83 IF(lwm) WRITE ( numond, namsbc_iif ) 84 84 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/SBC/sbcisf.F90
r10536 r11317 278 278 REWIND( numnam_ref ) ! Namelist namsbc_rnf in reference namelist : Runoffs 279 279 READ ( numnam_ref, namsbc_isf, IOSTAT = ios, ERR = 901) 280 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_isf in reference namelist' , lwp)280 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_isf in reference namelist' ) 281 281 282 282 REWIND( numnam_cfg ) ! Namelist namsbc_rnf in configuration namelist : Runoffs 283 283 READ ( numnam_cfg, namsbc_isf, IOSTAT = ios, ERR = 902 ) 284 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namsbc_isf in configuration namelist' , lwp)284 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namsbc_isf in configuration namelist' ) 285 285 IF(lwm) WRITE ( numond, namsbc_isf ) 286 286 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/SBC/sbcmod.F90
r10499 r11317 110 110 REWIND( numnam_ref ) !* Namelist namsbc in reference namelist : Surface boundary 111 111 READ ( numnam_ref, namsbc, IOSTAT = ios, ERR = 901) 112 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc in reference namelist' , lwp)112 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc in reference namelist' ) 113 113 REWIND( numnam_cfg ) !* Namelist namsbc in configuration namelist : Parameters of the run 114 114 READ ( numnam_cfg, namsbc, IOSTAT = ios, ERR = 902 ) 115 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namsbc in configuration namelist' , lwp)115 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namsbc in configuration namelist' ) 116 116 IF(lwm) WRITE( numond, namsbc ) 117 117 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/SBC/sbcrnf.F90
r10523 r11317 267 267 REWIND( numnam_ref ) ! Namelist namsbc_rnf in reference namelist : Runoffs 268 268 READ ( numnam_ref, namsbc_rnf, IOSTAT = ios, ERR = 901) 269 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_rnf in reference namelist' , lwp)269 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_rnf in reference namelist' ) 270 270 271 271 REWIND( numnam_cfg ) ! Namelist namsbc_rnf in configuration namelist : Runoffs 272 272 READ ( numnam_cfg, namsbc_rnf, IOSTAT = ios, ERR = 902 ) 273 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namsbc_rnf in configuration namelist' , lwp)273 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namsbc_rnf in configuration namelist' ) 274 274 IF(lwm) WRITE ( numond, namsbc_rnf ) 275 275 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/SBC/sbcssr.F90
r10068 r11317 166 166 REWIND( numnam_ref ) ! Namelist namsbc_ssr in reference namelist : 167 167 READ ( numnam_ref, namsbc_ssr, IOSTAT = ios, ERR = 901) 168 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_ssr in reference namelist' , lwp)168 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_ssr in reference namelist' ) 169 169 170 170 REWIND( numnam_cfg ) ! Namelist namsbc_ssr in configuration namelist : 171 171 READ ( numnam_cfg, namsbc_ssr, IOSTAT = ios, ERR = 902 ) 172 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namsbc_ssr in configuration namelist' , lwp)172 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namsbc_ssr in configuration namelist' ) 173 173 IF(lwm) WRITE ( numond, namsbc_ssr ) 174 174 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/SBC/sbcwave.F90
r10425 r11317 397 397 REWIND( numnam_ref ) ! Namelist namsbc_wave in reference namelist : File for drag coeff. from wave model 398 398 READ ( numnam_ref, namsbc_wave, IOSTAT = ios, ERR = 901) 399 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_wave in reference namelist' , lwp)399 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_wave in reference namelist' ) 400 400 401 401 REWIND( numnam_cfg ) ! Namelist namsbc_wave in configuration namelist : File for drag coeff. from wave model 402 402 READ ( numnam_cfg, namsbc_wave, IOSTAT = ios, ERR = 902 ) 403 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namsbc_wave in configuration namelist' , lwp)403 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namsbc_wave in configuration namelist' ) 404 404 IF(lwm) WRITE ( numond, namsbc_wave ) 405 405 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/SBC/tideini.F90
r10068 r11317 60 60 REWIND( numnam_ref ) ! Namelist nam_tide in reference namelist : Tides 61 61 READ ( numnam_ref, nam_tide, IOSTAT = ios, ERR = 901) 62 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_tide in reference namelist' , lwp)62 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_tide in reference namelist' ) 63 63 ! 64 64 REWIND( numnam_cfg ) ! Namelist nam_tide in configuration namelist : Tides 65 65 READ ( numnam_cfg, nam_tide, IOSTAT = ios, ERR = 902 ) 66 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'nam_tide in configuration namelist' , lwp)66 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'nam_tide in configuration namelist' ) 67 67 IF(lwm) WRITE ( numond, nam_tide ) 68 68 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/STO/stopar.F90
r10425 r11317 263 263 REWIND( numnam_ref ) ! Namelist namdyn_adv in reference namelist : Momentum advection scheme 264 264 READ ( numnam_ref, namsto, IOSTAT = ios, ERR = 901) 265 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsto in reference namelist' , lwp)265 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsto in reference namelist' ) 266 266 267 267 REWIND( numnam_cfg ) ! Namelist namdyn_adv in configuration namelist : Momentum advection scheme 268 268 READ ( numnam_cfg, namsto, IOSTAT = ios, ERR = 902 ) 269 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namsto in configuration namelist' , lwp)269 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namsto in configuration namelist' ) 270 270 IF(lwm) WRITE ( numond, namsto ) 271 271 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/TRA/eosbn2.F90
r10425 r11317 1235 1235 REWIND( numnam_ref ) ! Namelist nameos in reference namelist : equation of state 1236 1236 READ ( numnam_ref, nameos, IOSTAT = ios, ERR = 901 ) 1237 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nameos in reference namelist' , lwp)1237 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nameos in reference namelist' ) 1238 1238 ! 1239 1239 REWIND( numnam_cfg ) ! Namelist nameos in configuration namelist : equation of state 1240 1240 READ ( numnam_cfg, nameos, IOSTAT = ios, ERR = 902 ) 1241 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'nameos in configuration namelist' , lwp)1241 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'nameos in configuration namelist' ) 1242 1242 IF(lwm) WRITE( numond, nameos ) 1243 1243 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/TRA/traadv.F90
r10068 r11317 196 196 REWIND( numnam_ref ) ! Namelist namtra_adv in reference namelist : Tracer advection scheme 197 197 READ ( numnam_ref, namtra_adv, IOSTAT = ios, ERR = 901) 198 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtra_adv in reference namelist' , lwp)198 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtra_adv in reference namelist' ) 199 199 ! 200 200 REWIND( numnam_cfg ) ! Namelist namtra_adv in configuration namelist : Tracer advection scheme 201 201 READ ( numnam_cfg, namtra_adv, IOSTAT = ios, ERR = 902 ) 202 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namtra_adv in configuration namelist' , lwp)202 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namtra_adv in configuration namelist' ) 203 203 IF(lwm) WRITE( numond, namtra_adv ) 204 204 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/TRA/trabbc.F90
r10425 r11317 135 135 REWIND( numnam_ref ) ! Namelist nambbc in reference namelist : Bottom momentum boundary condition 136 136 READ ( numnam_ref, nambbc, IOSTAT = ios, ERR = 901) 137 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambbc in reference namelist' , lwp)137 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambbc in reference namelist' ) 138 138 ! 139 139 REWIND( numnam_cfg ) ! Namelist nambbc in configuration namelist : Bottom momentum boundary condition 140 140 READ ( numnam_cfg, nambbc, IOSTAT = ios, ERR = 902 ) 141 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'nambbc in configuration namelist' , lwp)141 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'nambbc in configuration namelist' ) 142 142 IF(lwm) WRITE ( numond, nambbc ) 143 143 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/TRA/trabbl.F90
r10425 r11317 485 485 REWIND( numnam_ref ) ! Namelist nambbl in reference namelist : Bottom boundary layer scheme 486 486 READ ( numnam_ref, nambbl, IOSTAT = ios, ERR = 901) 487 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambbl in reference namelist' , lwp)487 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambbl in reference namelist' ) 488 488 ! 489 489 REWIND( numnam_cfg ) ! Namelist nambbl in configuration namelist : Bottom boundary layer scheme 490 490 READ ( numnam_cfg, nambbl, IOSTAT = ios, ERR = 902 ) 491 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'nambbl in configuration namelist' , lwp)491 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'nambbl in configuration namelist' ) 492 492 IF(lwm) WRITE ( numond, nambbl ) 493 493 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/TRA/tradmp.F90
r10425 r11317 179 179 REWIND( numnam_ref ) ! Namelist namtra_dmp in reference namelist : T & S relaxation 180 180 READ ( numnam_ref, namtra_dmp, IOSTAT = ios, ERR = 901) 181 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtra_dmp in reference namelist' , lwp)181 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtra_dmp in reference namelist' ) 182 182 ! 183 183 REWIND( numnam_cfg ) ! Namelist namtra_dmp in configuration namelist : T & S relaxation 184 184 READ ( numnam_cfg, namtra_dmp, IOSTAT = ios, ERR = 902 ) 185 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namtra_dmp in configuration namelist' , lwp)185 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namtra_dmp in configuration namelist' ) 186 186 IF(lwm) WRITE ( numond, namtra_dmp ) 187 187 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/TRA/tramle.F90
r10425 r11317 268 268 REWIND( numnam_ref ) ! Namelist namtra_mle in reference namelist : Tracer advection scheme 269 269 READ ( numnam_ref, namtra_mle, IOSTAT = ios, ERR = 901) 270 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtra_mle in reference namelist' , lwp)270 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtra_mle in reference namelist' ) 271 271 272 272 REWIND( numnam_cfg ) ! Namelist namtra_mle in configuration namelist : Tracer advection scheme 273 273 READ ( numnam_cfg, namtra_mle, IOSTAT = ios, ERR = 902 ) 274 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namtra_mle in configuration namelist' , lwp)274 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namtra_mle in configuration namelist' ) 275 275 IF(lwm) WRITE ( numond, namtra_mle ) 276 276 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/TRA/traqsr.F90
r10425 r11317 338 338 REWIND( numnam_ref ) ! Namelist namtra_qsr in reference namelist 339 339 READ ( numnam_ref, namtra_qsr, IOSTAT = ios, ERR = 901) 340 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtra_qsr in reference namelist' , lwp)340 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtra_qsr in reference namelist' ) 341 341 ! 342 342 REWIND( numnam_cfg ) ! Namelist namtra_qsr in configuration namelist 343 343 READ ( numnam_cfg, namtra_qsr, IOSTAT = ios, ERR = 902 ) 344 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namtra_qsr in configuration namelist' , lwp)344 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namtra_qsr in configuration namelist' ) 345 345 IF(lwm) WRITE ( numond, namtra_qsr ) 346 346 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/TRD/trdini.F90
r10068 r11317 48 48 REWIND( numnam_ref ) ! Namelist namtrd in reference namelist : trends diagnostic 49 49 READ ( numnam_ref, namtrd, IOSTAT = ios, ERR = 901 ) 50 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrd in reference namelist' , lwp)50 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrd in reference namelist' ) 51 51 ! 52 52 REWIND( numnam_cfg ) ! Namelist namtrd in configuration namelist : trends diagnostic 53 53 READ ( numnam_cfg, namtrd, IOSTAT = ios, ERR = 902 ) 54 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namtrd in configuration namelist' , lwp)54 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namtrd in configuration namelist' ) 55 55 IF(lwm) WRITE( numond, namtrd ) 56 56 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/TRD/trdmxl.F90
r10425 r11317 734 734 REWIND( numnam_ref ) ! Namelist namtrd_mxl in reference namelist : mixed layer trends diagnostic 735 735 READ ( numnam_ref, namtrd_mxl, IOSTAT = ios, ERR = 901 ) 736 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrd_mxl in reference namelist' , lwp)736 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrd_mxl in reference namelist' ) 737 737 738 738 REWIND( numnam_cfg ) ! Namelist namtrd_mxl in configuration namelist : mixed layer trends diagnostic 739 739 READ ( numnam_cfg, namtrd_mxl, IOSTAT = ios, ERR = 902 ) 740 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namtrd_mxl in configuration namelist' , lwp)740 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namtrd_mxl in configuration namelist' ) 741 741 IF(lwm) WRITE( numond, namtrd_mxl ) 742 742 ! … … 764 764 765 765 IF( MOD( nitend, nn_trd ) /= 0 ) THEN 766 WRITE(numout,cform_err) 767 WRITE(numout,*) ' Your nitend parameter, nitend = ', nitend 768 WRITE(numout,*) ' is no multiple of the trends diagnostics frequency ' 769 WRITE(numout,*) ' you defined, nn_trd = ', nn_trd 770 WRITE(numout,*) ' This will not allow you to restart from this simulation. ' 771 WRITE(numout,*) ' You should reconsider this choice. ' 772 WRITE(numout,*) 773 WRITE(numout,*) ' N.B. the nitend parameter is also constrained to be a ' 774 WRITE(numout,*) ' multiple of the nn_fsbc parameter ' 775 CALL ctl_stop( 'trd_mxl_init: see comment just above' ) 766 WRITE(ctmp1,*) ' Your nitend parameter, nitend = ', nitend 767 WRITE(ctmp2,*) ' is no multiple of the trends diagnostics frequency ' 768 WRITE(ctmp3,*) ' you defined, nn_trd = ', nn_trd 769 WRITE(ctmp4,*) ' This will not allow you to restart from this simulation. ' 770 WRITE(ctmp5,*) ' You should reconsider this choice. ' 771 WRITE(ctmp6,*) 772 WRITE(ctmp7,*) ' N.B. the nitend parameter is also constrained to be a ' 773 WRITE(ctmp8,*) ' multiple of the nn_fsbc parameter ' 774 CALL ctl_stop( ctmp1, ctmp2, ctmp3, ctmp4, ctmp5, ctmp6, ctmp7, ctmp8 ) 776 775 END IF 777 776 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/USR/usrdef_nam.F90
r10069 r11317 37 37 CONTAINS 38 38 39 SUBROUTINE usr_def_nam( ldtxt, ldnam,cd_cfg, kk_cfg, kpi, kpj, kpk, kperio )39 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio ) 40 40 !!---------------------------------------------------------------------- 41 41 !! *** ROUTINE dom_nam *** … … 49 49 !! ** input : - namusr_def namelist found in namelist_cfg 50 50 !!---------------------------------------------------------------------- 51 CHARACTER(len=*), DIMENSION(:), INTENT(out) :: ldtxt, ldnam ! stored print information 52 CHARACTER(len=*) , INTENT(out) :: cd_cfg ! configuration name 53 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 54 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 55 INTEGER , INTENT(out) :: kperio ! lateral global domain b.c. 51 CHARACTER(len=*), INTENT(out) :: cd_cfg ! configuration name 52 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 53 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 54 INTEGER , INTENT(out) :: kperio ! lateral global domain b.c. 56 55 ! 57 INTEGER :: ios , ii! Local integer56 INTEGER :: ios ! Local integer 58 57 !! 59 58 NAMELIST/namusr_def/ nn_GYRE, ln_bench, jpkglo 60 59 !!---------------------------------------------------------------------- 61 60 ! 62 ii = 163 !64 61 REWIND( numnam_cfg ) ! Namelist namusr_def (exist in namelist_cfg only) 65 62 READ ( numnam_cfg, namusr_def, IOSTAT = ios, ERR = 902 ) 66 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namusr_def in configuration namelist' , .TRUE.)63 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namusr_def in configuration namelist' ) 67 64 ! 68 WRITE( ldnam(:), namusr_def )65 WRITE( numond, namusr_def ) 69 66 ! 70 67 cd_cfg = 'GYRE' ! name & resolution (not used) … … 85 82 ! 86 83 ! ! control print 87 WRITE( ldtxt(ii),*) ' ' ; ii = ii + 188 WRITE( ldtxt(ii),*) 'usr_def_nam : read the user defined namelist (namusr_def) in namelist_cfg' ; ii = ii + 189 WRITE( ldtxt(ii),*) '~~~~~~~~~~~ ' ; ii = ii + 190 WRITE( ldtxt(ii),*) ' Namelist namusr_def : GYRE case' ; ii = ii + 191 WRITE( ldtxt(ii),*) ' GYRE used as Benchmark (=T) ln_bench = ', ln_bench ; ii = ii + 192 WRITE( ldtxt(ii),*) ' inverse resolution & implied domain size nn_GYRE = ', nn_GYRE ; ii = ii + 184 WRITE(numout,*) ' ' 85 WRITE(numout,*) 'usr_def_nam : read the user defined namelist (namusr_def) in namelist_cfg' 86 WRITE(numout,*) '~~~~~~~~~~~ ' 87 WRITE(numout,*) ' Namelist namusr_def : GYRE case' 88 WRITE(numout,*) ' GYRE used as Benchmark (=T) ln_bench = ', ln_bench 89 WRITE(numout,*) ' inverse resolution & implied domain size nn_GYRE = ', nn_GYRE 93 90 #if defined key_agrif 94 91 IF( Agrif_Root() ) THEN 95 92 #endif 96 WRITE( ldtxt(ii),*) ' jpiglo = 30*nn_GYRE+2 jpiglo = ', kpi ; ii = ii + 197 WRITE( ldtxt(ii),*) ' jpjglo = 20*nn_GYRE+2 jpjglo = ', kpj ; ii = ii + 193 WRITE(numout,*) ' jpiglo = 30*nn_GYRE+2 jpiglo = ', kpi 94 WRITE(numout,*) ' jpjglo = 20*nn_GYRE+2 jpjglo = ', kpj 98 95 #if defined key_agrif 99 96 ENDIF 100 97 #endif 101 WRITE( ldtxt(ii),*) ' number of model levels jpkglo = ', kpk ; ii = ii + 198 WRITE(numout,*) ' number of model levels jpkglo = ', kpk 102 99 ! 103 100 ! ! Set the lateral boundary condition of the global domain 104 101 kperio = 0 ! GYRE configuration : closed domain 105 102 ! 106 WRITE( ldtxt(ii),*) ' ' ; ii = ii + 1107 WRITE( ldtxt(ii),*) ' Lateral b.c. of the global domain set to closed jperio = ', kperio ; ii = ii + 1103 WRITE(numout,*) ' ' 104 WRITE(numout,*) ' Lateral b.c. of the global domain set to closed jperio = ', kperio 108 105 ! 109 106 END SUBROUTINE usr_def_nam -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/ZDF/zdfdrg.F90
r10069 r11317 238 238 REWIND( numnam_ref ) ! Namelist namdrg in reference namelist 239 239 READ ( numnam_ref, namdrg, IOSTAT = ios, ERR = 901) 240 901 IF( ios /= 0 ) CALL ctl_nam( ios , 'namdrg in reference namelist' , lwp)240 901 IF( ios /= 0 ) CALL ctl_nam( ios , 'namdrg in reference namelist' ) 241 241 REWIND( numnam_cfg ) ! Namelist namdrg in configuration namelist 242 242 READ ( numnam_cfg, namdrg, IOSTAT = ios, ERR = 902 ) 243 902 IF( ios > 0 ) CALL ctl_nam( ios , 'namdrg in configuration namelist' , lwp)243 902 IF( ios > 0 ) CALL ctl_nam( ios , 'namdrg in configuration namelist' ) 244 244 IF(lwm) WRITE ( numond, namdrg ) 245 245 ! … … 338 338 IF(ll_top) READ ( numnam_ref, namdrg_top, IOSTAT = ios, ERR = 901) 339 339 IF(ll_bot) READ ( numnam_ref, namdrg_bot, IOSTAT = ios, ERR = 901) 340 901 IF( ios /= 0 ) CALL ctl_nam( ios , TRIM(cl_namref) , lwp)340 901 IF( ios /= 0 ) CALL ctl_nam( ios , TRIM(cl_namref) ) 341 341 REWIND( numnam_cfg ) ! Namelist cd_namdrg in configuration namelist 342 342 IF(ll_top) READ ( numnam_cfg, namdrg_top, IOSTAT = ios, ERR = 902 ) 343 343 IF(ll_bot) READ ( numnam_cfg, namdrg_bot, IOSTAT = ios, ERR = 902 ) 344 902 IF( ios > 0 ) CALL ctl_nam( ios , TRIM(cl_namcfg) , lwp)344 902 IF( ios > 0 ) CALL ctl_nam( ios , TRIM(cl_namcfg) ) 345 345 IF(lwm .AND. ll_top) WRITE ( numond, namdrg_top ) 346 346 IF(lwm .AND. ll_bot) WRITE ( numond, namdrg_bot ) -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/ZDF/zdfgls.F90
r10425 r11317 859 859 REWIND( numnam_ref ) ! Namelist namzdf_gls in reference namelist : Vertical eddy diffivity and viscosity using gls turbulent closure scheme 860 860 READ ( numnam_ref, namzdf_gls, IOSTAT = ios, ERR = 901) 861 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_gls in reference namelist' , lwp)861 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_gls in reference namelist' ) 862 862 863 863 REWIND( numnam_cfg ) ! Namelist namzdf_gls in configuration namelist : Vertical eddy diffivity and viscosity using gls turbulent closure scheme 864 864 READ ( numnam_cfg, namzdf_gls, IOSTAT = ios, ERR = 902 ) 865 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namzdf_gls in configuration namelist' , lwp)865 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namzdf_gls in configuration namelist' ) 866 866 IF(lwm) WRITE ( numond, namzdf_gls ) 867 867 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/ZDF/zdfiwm.F90
r10425 r11317 424 424 REWIND( numnam_ref ) ! Namelist namzdf_iwm in reference namelist : Wave-driven mixing 425 425 READ ( numnam_ref, namzdf_iwm, IOSTAT = ios, ERR = 901) 426 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_iwm in reference namelist' , lwp)426 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_iwm in reference namelist' ) 427 427 ! 428 428 REWIND( numnam_cfg ) ! Namelist namzdf_iwm in configuration namelist : Wave-driven mixing 429 429 READ ( numnam_cfg, namzdf_iwm, IOSTAT = ios, ERR = 902 ) 430 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namzdf_iwm in configuration namelist' , lwp)430 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namzdf_iwm in configuration namelist' ) 431 431 IF(lwm) WRITE ( numond, namzdf_iwm ) 432 432 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/ZDF/zdfosm.F90
r10425 r11317 1386 1386 REWIND( numnam_ref ) ! Namelist namzdf_osm in reference namelist : Osmosis ML model 1387 1387 READ ( numnam_ref, namzdf_osm, IOSTAT = ios, ERR = 901) 1388 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_osm in reference namelist' , lwp)1388 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_osm in reference namelist' ) 1389 1389 1390 1390 REWIND( numnam_cfg ) ! Namelist namzdf_tke in configuration namelist : Turbulent Kinetic Energy 1391 1391 READ ( numnam_cfg, namzdf_osm, IOSTAT = ios, ERR = 902 ) 1392 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namzdf_osm in configuration namelist' , lwp)1392 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namzdf_osm in configuration namelist' ) 1393 1393 IF(lwm) WRITE ( numond, namzdf_osm ) 1394 1394 -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/ZDF/zdfphy.F90
r10907 r11317 93 93 REWIND( numnam_ref ) ! Namelist namzdf in reference namelist : Vertical mixing parameters 94 94 READ ( numnam_ref, namzdf, IOSTAT = ios, ERR = 901) 95 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf in reference namelist' , lwp)95 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf in reference namelist' ) 96 96 ! 97 97 REWIND( numnam_cfg ) ! Namelist namzdf in reference namelist : Vertical mixing parameters 98 98 READ ( numnam_cfg, namzdf, IOSTAT = ios, ERR = 902 ) 99 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namzdf in configuration namelist' , lwp)99 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namzdf in configuration namelist' ) 100 100 IF(lwm) WRITE ( numond, namzdf ) 101 101 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/ZDF/zdfric.F90
r10068 r11317 80 80 REWIND( numnam_ref ) ! Namelist namzdf_ric in reference namelist : Vertical diffusion Kz depends on Richardson number 81 81 READ ( numnam_ref, namzdf_ric, IOSTAT = ios, ERR = 901) 82 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_ric in reference namelist' , lwp)82 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_ric in reference namelist' ) 83 83 84 84 REWIND( numnam_cfg ) ! Namelist namzdf_ric in configuration namelist : Vertical diffusion Kz depends on Richardson number 85 85 READ ( numnam_cfg, namzdf_ric, IOSTAT = ios, ERR = 902 ) 86 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namzdf_ric in configuration namelist' , lwp)86 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namzdf_ric in configuration namelist' ) 87 87 IF(lwm) WRITE ( numond, namzdf_ric ) 88 88 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/ZDF/zdftke.F90
r10425 r11317 658 658 REWIND( numnam_ref ) ! Namelist namzdf_tke in reference namelist : Turbulent Kinetic Energy 659 659 READ ( numnam_ref, namzdf_tke, IOSTAT = ios, ERR = 901) 660 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_tke in reference namelist' , lwp)660 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_tke in reference namelist' ) 661 661 662 662 REWIND( numnam_cfg ) ! Namelist namzdf_tke in configuration namelist : Turbulent Kinetic Energy 663 663 READ ( numnam_cfg, namzdf_tke, IOSTAT = ios, ERR = 902 ) 664 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namzdf_tke in configuration namelist' , lwp)664 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namzdf_tke in configuration namelist' ) 665 665 IF(lwm) WRITE ( numond, namzdf_tke ) 666 666 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/module_example
r10425 r11317 152 152 REWIND( numnam_ref ) ! Namelist namexa in reference namelist : Example 153 153 READ ( numnam_ref, namexa, IOSTAT = ios, ERR = 901) 154 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namexa in reference namelist' , lwp)154 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namexa in reference namelist' ) 155 155 ! 156 156 REWIND( numnam_cfg ) ! Namelist namexa in configuration namelist : Example 157 157 READ ( numnam_cfg, namexa, IOSTAT = ios, ERR = 902 ) 158 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namexa in configuration namelist' , lwp)158 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namexa in configuration namelist' ) 159 159 ! Output namelist for control 160 160 WRITE ( numond, namexa ) -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/nemogcm.F90
r10588 r11317 103 103 104 104 #if defined key_mpp_mpi 105 ! need MPI_Wtime 105 106 INCLUDE 'mpif.h' 106 107 #endif … … 220 221 ! 221 222 IF( nstop /= 0 .AND. lwp ) THEN ! error print 222 WRITE(numout,cform_err) 223 WRITE(numout,*) ' ==>>> nemo_gcm: a total of ', nstop, ' errors have been found' 224 WRITE(numout,*) 223 WRITE(ctmp1,*) ' ==>>> nemo_gcm: a total of ', nstop, ' errors have been found' 224 CALL ctl_stop( ctmp1 ) 225 225 ENDIF 226 226 ! … … 240 240 IF(lwm) THEN 241 241 IF( nstop == 0 ) THEN ; STOP 0 242 ELSE ; STOP 999242 ELSE ; STOP 123 243 243 ENDIF 244 244 ENDIF … … 253 253 !! ** Purpose : initialization of the NEMO GCM 254 254 !!---------------------------------------------------------------------- 255 INTEGER :: ji ! dummy loop indices 256 INTEGER :: ios, ilocal_comm ! local integers 257 CHARACTER(len=120), DIMENSION(60) :: cltxt, cltxt2, clnam 255 INTEGER :: ios, ilocal_comm ! local integers 258 256 !! 259 257 NAMELIST/namctl/ ln_ctl , sn_cfctl, nn_print, nn_ictls, nn_ictle, & … … 263 261 !!---------------------------------------------------------------------- 264 262 ! 265 cltxt = ''266 cltxt2 = ''267 clnam = ''268 263 cxios_context = 'nemo' 269 264 ! 270 ! ! Open reference namelist and configuration namelist files 271 CALL ctl_opn( numnam_ref, 'namelist_ref', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 272 CALL ctl_opn( numnam_cfg, 'namelist_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 273 ! 274 REWIND( numnam_ref ) ! Namelist namctl in reference namelist 275 READ ( numnam_ref, namctl, IOSTAT = ios, ERR = 901 ) 276 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in reference namelist', .TRUE. ) 277 REWIND( numnam_cfg ) ! Namelist namctl in confguration namelist 278 READ ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 ) 279 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namctl in configuration namelist', .TRUE. ) 280 ! 281 REWIND( numnam_ref ) ! Namelist namcfg in reference namelist 282 READ ( numnam_ref, namcfg, IOSTAT = ios, ERR = 903 ) 283 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in reference namelist', .TRUE. ) 284 REWIND( numnam_cfg ) ! Namelist namcfg in confguration namelist 285 READ ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) 286 904 IF( ios > 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist', .TRUE. ) 287 288 ! !--------------------------! 289 ! ! Set global domain size ! (control print return in cltxt2) 290 ! !--------------------------! 291 IF( ln_read_cfg ) THEN ! Read sizes in domain configuration file 292 CALL domain_cfg ( cltxt2, cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio ) 293 ! 294 ELSE ! user-defined namelist 295 CALL usr_def_nam( cltxt2, clnam, cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio ) 296 ENDIF 297 ! 298 ! 299 ! !--------------------------------------------! 300 ! ! set communicator & select the local node ! 301 ! ! NB: mynode also opens output.namelist.dyn ! 302 ! ! on unit number numond on first proc ! 303 ! !--------------------------------------------! 265 ! !-------------------------------------------------! 266 ! ! set communicator & select the local rank ! 267 ! ! must be done as soon as possible to get narea ! 268 ! !-------------------------------------------------! 269 ! 304 270 #if defined key_iomput 305 271 IF( Agrif_Root() ) THEN 306 272 IF( lk_oasis ) THEN 307 273 CALL cpl_init( "oceanx", ilocal_comm ) ! nemo local communicator given by oasis 308 CALL xios_initialize( "not used" , local_comm= ilocal_comm )! send nemo communicator to xios274 CALL xios_initialize( "not used" , local_comm =ilocal_comm ) ! send nemo communicator to xios 309 275 ELSE 310 CALL xios_initialize( "for_xios_mpi_id", return_comm=ilocal_comm )! nemo local communicator given by xios276 CALL xios_initialize( "for_xios_mpi_id", return_comm=ilocal_comm ) ! nemo local communicator given by xios 311 277 ENDIF 312 278 ENDIF 313 ! Nodes selection (control print return in cltxt) 314 narea = mynode( cltxt, 'output.namelist.dyn', numnam_ref, numnam_cfg, numond , nstop, ilocal_comm ) 279 CALL mpp_start( ilocal_comm ) 315 280 #else 316 281 IF( lk_oasis ) THEN … … 318 283 CALL cpl_init( "oceanx", ilocal_comm ) ! nemo local communicator given by oasis 319 284 ENDIF 320 ! Nodes selection (control print return in cltxt) 321 narea = mynode( cltxt, 'output.namelist.dyn', numnam_ref, numnam_cfg, numond , nstop, ilocal_comm ) 285 CALL mpp_start( ilocal_comm ) 322 286 ELSE 323 ilocal_comm = 0 ! Nodes selection (control print return in cltxt)324 narea = mynode( cltxt, 'output.namelist.dyn', numnam_ref, numnam_cfg, numond , nstop )325 ENDIF 326 #endif 327 328 narea = narea + 1 ! mynode return the rank of proc (0 --> jpnij -1 )329 330 IF( sn_cfctl%l_config ) THEN331 ! Activate finer control of report outputs332 ! optionally switch off output from selected areas (note this only333 ! applies to output which does not involve global communications)334 IF( ( narea < sn_cfctl%procmin .OR. narea > sn_cfctl%procmax ) .OR. &335 & ( MOD( narea - sn_cfctl%procmin, sn_cfctl%procincr ) /= 0 ) ) &336 & CALL nemo_set_cfctl( sn_cfctl, .FALSE., .FALSE. )337 ELSE338 ! Use ln_ctl to turn on or off all options.339 CALL nemo_set_cfctl( sn_cfctl, ln_ctl, .TRUE. )340 ENDIF341 342 lwm = (narea == 1) ! control of output namelists343 lwp = (narea == 1) .OR. ln_ctl ! control of all listing output print344 345 IF(lwm) THEN ! write merged namelists from earlier to output namelist346 ! ! now that the file has been opened in call to mynode.347 ! ! NB: nammpp has already been written in mynode (if lk_mpp_mpi)348 WRITE( numond, namctl)349 WRITE( numond, namcfg)350 IF( .NOT.ln_read_cfg ) THEN351 DO ji = 1, SIZE(clnam)352 IF( TRIM(clnam(ji)) /= '' ) WRITE(numond, * ) clnam(ji) ! namusr_def print 353 END DO354 ENDIF355 ENDIF356 357 IF(lwp) THEN ! open listing units358 !359 CALL ctl_opn( numout, 'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea )287 CALL mpp_start( ) 288 ENDIF 289 #endif 290 ! 291 narea = mpprank + 1 ! mpprank: the rank of proc (0 --> mppsize -1 ) 292 lwm = (narea == 1) ! control of output namelists 293 ! 294 ! !---------------------------------------------------------------! 295 ! ! Open output files, reference and configuration namelist files ! 296 ! !---------------------------------------------------------------! 297 ! 298 ! open ocean.output as soon as possible to get all output prints (including errors messages) 299 IF( lwm ) CALL ctl_opn( numout, 'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 300 ! open reference and configuration namelist files 301 CALL ctl_opn( numnam_ref, 'namelist_ref', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 302 CALL ctl_opn( numnam_cfg, 'namelist_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 303 IF( lwm ) CALL ctl_opn( numond, 'output.namelist.dyn', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 304 ! open /dev/null file to be able to supress output write easily 305 CALL ctl_opn( numnul, '/dev/null', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 306 ! 307 ! !--------------------! 308 ! ! Open listing units ! -> need ln_ctl from namctl to define lwp 309 ! !--------------------! 310 ! 311 REWIND( numnam_ref ) ! Namelist namctl in reference namelist 312 READ ( numnam_ref, namctl, IOSTAT = ios, ERR = 901 ) 313 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in reference namelist' ) 314 REWIND( numnam_cfg ) ! Namelist namctl in confguration namelist 315 READ ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 ) 316 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namctl in configuration namelist' ) 317 ! 318 lwp = (narea == 1) .OR. ln_ctl ! control of all listing output print 319 ! 320 IF(lwp) THEN ! open listing units 321 ! 322 IF( .NOT. lwm ) & ! alreay opened for narea == 1 323 & CALL ctl_opn( numout, 'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE., narea ) 360 324 ! 361 325 WRITE(numout,*) 362 WRITE(numout,*) ' CNRS - NERC - Met OFFICE - MERCATOR-ocean - INGV -CMCC'326 WRITE(numout,*) ' CNRS - NERC - Met OFFICE - MERCATOR-ocean - CMCC' 363 327 WRITE(numout,*) ' NEMO team' 364 328 WRITE(numout,*) ' Ocean General Circulation Model' … … 379 343 WRITE(numout,*) " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ " 380 344 WRITE(numout,*) 381 382 DO ji = 1, SIZE(cltxt)383 IF( TRIM(cltxt (ji)) /= '' ) WRITE(numout,*) TRIM(cltxt(ji)) ! control print of mynode384 END DO385 WRITE(numout,*)386 WRITE(numout,*)387 DO ji = 1, SIZE(cltxt2)388 IF( TRIM(cltxt2(ji)) /= '' ) WRITE(numout,*) TRIM(cltxt2(ji)) ! control print of domain size389 END DO390 345 ! 391 346 WRITE(numout,cform_aaa) ! Flag AAAAAAA 392 347 ! 393 348 ENDIF 394 ! open /dev/null file to be able to supress output write easily 395 CALL ctl_opn( numnul, '/dev/null', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 396 ! 397 ! ! Domain decomposition 398 CALL mpp_init ! MPP 349 ! 350 ! finalize the definition of namctl variables 351 IF( sn_cfctl%l_config ) THEN 352 ! Activate finer control of report outputs 353 ! optionally switch off output from selected areas (note this only 354 ! applies to output which does not involve global communications) 355 IF( ( narea < sn_cfctl%procmin .OR. narea > sn_cfctl%procmax ) .OR. & 356 & ( MOD( narea - sn_cfctl%procmin, sn_cfctl%procincr ) /= 0 ) ) & 357 & CALL nemo_set_cfctl( sn_cfctl, .FALSE., .FALSE. ) 358 ELSE 359 ! Use ln_ctl to turn on or off all options. 360 CALL nemo_set_cfctl( sn_cfctl, ln_ctl, .TRUE. ) 361 ENDIF 362 ! 363 IF(lwm) WRITE( numond, namctl ) 364 ! 365 ! !------------------------------------! 366 ! ! Set global domain size parameters ! 367 ! !------------------------------------! 368 ! 369 REWIND( numnam_ref ) ! Namelist namcfg in reference namelist 370 READ ( numnam_ref, namcfg, IOSTAT = ios, ERR = 903 ) 371 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in reference namelist' ) 372 REWIND( numnam_cfg ) ! Namelist namcfg in confguration namelist 373 READ ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) 374 904 IF( ios > 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist' ) 375 ! 376 IF( ln_read_cfg ) THEN ! Read sizes in domain configuration file 377 CALL domain_cfg ( cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio ) 378 ELSE ! user-defined namelist 379 CALL usr_def_nam( cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio ) 380 ENDIF 381 ! 382 IF(lwm) WRITE( numond, namcfg ) 383 ! 384 ! !-----------------------------------------! 385 ! ! mpp parameters and domain decomposition ! 386 ! !-----------------------------------------! 387 CALL mpp_init 399 388 400 389 ! Now we know the dimensions of the grid and numout has been set: we can allocate arrays … … 507 496 !! ** Purpose : control print setting 508 497 !! 509 !! ** Method : - print namctl information and check some consistencies498 !! ** Method : - print namctl and namcfg information and check some consistencies 510 499 !!---------------------------------------------------------------------- 511 500 ! … … 673 662 END SUBROUTINE nemo_alloc 674 663 664 675 665 SUBROUTINE nemo_set_cfctl(sn_cfctl, setto, for_all ) 676 666 !!----------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.