Changeset 12501 for NEMO/trunk/src/OCE
- Timestamp:
- 2020-03-02T18:51:24+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/src/OCE/ZDF/zdfiwm.F90
r12489 r12501 23 23 USE phycst ! physical constants 24 24 ! 25 USE fldread ! field read 25 26 USE prtctl ! Print control 26 27 USE in_out_manager ! I/O manager … … 383 384 !! de Lavergne et al. in prep., 2017 384 385 !!---------------------------------------------------------------------- 385 INTEGER :: inum ! local integer 386 INTEGER :: ifpr ! dummy loop indices 387 INTEGER :: inum ! local integer 386 388 INTEGER :: ios 387 389 REAL(wp) :: zbot, zpyc, zcri ! local scalars 388 !! 389 NAMELIST/namzdf_iwm/ nn_zpyc, ln_mevar, ln_tsdiff 390 ! 391 CHARACTER(len=256) :: cn_dir ! Root directory for location of ssr files 392 INTEGER, PARAMETER :: jpiwm = 5 ! maximum number of files to read 393 INTEGER, PARAMETER :: jp_mpb = 1 394 INTEGER, PARAMETER :: jp_mpp = 2 395 INTEGER, PARAMETER :: jp_mpc = 3 396 INTEGER, PARAMETER :: jp_dsb = 4 397 INTEGER, PARAMETER :: jp_dsc = 5 398 ! 399 TYPE(FLD_N), DIMENSION(jpiwm) :: slf_iwm ! array of namelist informations 400 TYPE(FLD_N) :: sn_mpb, sn_mpp, sn_mpc ! informations about Mixing Power field to be read 401 TYPE(FLD_N) :: sn_dsb, sn_dsc ! informations about Decay Scale field to be read 402 TYPE(FLD ), DIMENSION(jpiwm) :: sf_iwm ! structure of input fields (file informations, fields read) 403 ! 404 NAMELIST/namzdf_iwm/ nn_zpyc, ln_mevar, ln_tsdiff, & 405 & cn_dir, sn_mpb, sn_mpp, sn_mpc, sn_dsb, sn_dsc 390 406 !!---------------------------------------------------------------------- 391 407 ! … … 422 438 IF( zdf_iwm_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'zdf_iwm_init : unable to allocate iwm arrays' ) 423 439 ! 440 ! store namelist information in an array 441 slf_iwm(jp_mpb) = sn_mpb ; slf_iwm(jp_mpp) = sn_mpp ; slf_iwm(jp_mpc) = sn_mpc 442 slf_iwm(jp_dsb) = sn_dsb ; slf_iwm(jp_dsc) = sn_dsc 443 ! 444 DO ifpr= 1, jpiwm 445 ALLOCATE( sf_iwm(ifpr)%fnow(jpi,jpj,1) ) 446 IF( slf_iwm(ifpr)%ln_tint )ALLOCATE( sf_iwm(ifpr)%fdta(jpi,jpj,1,2) ) 447 END DO 448 449 ! fill sf_iwm with sf_iwm and control print 450 CALL fld_fill( sf_iwm, slf_iwm , cn_dir, 'zdfiwm_init', 'iwm input file', 'namiwm' ) 451 452 ! ! hard-coded default definition (to be defined in namelist ?) 453 sf_iwm(jp_mpb)%fnow(:,:,1) = 1.e-6 454 sf_iwm(jp_mpp)%fnow(:,:,1) = 1.e-6 455 sf_iwm(jp_mpc)%fnow(:,:,1) = 1.e-10 456 sf_iwm(jp_dsb)%fnow(:,:,1) = 100. 457 sf_iwm(jp_dsc)%fnow(:,:,1) = 100. 458 424 459 ! ! read necessary fields 425 CALL iom_open('mixing_power_bot',inum) ! energy flux for high-mode wave breaking [W/m2] 426 CALL iom_get (inum, jpdom_data, 'field', ebot_iwm, 1 ) 427 CALL iom_close(inum) 428 ! 429 CALL iom_open('mixing_power_pyc',inum) ! energy flux for pynocline-intensified wave breaking [W/m2] 430 CALL iom_get (inum, jpdom_data, 'field', epyc_iwm, 1 ) 431 CALL iom_close(inum) 432 ! 433 CALL iom_open('mixing_power_cri',inum) ! energy flux for critical slope wave breaking [W/m2] 434 CALL iom_get (inum, jpdom_data, 'field', ecri_iwm, 1 ) 435 CALL iom_close(inum) 436 ! 437 CALL iom_open('decay_scale_bot',inum) ! spatially variable decay scale for high-mode wave breaking [m] 438 CALL iom_get (inum, jpdom_data, 'field', hbot_iwm, 1 ) 439 CALL iom_close(inum) 440 ! 441 CALL iom_open('decay_scale_cri',inum) ! spatially variable decay scale for critical slope wave breaking [m] 442 CALL iom_get (inum, jpdom_data, 'field', hcri_iwm, 1 ) 443 CALL iom_close(inum) 444 445 ebot_iwm(:,:) = ebot_iwm(:,:) * ssmask(:,:) 446 epyc_iwm(:,:) = epyc_iwm(:,:) * ssmask(:,:) 447 ecri_iwm(:,:) = ecri_iwm(:,:) * ssmask(:,:) 460 CALL fld_read( 1, 1, sf_iwm ) 461 462 ebot_iwm(:,:) = sf_iwm(1)%fnow(:,:,1) * ssmask(:,:) ! energy flux for high-mode wave breaking [W/m2] 463 epyc_iwm(:,:) = sf_iwm(2)%fnow(:,:,1) * ssmask(:,:) ! energy flux for pynocline-intensified wave breaking [W/m2] 464 ecri_iwm(:,:) = sf_iwm(3)%fnow(:,:,1) * ssmask(:,:) ! energy flux for critical slope wave breaking [W/m2] 465 hbot_iwm(:,:) = sf_iwm(4)%fnow(:,:,1) ! spatially variable decay scale for high-mode wave breaking [m] 466 hcri_iwm(:,:) = sf_iwm(5)%fnow(:,:,1) ! spatially variable decay scale for critical slope wave breaking [m] 448 467 449 468 zbot = glob_sum( 'zdfiwm', e1e2t(:,:) * ebot_iwm(:,:) ) 450 469 zpyc = glob_sum( 'zdfiwm', e1e2t(:,:) * epyc_iwm(:,:) ) 451 470 zcri = glob_sum( 'zdfiwm', e1e2t(:,:) * ecri_iwm(:,:) ) 471 452 472 IF(lwp) THEN 453 473 WRITE(numout,*) ' High-mode wave-breaking energy: ', zbot * 1.e-12_wp, 'TW'
Note: See TracChangeset
for help on using the changeset viewer.