- Timestamp:
- 2019-12-05T12:06:36+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/OCE/DIA/diawri.F90
r10425 r12065 210 210 ENDIF 211 211 212 IF( ln_zad_Aimp ) wn = wn + wi ! Recombine explicit and implicit parts of vertical velocity for diagnostic output 213 ! 212 214 CALL iom_put( "woce", wn ) ! vertical velocity 213 215 IF( iom_use('w_masstr') .OR. iom_use('w_masstr2') ) THEN ! vertical mass transport & its square value … … 220 222 IF( iom_use('w_masstr2') ) CALL iom_put( "w_masstr2", z3d(:,:,:) * z3d(:,:,:) ) 221 223 ENDIF 224 ! 225 IF( ln_zad_Aimp ) wn = wn - wi ! Remove implicit part of vertical velocity that was added for diagnostic output 222 226 223 227 CALL iom_put( "avt" , avt ) ! T vert. eddy diff. coef. … … 426 430 !! define all the NETCDF files and fields 427 431 !! At each time step call histdef to compute the mean if ncessary 428 !! Each n write time step, output the instantaneous or mean fields432 !! Each nn_write time step, output the instantaneous or mean fields 429 433 !!---------------------------------------------------------------------- 430 434 INTEGER, INTENT( in ) :: kt ! ocean time-step index … … 442 446 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zw3d ! 3D workspace 443 447 !!---------------------------------------------------------------------- 444 !445 IF( ln_timing ) CALL timing_start('dia_wri')446 448 ! 447 449 IF( ninist == 1 ) THEN !== Output the initial state and forcings ==! … … 450 452 ENDIF 451 453 ! 454 IF( nn_write == -1 ) RETURN ! we will never do any output 455 ! 456 IF( ln_timing ) CALL timing_start('dia_wri') 457 ! 452 458 ! 0. Initialisation 453 459 ! ----------------- … … 459 465 clop = "x" ! no use of the mask value (require less cpu time and otherwise the model crashes) 460 466 #if defined key_diainstant 461 zsto = n write * rdt467 zsto = nn_write * rdt 462 468 clop = "inst("//TRIM(clop)//")" 463 469 #else … … 465 471 clop = "ave("//TRIM(clop)//")" 466 472 #endif 467 zout = n write * rdt473 zout = nn_write * rdt 468 474 zmax = ( nitend - nit000 + 1 ) * rdt 469 475 … … 496 502 ! WRITE root name in date.file for use by postpro 497 503 IF(lwp) THEN 498 CALL dia_nam( clhstnam, n write,' ' )504 CALL dia_nam( clhstnam, nn_write,' ' ) 499 505 CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 500 506 WRITE(inum,*) clhstnam … … 504 510 ! Define the T grid FILE ( nid_T ) 505 511 506 CALL dia_nam( clhstnam, n write, 'grid_T' )512 CALL dia_nam( clhstnam, nn_write, 'grid_T' ) 507 513 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam ! filename 508 514 CALL histbeg( clhstnam, jpi, glamt, jpj, gphit, & ! Horizontal grid: glamt and gphit … … 540 546 ! Define the U grid FILE ( nid_U ) 541 547 542 CALL dia_nam( clhstnam, n write, 'grid_U' )548 CALL dia_nam( clhstnam, nn_write, 'grid_U' ) 543 549 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam ! filename 544 550 CALL histbeg( clhstnam, jpi, glamu, jpj, gphiu, & ! Horizontal grid: glamu and gphiu … … 553 559 ! Define the V grid FILE ( nid_V ) 554 560 555 CALL dia_nam( clhstnam, n write, 'grid_V' ) ! filename561 CALL dia_nam( clhstnam, nn_write, 'grid_V' ) ! filename 556 562 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam 557 563 CALL histbeg( clhstnam, jpi, glamv, jpj, gphiv, & ! Horizontal grid: glamv and gphiv … … 566 572 ! Define the W grid FILE ( nid_W ) 567 573 568 CALL dia_nam( clhstnam, n write, 'grid_W' ) ! filename574 CALL dia_nam( clhstnam, nn_write, 'grid_W' ) ! filename 569 575 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam 570 576 CALL histbeg( clhstnam, jpi, glamt, jpj, gphit, & ! Horizontal grid: glamt and gphit … … 657 663 ENDIF 658 664 659 IF( .NOT. ln_cpl) THEN665 IF( ln_ssr ) THEN 660 666 CALL histdef( nid_T, "sohefldp", "Surface Heat Flux: Damping" , "W/m2" , & ! qrp 661 667 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) … … 665 671 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 666 672 ENDIF 667 668 IF( ln_cpl .AND. nn_ice <= 1 ) THEN 669 CALL histdef( nid_T, "sohefldp", "Surface Heat Flux: Damping" , "W/m2" , & ! qrp 670 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 671 CALL histdef( nid_T, "sowafldp", "Surface Water Flux: Damping" , "Kg/m2/s", & ! erp 672 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 673 CALL histdef( nid_T, "sosafldp", "Surface salt flux: Damping" , "Kg/m2/s", & ! erp * sn 674 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 675 ENDIF 676 673 677 674 clmx ="l_max(only(x))" ! max index on a period 678 675 ! CALL histdef( nid_T, "sobowlin", "Bowl Index" , "W-point", & ! bowl INDEX … … 750 747 ! donne le nombre d'elements, et ndex la liste des indices a sortir 751 748 752 IF( lwp .AND. MOD( itmod, n write ) == 0 ) THEN749 IF( lwp .AND. MOD( itmod, nn_write ) == 0 ) THEN 753 750 WRITE(numout,*) 'dia_wri : write model outputs in NetCDF files at ', kt, 'time-step' 754 751 WRITE(numout,*) '~~~~~~ ' … … 814 811 ENDIF 815 812 816 IF( .NOT. ln_cpl) THEN813 IF( ln_ssr ) THEN 817 814 CALL histwrite( nid_T, "sohefldp", it, qrp , ndim_hT, ndex_hT ) ! heat flux damping 818 815 CALL histwrite( nid_T, "sowafldp", it, erp , ndim_hT, ndex_hT ) ! freshwater flux damping 819 IF( ln_ssr ) zw2d(:,:) = erp(:,:) * tsn(:,:,1,jp_sal) * tmask(:,:,1) 820 CALL histwrite( nid_T, "sosafldp", it, zw2d , ndim_hT, ndex_hT ) ! salt flux damping 821 ENDIF 822 IF( ln_cpl .AND. nn_ice <= 1 ) THEN 823 CALL histwrite( nid_T, "sohefldp", it, qrp , ndim_hT, ndex_hT ) ! heat flux damping 824 CALL histwrite( nid_T, "sowafldp", it, erp , ndim_hT, ndex_hT ) ! freshwater flux damping 825 IF( ln_ssr ) zw2d(:,:) = erp(:,:) * tsn(:,:,1,jp_sal) * tmask(:,:,1) 816 zw2d(:,:) = erp(:,:) * tsn(:,:,1,jp_sal) * tmask(:,:,1) 826 817 CALL histwrite( nid_T, "sosafldp", it, zw2d , ndim_hT, ndex_hT ) ! salt flux damping 827 818 ENDIF … … 842 833 CALL histwrite( nid_V, "sometauy", it, vtau , ndim_hV, ndex_hV ) ! j-wind stress 843 834 844 CALL histwrite( nid_W, "vovecrtz", it, wn , ndim_T, ndex_T ) ! vert. current 835 IF( ln_zad_Aimp ) THEN 836 CALL histwrite( nid_W, "vovecrtz", it, wn + wi , ndim_T, ndex_T ) ! vert. current 837 ELSE 838 CALL histwrite( nid_W, "vovecrtz", it, wn , ndim_T, ndex_T ) ! vert. current 839 ENDIF 845 840 CALL histwrite( nid_W, "votkeavt", it, avt , ndim_T, ndex_T ) ! T vert. eddy diff. coef. 846 841 CALL histwrite( nid_W, "votkeavm", it, avm , ndim_T, ndex_T ) ! T vert. eddy visc. coef. … … 903 898 CALL iom_rstput( 0, 0, inum, 'vozocrtx', un ) ! now i-velocity 904 899 CALL iom_rstput( 0, 0, inum, 'vomecrty', vn ) ! now j-velocity 905 CALL iom_rstput( 0, 0, inum, 'vovecrtz', wn ) ! now k-velocity 900 IF( ln_zad_Aimp ) THEN 901 CALL iom_rstput( 0, 0, inum, 'vovecrtz', wn + wi ) ! now k-velocity 902 ELSE 903 CALL iom_rstput( 0, 0, inum, 'vovecrtz', wn ) ! now k-velocity 904 ENDIF 906 905 IF( ALLOCATED(ahtu) ) THEN 907 906 CALL iom_rstput( 0, 0, inum, 'ahtu', ahtu ) ! aht at u-point
Note: See TracChangeset
for help on using the changeset viewer.