- Timestamp:
- 2020-06-03T10:50:47+02:00 (4 years ago)
- Location:
- NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/ICB/icbrst.F90
r12939 r13015 216 216 cl_filename = TRIM(cexper)//"_"//TRIM(ADJUSTL(cl_kt))//"_"//TRIM(cn_icbrst_out) 217 217 IF( lk_mpp ) THEN 218 idg = MAX( INT(LOG10(REAL( jpnij-1,wp))) + 1, 4 ) ! how many digits to we need to write? min=4, max=9219 WRITE(clfmt, "('(a,a,i', i1, '.', i1, ',a)')") idg, idg ! '(a,a,ix.x,a)'218 idg = MAX( INT(LOG10(REAL(MAX(1,jpnij-1),wp))) + 1, 4 ) ! how many digits to we need to write? min=4, max=9 219 WRITE(clfmt, "('(a,a,i', i1, '.', i1, ',a)')") idg, idg ! '(a,a,ix.x,a)' 220 220 WRITE(cl_filename,clfmt) TRIM(cl_filename), '_', narea-1, '.nc' 221 221 ELSE -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/ICB/icbtrj.F90
r12939 r13015 84 84 cl_filename = 'trajectory_icebergs_'//TRIM(ADJUSTL(cldate_ini))//'-'//TRIM(ADJUSTL(cldate_end)) 85 85 IF ( lk_mpp ) THEN 86 idg = MAX( INT(LOG10(REAL( jpnij-1,wp))) + 1, 4 ) ! how many digits to we need to write? min=4, max=987 WRITE(clfmt, "('(a,a,i', i1, '.', i1, ',a)')") idg, idg ! '(a,a,ix.x,a)'86 idg = MAX( INT(LOG10(REAL(MAX(1,jpnij-1),wp))) + 1, 4 ) ! how many digits to we need to write? min=4, max=9 87 WRITE(clfmt, "('(a,a,i', i1, '.', i1, ',a)')") idg, idg ! '(a,a,ix.x,a)' 88 88 WRITE(cl_filename,clfmt) TRIM(cl_filename), '_', narea-1, '.nc' 89 89 ELSE -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/IOM/iom_nf90.F90
r12939 r13015 111 111 IF( ldwrt ) THEN !* the file should be open in write mode so we create it... 112 112 IF( jpnij > 1 ) THEN 113 idg = MAX( INT(LOG10(REAL( jpnij-1,wp))) + 1, 4 ) ! how many digits to we need to write? min=4, max=9114 WRITE(clfmt, "('(a,a,i', i1, '.', i1, ',a)')") idg, idg ! '(a,a,ix.x,a)'113 idg = MAX( INT(LOG10(REAL(MAX(1,jpnij-1),wp))) + 1, 4 ) ! how many digits to we need to write? min=4, max=9 114 WRITE(clfmt, "('(a,a,i', i1, '.', i1, ',a)')") idg, idg ! '(a,a,ix.x,a)' 115 115 WRITE(cltmp,clfmt) cdname(1:iln-1), '_', narea-1, '.nc' 116 116 cdname = TRIM(cltmp) -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/LBC/lib_mpp.F90
r12939 r13015 1114 1114 ! 1115 1115 CHARACTER(LEN=8) :: clfmt ! writing format 1116 INTEGER :: inum 1117 INTEGER :: idg ! number of digits 1116 INTEGER :: inum 1118 1117 !!---------------------------------------------------------------------- 1119 1118 ! 1120 1119 nstop = nstop + 1 1121 1120 ! 1122 IF( numout == 6 ) THEN ! force to open ocean.output file if not already opened 1123 CALL ctl_opn( numout, 'ocean.output', 'APPEND', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 1124 ELSE 1125 IF( narea > 1 .AND. cd1 == 'STOP' ) THEN ! add an error message in ocean.output 1126 CALL ctl_opn( inum,'ocean.output', 'APPEND', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 1127 WRITE(inum,*) 1128 idg = MAX( INT(LOG10(REAL(jpnij-1,wp))) + 1, 4 ) ! how many digits to we need to write? min=4, max=9 1129 WRITE(clfmt, "('(a,i', i1, '.', i1, ')')") idg, idg ! '(a,ix.x)' 1130 WRITE(inum,clfmt) ' ===>>> : see E R R O R in ocean.output_', narea - 1 1131 ENDIF 1121 IF( cd1 == 'STOP' .AND. narea /= 1 ) THEN ! Immediate stop: add an arror message in 'ocean.output' file 1122 CALL ctl_opn( inum, 'ocean.output', 'APPEND', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 1123 WRITE(inum,*) 1124 WRITE(inum,*) ' ==>>> Look for "E R R O R" messages in all existing *ocean.output* files' 1125 CLOSE(inum) 1126 ENDIF 1127 IF( numout == 6 ) THEN ! force to open ocean.output file if not already opened 1128 CALL ctl_opn( numout, 'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE., narea ) 1132 1129 ENDIF 1133 1130 ! … … 1232 1229 IF( PRESENT( karea ) ) THEN 1233 1230 IF( karea > 1 ) THEN 1234 idg = MAX( INT(LOG10(REAL(jpnij-1,wp))) + 1, 4 ) ! how many digits to we need to write? min=4, max=9 1235 WRITE(clfmt, "('(a,a,i', i1, '.', i1, ')')") idg, idg ! '(a,a,ix.x)' 1231 ! Warning: jpnij is maybe not already defined when calling ctl_opn -> use mppsize instead of jpnij 1232 idg = MAX( INT(LOG10(REAL(MAX(1,mppsize-1),wp))) + 1, 4 ) ! how many digits to we need to write? min=4, max=9 1233 WRITE(clfmt, "('(a,a,i', i1, '.', i1, ')')") idg, idg ! '(a,a,ix.x)' 1236 1234 WRITE(clfile, clfmt) TRIM(clfile), '_', karea-1 1237 1235 ENDIF -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/SBC/sbcmod.F90
r12738 r13015 120 120 ncom_fsbc = nn_fsbc ! make nn_fsbc available for lib_mpp 121 121 #endif 122 ! !* overwrite namelist parameter using CPP key information123 #if defined key_agrif124 IF( Agrif_Root() ) THEN ! AGRIF zoom (cf r1242: possibility to run without ice in fine grid)125 IF( lk_si3 ) nn_ice = 2126 IF( lk_cice ) nn_ice = 3127 ENDIF128 !!GS: TBD129 !#else130 ! IF( lk_si3 ) nn_ice = 2131 ! IF( lk_cice ) nn_ice = 3132 #endif133 122 ! 134 123 IF(lwp) THEN !* Control print -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/ZDF/zdftke.F90
r12939 r13015 45 45 USE zdfdrg ! vertical physics: top/bottom drag coef. 46 46 USE zdfmxl ! vertical physics: mixed layer 47 #if defined key_si3 48 USE ice, ONLY: hm_i, h_i 49 #endif 50 #if defined key_cice 51 USE sbc_ice, ONLY: h_i 52 #endif 47 53 ! 48 54 USE in_out_manager ! I/O manager … … 64 70 INTEGER :: nn_mxl ! type of mixing length (=0/1/2/3) 65 71 REAL(wp) :: rn_mxl0 ! surface min value of mixing length (kappa*z_o=0.4*0.1 m) [m] 72 INTEGER :: nn_mxlice ! type of scaling under sea-ice 73 REAL(wp) :: rn_mxlice ! max constant ice thickness value when scaling under sea-ice ( nn_mxlice=1) 66 74 INTEGER :: nn_pdl ! Prandtl number or not (ratio avt/avm) (=0/1) 67 75 REAL(wp) :: rn_ediff ! coefficient for avt: avt=rn_ediff*mxl*sqrt(e) … … 422 430 REAL(wp) :: zrn2, zraug, zcoef, zav ! local scalars 423 431 REAL(wp) :: zdku, zdkv, zsqen ! - - 424 REAL(wp) :: zemxl, zemlm, zemlp ! - -432 REAL(wp) :: zemxl, zemlm, zemlp, zmaxice ! - - 425 433 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zmxlm, zmxld ! 3D workspace 426 434 !!-------------------------------------------------------------------- … … 436 444 zmxld(:,:,:) = rmxl_min 437 445 ! 438 IF( ln_mxl0 ) THEN ! surface mixing length = F(stress) : l=vkarmn*2.e5*taum/(rho0*g) 446 IF( ln_mxl0 ) THEN ! surface mixing length = F(stress) : l=vkarmn*2.e5*taum/(rho0*g) 447 ! 439 448 zraug = vkarmn * 2.e5_wp / ( rho0 * grav ) 449 #if ! defined key_si3 && ! defined key_cice 440 450 DO_2D_00_00 441 zmxlm(ji,jj,1) = MAX( rn_mxl0, zraug * taum(ji,jj) * tmask(ji,jj,1))451 zmxlm(ji,jj,1) = zraug * taum(ji,jj) * tmask(ji,jj,1) 442 452 END_2D 443 ELSE 453 #else 454 SELECT CASE( nn_mxlice ) ! Type of scaling under sea-ice 455 ! 456 CASE( 0 ) ! No scaling under sea-ice 457 DO_2D_00_00 458 zmxlm(ji,jj,1) = zraug * taum(ji,jj) * tmask(ji,jj,1) 459 END_2D 460 ! 461 CASE( 1 ) ! scaling with constant sea-ice thickness 462 DO_2D_00_00 463 zmxlm(ji,jj,1) = ( ( 1. - fr_i(ji,jj) ) * zraug * taum(ji,jj) + fr_i(ji,jj) * rn_mxlice ) * tmask(ji,jj,1) 464 END_2D 465 ! 466 CASE( 2 ) ! scaling with mean sea-ice thickness 467 DO_2D_00_00 468 #if defined key_si3 469 zmxlm(ji,jj,1) = ( ( 1. - fr_i(ji,jj) ) * zraug * taum(ji,jj) + fr_i(ji,jj) * hm_i(ji,jj) * 2. ) * tmask(ji,jj,1) 470 #elif defined key_cice 471 zmaxice = MAXVAL( h_i(ji,jj,:) ) 472 zmxlm(ji,jj,1) = ( ( 1. - fr_i(ji,jj) ) * zraug * taum(ji,jj) + fr_i(ji,jj) * zmaxice ) * tmask(ji,jj,1) 473 #endif 474 END_2D 475 ! 476 CASE( 3 ) ! scaling with max sea-ice thickness 477 DO_2D_00_00 478 zmaxice = MAXVAL( h_i(ji,jj,:) ) 479 zmxlm(ji,jj,1) = ( ( 1. - fr_i(ji,jj) ) * zraug * taum(ji,jj) + fr_i(ji,jj) * zmaxice ) * tmask(ji,jj,1) 480 END_2D 481 ! 482 END SELECT 483 #endif 484 ! 485 DO_2D_00_00 486 zmxlm(ji,jj,1) = MAX( rn_mxl0, zmxlm(ji,jj,1) ) 487 END_2D 488 ! 489 ELSE 444 490 zmxlm(:,:,1) = rn_mxl0 445 491 ENDIF 492 446 493 ! 447 494 DO_3D_00_00( 2, jpkm1 ) … … 547 594 INTEGER :: ios 548 595 !! 549 NAMELIST/namzdf_tke/ rn_ediff, rn_ediss , rn_ebb , rn_emin , & 550 & rn_emin0, rn_bshear, nn_mxl , ln_mxl0 , & 551 & rn_mxl0 , nn_pdl , ln_drg , ln_lc , rn_lc, & 552 & nn_etau , nn_htau , rn_efr , rn_eice 596 NAMELIST/namzdf_tke/ rn_ediff, rn_ediss , rn_ebb , rn_emin , & 597 & rn_emin0, rn_bshear, nn_mxl , ln_mxl0 , & 598 & rn_mxl0 , nn_mxlice, rn_mxlice, & 599 & nn_pdl , ln_drg , ln_lc , rn_lc, & 600 & nn_etau , nn_htau , rn_efr , rn_eice 553 601 !!---------------------------------------------------------------------- 554 602 ! … … 576 624 WRITE(numout,*) ' mixing length type nn_mxl = ', nn_mxl 577 625 WRITE(numout,*) ' surface mixing length = F(stress) or not ln_mxl0 = ', ln_mxl0 626 IF( ln_mxl0 ) THEN 627 WRITE(numout,*) ' type of scaling under sea-ice nn_mxlice = ', nn_mxlice 628 IF( nn_mxlice == 1 ) & 629 WRITE(numout,*) ' ice thickness when scaling under sea-ice rn_mxlice = ', rn_mxlice 630 ENDIF 578 631 WRITE(numout,*) ' surface mixing length minimum value rn_mxl0 = ', rn_mxl0 579 632 WRITE(numout,*) ' top/bottom friction forcing flag ln_drg = ', ln_drg -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/nemogcm.F90
r12989 r13015 233 233 IF( ngrdstop > 0 ) THEN 234 234 WRITE(ctmp9,'(i2)') ngrdstop 235 WRITE(ctmp2,*) ' ==>>> Errordetected in Agrif grid '//TRIM(ctmp9)236 WRITE(ctmp3,*) ' ==>>> look for error messages in'//TRIM(ctmp9)//'_ocean_output* files'237 CALL ctl_stop( ctmp1, ctmp2, ctmp3 )235 WRITE(ctmp2,*) ' E R R O R detected in Agrif grid '//TRIM(ctmp9) 236 WRITE(ctmp3,*) ' Look for "E R R O R" messages in all existing '//TRIM(ctmp9)//'_ocean_output* files' 237 CALL ctl_stop( ' ', ctmp1, ' ', ctmp2, ' ', ctmp3 ) 238 238 ELSE 239 CALL ctl_stop( ctmp1 ) 239 WRITE(ctmp2,*) ' Look for "E R R O R" messages in all existing ocean_output* files' 240 CALL ctl_stop( ' ', ctmp1, ' ', ctmp2 ) 240 241 ENDIF 241 242 ENDIF … … 250 251 #else 251 252 IF ( lk_oasis ) THEN ; CALL cpl_finalize ! end coupling and mpp communications with OASIS 252 ELSEIF( lk_mpp ) THEN ; CALL mppstop ! end mpp communications253 ELSEIF( lk_mpp ) THEN ; CALL mppstop ! end mpp communications 253 254 ENDIF 254 255 #endif -
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/stpctl.F90
r12939 r13015 260 260 !!! WRITE(clsum, '(i'//clfmt//')') ksum ! this is creating a compilation error with AGRIF 261 261 cl4 = '(i'//clfmt//')' ; WRITE(clsum, cl4) ksum 262 WRITE(clfmt, '(i1)') INT(LOG10(REAL( jpnij-1,wp))) + 1! how many digits to we need to write ? (we decide max = 9)262 WRITE(clfmt, '(i1)') INT(LOG10(REAL(MAX(1,jpnij-1),wp))) + 1 ! how many digits to we need to write ? (we decide max = 9) 263 263 cl4 = '(i'//clfmt//')' ; WRITE(clmin, cl4) kmin-1 264 264 WRITE(clmax, cl4) kmax-1
Note: See TracChangeset
for help on using the changeset viewer.