- Timestamp:
- 2020-09-29T12:41:06+02:00 (4 years ago)
- Location:
- NEMO/branches/2020/r12377_ticket2386
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/r12377_ticket2386
- Property svn:externals
-
old new 3 3 ^/utils/build/mk@HEAD mk 4 4 ^/utils/tools@HEAD tools 5 ^/vendors/AGRIF/dev @HEADext/AGRIF5 ^/vendors/AGRIF/dev_r12970_AGRIF_CMEMS ext/AGRIF 6 6 ^/vendors/FCM@HEAD ext/FCM 7 7 ^/vendors/IOIPSL@HEAD ext/IOIPSL 8 8 9 9 # SETTE 10 ^/utils/CI/sette@ HEADsette10 ^/utils/CI/sette@13507 sette
-
- Property svn:externals
-
NEMO/branches/2020/r12377_ticket2386/src/SAS/nemogcm.F90
r12511 r13540 35 35 USE step_diu ! diurnal bulk SST timestepping (called from here if run offline) 36 36 ! 37 USE prtctl ! Print control 38 USE in_out_manager ! I/O manager 37 39 USE lib_mpp ! distributed memory computing 38 40 USE mppini ! shared/distributed memory setting (mpp_init routine) 39 USE lbcnfd , ONLY : isendto, nsndto , nfsloop, nfeloop! Setup of north fold exchanges41 USE lbcnfd , ONLY : isendto, nsndto ! Setup of north fold exchanges 40 42 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 41 43 #if defined key_iomput … … 45 47 USE agrif_ice_update ! ice update 46 48 #endif 49 USE halo_mng 47 50 48 51 IMPLICIT NONE … … 90 93 #if defined key_agrif 91 94 Kbb_a = Nbb; Kmm_a = Nnn; Krhs_a = Nrhs ! agrif_oce module copies of time level indices 92 CALL Agrif_Declare_Var_dom ! AGRIF: set the meshes for DOM93 95 CALL Agrif_Declare_Var ! " " " " " DYN/TRA 94 96 # if defined key_top 95 97 CALL Agrif_Declare_Var_top ! " " " " " TOP 96 98 # endif 97 # if defined key_si398 CALL Agrif_Declare_Var_ice ! " " " " " Sea ice99 # endif100 99 #endif 101 100 ! check that all process are still there... If some process have an error, … … 124 123 istp = istp + 1 125 124 END DO 126 !127 IF( .NOT. Agrif_Root() ) THEN128 CALL Agrif_ParentGrid_To_ChildGrid()129 IF( ln_timing ) CALL timing_finalize130 CALL Agrif_ChildGrid_To_ParentGrid()131 ENDIF132 125 ! 133 126 #else … … 165 158 IF( nstop /= 0 .AND. lwp ) THEN ! error print 166 159 WRITE(ctmp1,*) ' ==>>> nemo_gcm: a total of ', nstop, ' errors have been found' 167 CALL ctl_stop( ctmp1 ) 160 IF( ngrdstop > 0 ) THEN 161 WRITE(ctmp9,'(i2)') ngrdstop 162 WRITE(ctmp2,*) ' E R R O R detected in Agrif grid '//TRIM(ctmp9) 163 WRITE(ctmp3,*) ' Look for "E R R O R" messages in all existing '//TRIM(ctmp9)//'_ocean_output* files' 164 CALL ctl_stop( ' ', ctmp1, ' ', ctmp2, ' ', ctmp3 ) 165 ELSE 166 WRITE(ctmp2,*) ' Look for "E R R O R" messages in all existing ocean_output* files' 167 CALL ctl_stop( ' ', ctmp1, ' ', ctmp2 ) 168 ENDIF 168 169 ENDIF 169 170 ! … … 198 199 INTEGER :: ios, ilocal_comm ! local integers 199 200 !! 200 NAMELIST/namctl/ sn_cfctl, nn_print, nn_ictls, nn_ictle, & 201 & nn_isplt , nn_jsplt, nn_jctls, nn_jctle, & 202 & ln_timing, ln_diacfl 201 NAMELIST/namctl/ sn_cfctl, ln_timing, ln_diacfl, & 202 & nn_isplt, nn_jsplt, nn_ictls, nn_ictle, nn_jctls, nn_jctle 203 203 NAMELIST/namcfg/ ln_read_cfg, cn_domcfg, ln_closea, ln_write_cfg, cn_domcfg_out, ln_use_jattr 204 204 !!---------------------------------------------------------------------- … … 207 207 ELSE ; cxios_context = 'nemo' 208 208 ENDIF 209 nn_hls = 1 209 210 ! 210 211 ! !-------------------------------------------------! … … 256 257 ENDIF 257 258 ! open /dev/null file to be able to supress output write easily 259 IF( Agrif_Root() ) THEN 258 260 CALL ctl_opn( numnul, '/dev/null', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 261 #ifdef key_agrif 262 ELSE 263 numnul = Agrif_Parent(numnul) 264 #endif 265 ENDIF 259 266 ! 260 267 ! !--------------------! … … 268 275 ! 269 276 ! finalize the definition of namctl variables 270 IF( sn_cfctl%l_allon ) THEN 271 ! Turn on all options. 272 CALL nemo_set_cfctl( sn_cfctl, .TRUE., .TRUE. ) 273 ! Ensure all processors are active 274 sn_cfctl%procmin = 0 ; sn_cfctl%procmax = 1000000 ; sn_cfctl%procincr = 1 275 ELSEIF( sn_cfctl%l_config ) THEN 276 ! Activate finer control of report outputs 277 ! optionally switch off output from selected areas (note this only 278 ! applies to output which does not involve global communications) 279 IF( ( narea < sn_cfctl%procmin .OR. narea > sn_cfctl%procmax ) .OR. & 280 & ( MOD( narea - sn_cfctl%procmin, sn_cfctl%procincr ) /= 0 ) ) & 281 & CALL nemo_set_cfctl( sn_cfctl, .FALSE., .FALSE. ) 282 ELSE 283 ! turn off all options. 284 CALL nemo_set_cfctl( sn_cfctl, .FALSE., .TRUE. ) 285 ENDIF 277 IF( narea < sn_cfctl%procmin .OR. narea > sn_cfctl%procmax .OR. MOD( narea - sn_cfctl%procmin, sn_cfctl%procincr ) /= 0 ) & 278 & CALL nemo_set_cfctl( sn_cfctl, .FALSE. ) 286 279 ! 287 280 lwp = (narea == 1) .OR. sn_cfctl%l_oceout ! control of all listing output print … … 333 326 ! 334 327 IF( ln_read_cfg ) THEN ! Read sizes in domain configuration file 335 CALL domain_cfg ( cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio )328 CALL domain_cfg ( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, jperio ) 336 329 ELSE ! user-defined namelist 337 CALL usr_def_nam( cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio )330 CALL usr_def_nam( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, jperio ) 338 331 ENDIF 339 332 ! … … 345 338 CALL mpp_init 346 339 340 CALL halo_mng_init() 347 341 ! Now we know the dimensions of the grid and numout has been set: we can allocate arrays 348 342 CALL nemo_alloc() … … 350 344 ! Initialise time level indices 351 345 Nbb = 1; Nnn = 2; Naa = 3; Nrhs = Naa 346 #if defined key_agrif 347 Kbb_a = Nbb; Kmm_a = Nnn; Krhs_a = Nrhs ! agrif_oce module copies of time level indices 348 #endif 352 349 353 350 ! !-------------------------------! … … 358 355 ! 359 356 ! ! General initialization 360 IF( ln_timing ) CALL timing_init ! timing357 IF( ln_timing ) CALL timing_init ( 'timing_sas.output' ) 361 358 IF( ln_timing ) CALL timing_start( 'nemo_init') 362 359 363 360 CALL phy_cst ! Physical constants 364 361 CALL eos_init ! Equation of seawater 362 #if defined key_agrif 363 CALL Agrif_Declare_Var_ini ! " " " " " DOM 364 #endif 365 365 CALL dom_init( Nbb, Nnn, Naa, 'SAS') ! Domain 366 366 IF( sn_cfctl%l_prtctl ) & … … 401 401 WRITE(numout,*) '~~~~~~~~' 402 402 WRITE(numout,*) ' Namelist namctl' 403 WRITE(numout,*) ' sn_cfctl%l_glochk = ', sn_cfctl%l_glochk404 WRITE(numout,*) ' sn_cfctl%l_allon = ', sn_cfctl%l_allon405 WRITE(numout,*) ' finer control over o/p sn_cfctl%l_config = ', sn_cfctl%l_config406 403 WRITE(numout,*) ' sn_cfctl%l_runstat = ', sn_cfctl%l_runstat 407 404 WRITE(numout,*) ' sn_cfctl%l_trcstat = ', sn_cfctl%l_trcstat … … 415 412 WRITE(numout,*) ' sn_cfctl%procincr = ', sn_cfctl%procincr 416 413 WRITE(numout,*) ' sn_cfctl%ptimincr = ', sn_cfctl%ptimincr 417 WRITE(numout,*) ' level of print nn_print = ', nn_print418 WRITE(numout,*) ' Start i indice for SUM control nn_ictls = ', nn_ictls419 WRITE(numout,*) ' End i indice for SUM control nn_ictle = ', nn_ictle420 WRITE(numout,*) ' Start j indice for SUM control nn_jctls = ', nn_jctls421 WRITE(numout,*) ' End j indice for SUM control nn_jctle = ', nn_jctle422 WRITE(numout,*) ' number of proc. following i nn_isplt = ', nn_isplt423 WRITE(numout,*) ' number of proc. following j nn_jsplt = ', nn_jsplt424 414 WRITE(numout,*) ' timing by routine ln_timing = ', ln_timing 425 415 WRITE(numout,*) ' CFL diagnostics ln_diacfl = ', ln_diacfl 426 416 ENDIF 427 417 ! 428 nprint = nn_print ! convert DOCTOR namelist names into OLD names 429 nictls = nn_ictls 430 nictle = nn_ictle 431 njctls = nn_jctls 432 njctle = nn_jctle 433 isplt = nn_isplt 434 jsplt = nn_jsplt 435 418 IF( .NOT.ln_read_cfg ) ln_closea = .FALSE. ! dealing possible only with a domcfg file 436 419 IF(lwp) THEN ! control print 437 420 WRITE(numout,*) … … 444 427 WRITE(numout,*) ' use file attribute if exists as i/p j-start ln_use_jattr = ', ln_use_jattr 445 428 ENDIF 446 IF( .NOT.ln_read_cfg ) ln_closea = .false. ! dealing possible only with a domcfg file447 !448 ! ! Parameter control449 !450 IF( sn_cfctl%l_prtctl .OR. sn_cfctl%l_prttrc ) THEN ! sub-domain area indices for the control prints451 IF( lk_mpp .AND. jpnij > 1 ) THEN452 isplt = jpni ; jsplt = jpnj ; ijsplt = jpni*jpnj ! the domain is forced to the real split domain453 ELSE454 IF( isplt == 1 .AND. jsplt == 1 ) THEN455 CALL ctl_warn( ' - isplt & jsplt are equal to 1', &456 & ' - the print control will be done over the whole domain' )457 ENDIF458 ijsplt = isplt * jsplt ! total number of processors ijsplt459 ENDIF460 IF(lwp) WRITE(numout,*)' - The total number of processors over which the'461 IF(lwp) WRITE(numout,*)' print control will be done is ijsplt : ', ijsplt462 !463 ! ! indices used for the SUM control464 IF( nictls+nictle+njctls+njctle == 0 ) THEN ! print control done over the default area465 lsp_area = .FALSE.466 ELSE ! print control done over a specific area467 lsp_area = .TRUE.468 IF( nictls < 1 .OR. nictls > jpiglo ) THEN469 CALL ctl_warn( ' - nictls must be 1<=nictls>=jpiglo, it is forced to 1' )470 nictls = 1471 ENDIF472 IF( nictle < 1 .OR. nictle > jpiglo ) THEN473 CALL ctl_warn( ' - nictle must be 1<=nictle>=jpiglo, it is forced to jpiglo' )474 nictle = jpiglo475 ENDIF476 IF( njctls < 1 .OR. njctls > jpjglo ) THEN477 CALL ctl_warn( ' - njctls must be 1<=njctls>=jpjglo, it is forced to 1' )478 njctls = 1479 ENDIF480 IF( njctle < 1 .OR. njctle > jpjglo ) THEN481 CALL ctl_warn( ' - njctle must be 1<=njctle>=jpjglo, it is forced to jpjglo' )482 njctle = jpjglo483 ENDIF484 ENDIF485 ENDIF486 429 ! 487 430 IF( 1._wp /= SIGN(1._wp,-0._wp) ) CALL ctl_stop( 'nemo_ctl: The intrinsec SIGN function follows f2003 standard.', & … … 537 480 ierr = dia_wri_alloc() 538 481 ierr = ierr + dom_oce_alloc() ! ocean domain 539 ierr = ierr + oce_alloc () ! (ts n...) needed for agrif and/or SI3 and bdy482 ierr = ierr + oce_alloc () ! (ts...) needed for agrif and/or SI3 and bdy 540 483 ierr = ierr + bdy_oce_alloc() ! bdy masks (incl. initialization) 541 484 ! … … 545 488 END SUBROUTINE nemo_alloc 546 489 547 SUBROUTINE nemo_set_cfctl(sn_cfctl, setto , for_all)490 SUBROUTINE nemo_set_cfctl(sn_cfctl, setto ) 548 491 !!---------------------------------------------------------------------- 549 492 !! *** ROUTINE nemo_set_cfctl *** 550 493 !! 551 494 !! ** Purpose : Set elements of the output control structure to setto. 552 !! for_all should be .false. unless all areas are to be553 !! treated identically.554 495 !! 555 496 !! ** Method : Note this routine can be used to switch on/off some 556 !! types of output for selected areas but any output types 557 !! that involve global communications (e.g. mpp_max, glob_sum) 558 !! should be protected from selective switching by the 559 !! for_all argument 560 !!---------------------------------------------------------------------- 561 LOGICAL :: setto, for_all 562 TYPE(sn_ctl) :: sn_cfctl 563 !!---------------------------------------------------------------------- 564 IF( for_all ) THEN 565 sn_cfctl%l_runstat = setto 566 sn_cfctl%l_trcstat = setto 567 ENDIF 497 !! types of output for selected areas. 498 !!---------------------------------------------------------------------- 499 TYPE(sn_ctl), INTENT(inout) :: sn_cfctl 500 LOGICAL , INTENT(in ) :: setto 501 !!---------------------------------------------------------------------- 502 sn_cfctl%l_runstat = setto 503 sn_cfctl%l_trcstat = setto 568 504 sn_cfctl%l_oceout = setto 569 505 sn_cfctl%l_layout = setto
Note: See TracChangeset
for help on using the changeset viewer.