Changeset 11822 for NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DIA/diawri.F90
- Timestamp:
- 2019-10-29T11:41:36+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DIA/diawri.F90
r11027 r11822 211 211 ENDIF 212 212 213 IF( ln_zad_Aimp ) ww = ww + wi ! Recombine explicit and implicit parts of vertical velocity for diagnostic output 214 ! 213 215 CALL iom_put( "woce", ww ) ! vertical velocity 214 216 IF( iom_use('w_masstr') .OR. iom_use('w_masstr2') ) THEN ! vertical mass transport & its square value … … 221 223 IF( iom_use('w_masstr2') ) CALL iom_put( "w_masstr2", z3d(:,:,:) * z3d(:,:,:) ) 222 224 ENDIF 225 ! 226 IF( ln_zad_Aimp ) ww = ww - wi ! Remove implicit part of vertical velocity that was added for diagnostic output 223 227 224 228 CALL iom_put( "avt" , avt ) ! T vert. eddy diff. coef. … … 427 431 !! define all the NETCDF files and fields 428 432 !! At each time step call histdef to compute the mean if ncessary 429 !! Each n write time step, output the instantaneous or mean fields433 !! Each nn_write time step, output the instantaneous or mean fields 430 434 !!---------------------------------------------------------------------- 431 435 INTEGER, INTENT( in ) :: kt ! ocean time-step index … … 444 448 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zw3d ! 3D workspace 445 449 !!---------------------------------------------------------------------- 446 !447 IF( ln_timing ) CALL timing_start('dia_wri')448 450 ! 449 451 IF( ninist == 1 ) THEN !== Output the initial state and forcings ==! … … 452 454 ENDIF 453 455 ! 456 IF( nn_write == -1 ) RETURN ! we will never do any output 457 ! 458 IF( ln_timing ) CALL timing_start('dia_wri') 459 ! 454 460 ! 0. Initialisation 455 461 ! ----------------- … … 461 467 clop = "x" ! no use of the mask value (require less cpu time and otherwise the model crashes) 462 468 #if defined key_diainstant 463 zsto = n write * rdt469 zsto = nn_write * rdt 464 470 clop = "inst("//TRIM(clop)//")" 465 471 #else … … 467 473 clop = "ave("//TRIM(clop)//")" 468 474 #endif 469 zout = n write * rdt475 zout = nn_write * rdt 470 476 zmax = ( nitend - nit000 + 1 ) * rdt 471 477 … … 498 504 ! WRITE root name in date.file for use by postpro 499 505 IF(lwp) THEN 500 CALL dia_nam( clhstnam, n write,' ' )506 CALL dia_nam( clhstnam, nn_write,' ' ) 501 507 CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 502 508 WRITE(inum,*) clhstnam … … 506 512 ! Define the T grid FILE ( nid_T ) 507 513 508 CALL dia_nam( clhstnam, n write, 'grid_T' )514 CALL dia_nam( clhstnam, nn_write, 'grid_T' ) 509 515 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam ! filename 510 516 CALL histbeg( clhstnam, jpi, glamt, jpj, gphit, & ! Horizontal grid: glamt and gphit … … 542 548 ! Define the U grid FILE ( nid_U ) 543 549 544 CALL dia_nam( clhstnam, n write, 'grid_U' )550 CALL dia_nam( clhstnam, nn_write, 'grid_U' ) 545 551 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam ! filename 546 552 CALL histbeg( clhstnam, jpi, glamu, jpj, gphiu, & ! Horizontal grid: glamu and gphiu … … 555 561 ! Define the V grid FILE ( nid_V ) 556 562 557 CALL dia_nam( clhstnam, n write, 'grid_V' ) ! filename563 CALL dia_nam( clhstnam, nn_write, 'grid_V' ) ! filename 558 564 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam 559 565 CALL histbeg( clhstnam, jpi, glamv, jpj, gphiv, & ! Horizontal grid: glamv and gphiv … … 568 574 ! Define the W grid FILE ( nid_W ) 569 575 570 CALL dia_nam( clhstnam, n write, 'grid_W' ) ! filename576 CALL dia_nam( clhstnam, nn_write, 'grid_W' ) ! filename 571 577 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam 572 578 CALL histbeg( clhstnam, jpi, glamt, jpj, gphit, & ! Horizontal grid: glamt and gphit … … 659 665 ENDIF 660 666 661 IF( .NOT. ln_cpl) THEN667 IF( ln_ssr ) THEN 662 668 CALL histdef( nid_T, "sohefldp", "Surface Heat Flux: Damping" , "W/m2" , & ! qrp 663 669 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) … … 667 673 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 668 674 ENDIF 669 670 IF( ln_cpl .AND. nn_ice <= 1 ) THEN 671 CALL histdef( nid_T, "sohefldp", "Surface Heat Flux: Damping" , "W/m2" , & ! qrp 672 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 673 CALL histdef( nid_T, "sowafldp", "Surface Water Flux: Damping" , "Kg/m2/s", & ! erp 674 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 675 CALL histdef( nid_T, "sosafldp", "Surface salt flux: Damping" , "Kg/m2/s", & ! erp * sn 676 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 677 ENDIF 678 675 679 676 clmx ="l_max(only(x))" ! max index on a period 680 677 ! CALL histdef( nid_T, "sobowlin", "Bowl Index" , "W-point", & ! bowl INDEX … … 752 749 ! donne le nombre d'elements, et ndex la liste des indices a sortir 753 750 754 IF( lwp .AND. MOD( itmod, n write ) == 0 ) THEN751 IF( lwp .AND. MOD( itmod, nn_write ) == 0 ) THEN 755 752 WRITE(numout,*) 'dia_wri : write model outputs in NetCDF files at ', kt, 'time-step' 756 753 WRITE(numout,*) '~~~~~~ ' … … 816 813 ENDIF 817 814 818 IF( .NOT. ln_cpl) THEN815 IF( ln_ssr ) THEN 819 816 CALL histwrite( nid_T, "sohefldp", it, qrp , ndim_hT, ndex_hT ) ! heat flux damping 820 817 CALL histwrite( nid_T, "sowafldp", it, erp , ndim_hT, ndex_hT ) ! freshwater flux damping 821 IF( ln_ssr ) zw2d(:,:) = erp(:,:) * ts(:,:,1,jp_sal,Kmm) * tmask(:,:,1) 822 CALL histwrite( nid_T, "sosafldp", it, zw2d , ndim_hT, ndex_hT ) ! salt flux damping 823 ENDIF 824 IF( ln_cpl .AND. nn_ice <= 1 ) THEN 825 CALL histwrite( nid_T, "sohefldp", it, qrp , ndim_hT, ndex_hT ) ! heat flux damping 826 CALL histwrite( nid_T, "sowafldp", it, erp , ndim_hT, ndex_hT ) ! freshwater flux damping 827 IF( ln_ssr ) zw2d(:,:) = erp(:,:) * ts(:,:,1,jp_sal,Kmm) * tmask(:,:,1) 818 zw2d(:,:) = erp(:,:) * ts(:,:,1,jp_sal,Kmm) * tmask(:,:,1) 828 819 CALL histwrite( nid_T, "sosafldp", it, zw2d , ndim_hT, ndex_hT ) ! salt flux damping 829 820 ENDIF … … 844 835 CALL histwrite( nid_V, "sometauy", it, vtau , ndim_hV, ndex_hV ) ! j-wind stress 845 836 846 CALL histwrite( nid_W, "vovecrtz", it, ww , ndim_T, ndex_T ) ! vert. current 837 IF( ln_zad_Aimp ) THEN 838 CALL histwrite( nid_W, "vovecrtz", it, ww + wi , ndim_T, ndex_T ) ! vert. current 839 ELSE 840 CALL histwrite( nid_W, "vovecrtz", it, ww , ndim_T, ndex_T ) ! vert. current 841 ENDIF 847 842 CALL histwrite( nid_W, "votkeavt", it, avt , ndim_T, ndex_T ) ! T vert. eddy diff. coef. 848 843 CALL histwrite( nid_W, "votkeavm", it, avm , ndim_T, ndex_T ) ! T vert. eddy visc. coef. … … 906 901 CALL iom_rstput( 0, 0, inum, 'vozocrtx', uu(:,:,:,Kmm) ) ! now i-velocity 907 902 CALL iom_rstput( 0, 0, inum, 'vomecrty', vv(:,:,:,Kmm) ) ! now j-velocity 908 CALL iom_rstput( 0, 0, inum, 'vovecrtz', ww ) ! now k-velocity 903 IF( ln_zad_Aimp ) THEN 904 CALL iom_rstput( 0, 0, inum, 'vovecrtz', ww + wi ) ! now k-velocity 905 ELSE 906 CALL iom_rstput( 0, 0, inum, 'vovecrtz', ww ) ! now k-velocity 907 ENDIF 909 908 IF( ALLOCATED(ahtu) ) THEN 910 909 CALL iom_rstput( 0, 0, inum, 'ahtu', ahtu ) ! aht at u-point
Note: See TracChangeset
for help on using the changeset viewer.