- Timestamp:
- 2019-12-11T12:02:38+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r11078_OSMOSIS_IMMERSE_Nurser/src/OCE/DIA/diawri.F90
r11143 r12178 43 43 USE zdfdrg ! ocean vertical physics: top/bottom friction 44 44 USE zdfmxl ! mixed layer 45 USE zdfosm ! mixed layer46 45 ! 47 46 USE lbclnk ! ocean lateral boundary conditions (or mpp link) … … 211 210 ENDIF 212 211 212 IF( ln_zad_Aimp ) wn = wn + wi ! Recombine explicit and implicit parts of vertical velocity for diagnostic output 213 ! 213 214 CALL iom_put( "woce", wn ) ! vertical velocity 214 215 IF( iom_use('w_masstr') .OR. iom_use('w_masstr2') ) THEN ! vertical mass transport & its square value … … 221 222 IF( iom_use('w_masstr2') ) CALL iom_put( "w_masstr2", z3d(:,:,:) * z3d(:,:,:) ) 222 223 ENDIF 224 ! 225 IF( ln_zad_Aimp ) wn = wn - wi ! Remove implicit part of vertical velocity that was added for diagnostic output 223 226 224 227 CALL iom_put( "avt" , avt ) ! T vert. eddy diff. coef. … … 427 430 !! define all the NETCDF files and fields 428 431 !! At each time step call histdef to compute the mean if ncessary 429 !! Each n write time step, output the instantaneous or mean fields432 !! Each nn_write time step, output the instantaneous or mean fields 430 433 !!---------------------------------------------------------------------- 431 434 INTEGER, INTENT( in ) :: kt ! ocean time-step index … … 443 446 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zw3d ! 3D workspace 444 447 !!---------------------------------------------------------------------- 445 !446 IF( ln_timing ) CALL timing_start('dia_wri')447 448 ! 448 449 IF( ninist == 1 ) THEN !== Output the initial state and forcings ==! … … 451 452 ENDIF 452 453 ! 454 IF( nn_write == -1 ) RETURN ! we will never do any output 455 ! 456 IF( ln_timing ) CALL timing_start('dia_wri') 457 ! 453 458 ! 0. Initialisation 454 459 ! ----------------- … … 460 465 clop = "x" ! no use of the mask value (require less cpu time and otherwise the model crashes) 461 466 #if defined key_diainstant 462 zsto = n write * rdt467 zsto = nn_write * rdt 463 468 clop = "inst("//TRIM(clop)//")" 464 469 #else … … 466 471 clop = "ave("//TRIM(clop)//")" 467 472 #endif 468 zout = n write * rdt473 zout = nn_write * rdt 469 474 zmax = ( nitend - nit000 + 1 ) * rdt 470 475 … … 497 502 ! WRITE root name in date.file for use by postpro 498 503 IF(lwp) THEN 499 CALL dia_nam( clhstnam, n write,' ' )504 CALL dia_nam( clhstnam, nn_write,' ' ) 500 505 CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 501 506 WRITE(inum,*) clhstnam … … 505 510 ! Define the T grid FILE ( nid_T ) 506 511 507 CALL dia_nam( clhstnam, n write, 'grid_T' )512 CALL dia_nam( clhstnam, nn_write, 'grid_T' ) 508 513 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam ! filename 509 514 CALL histbeg( clhstnam, jpi, glamt, jpj, gphit, & ! Horizontal grid: glamt and gphit … … 541 546 ! Define the U grid FILE ( nid_U ) 542 547 543 CALL dia_nam( clhstnam, n write, 'grid_U' )548 CALL dia_nam( clhstnam, nn_write, 'grid_U' ) 544 549 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam ! filename 545 550 CALL histbeg( clhstnam, jpi, glamu, jpj, gphiu, & ! Horizontal grid: glamu and gphiu … … 554 559 ! Define the V grid FILE ( nid_V ) 555 560 556 CALL dia_nam( clhstnam, n write, 'grid_V' ) ! filename561 CALL dia_nam( clhstnam, nn_write, 'grid_V' ) ! filename 557 562 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam 558 563 CALL histbeg( clhstnam, jpi, glamv, jpj, gphiv, & ! Horizontal grid: glamv and gphiv … … 567 572 ! Define the W grid FILE ( nid_W ) 568 573 569 CALL dia_nam( clhstnam, n write, 'grid_W' ) ! filename574 CALL dia_nam( clhstnam, nn_write, 'grid_W' ) ! filename 570 575 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam 571 576 CALL histbeg( clhstnam, jpi, glamt, jpj, gphit, & ! Horizontal grid: glamt and gphit … … 658 663 ENDIF 659 664 660 IF( .NOT. ln_cpl) THEN665 IF( ln_ssr ) THEN 661 666 CALL histdef( nid_T, "sohefldp", "Surface Heat Flux: Damping" , "W/m2" , & ! qrp 662 667 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) … … 666 671 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 667 672 ENDIF 668 669 IF( ln_cpl .AND. nn_ice <= 1 ) THEN 670 CALL histdef( nid_T, "sohefldp", "Surface Heat Flux: Damping" , "W/m2" , & ! qrp 671 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 672 CALL histdef( nid_T, "sowafldp", "Surface Water Flux: Damping" , "Kg/m2/s", & ! erp 673 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 674 CALL histdef( nid_T, "sosafldp", "Surface salt flux: Damping" , "Kg/m2/s", & ! erp * sn 675 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 676 ENDIF 677 673 678 674 clmx ="l_max(only(x))" ! max index on a period 679 675 ! CALL histdef( nid_T, "sobowlin", "Bowl Index" , "W-point", & ! bowl INDEX … … 751 747 ! donne le nombre d'elements, et ndex la liste des indices a sortir 752 748 753 IF( lwp .AND. MOD( itmod, n write ) == 0 ) THEN749 IF( lwp .AND. MOD( itmod, nn_write ) == 0 ) THEN 754 750 WRITE(numout,*) 'dia_wri : write model outputs in NetCDF files at ', kt, 'time-step' 755 751 WRITE(numout,*) '~~~~~~ ' … … 815 811 ENDIF 816 812 817 IF( .NOT. ln_cpl) THEN813 IF( ln_ssr ) THEN 818 814 CALL histwrite( nid_T, "sohefldp", it, qrp , ndim_hT, ndex_hT ) ! heat flux damping 819 815 CALL histwrite( nid_T, "sowafldp", it, erp , ndim_hT, ndex_hT ) ! freshwater flux damping 820 IF( ln_ssr ) zw2d(:,:) = erp(:,:) * tsn(:,:,1,jp_sal) * tmask(:,:,1) 821 CALL histwrite( nid_T, "sosafldp", it, zw2d , ndim_hT, ndex_hT ) ! salt flux damping 822 ENDIF 823 IF( ln_cpl .AND. nn_ice <= 1 ) THEN 824 CALL histwrite( nid_T, "sohefldp", it, qrp , ndim_hT, ndex_hT ) ! heat flux damping 825 CALL histwrite( nid_T, "sowafldp", it, erp , ndim_hT, ndex_hT ) ! freshwater flux damping 826 IF( ln_ssr ) zw2d(:,:) = erp(:,:) * tsn(:,:,1,jp_sal) * tmask(:,:,1) 816 zw2d(:,:) = erp(:,:) * tsn(:,:,1,jp_sal) * tmask(:,:,1) 827 817 CALL histwrite( nid_T, "sosafldp", it, zw2d , ndim_hT, ndex_hT ) ! salt flux damping 828 818 ENDIF … … 843 833 CALL histwrite( nid_V, "sometauy", it, vtau , ndim_hV, ndex_hV ) ! j-wind stress 844 834 845 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 846 840 CALL histwrite( nid_W, "votkeavt", it, avt , ndim_T, ndex_T ) ! T vert. eddy diff. coef. 847 841 CALL histwrite( nid_W, "votkeavm", it, avm , ndim_T, ndex_T ) ! T vert. eddy visc. coef. … … 904 898 CALL iom_rstput( 0, 0, inum, 'vozocrtx', un ) ! now i-velocity 905 899 CALL iom_rstput( 0, 0, inum, 'vomecrty', vn ) ! now j-velocity 906 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 907 905 IF( ALLOCATED(ahtu) ) THEN 908 906 CALL iom_rstput( 0, 0, inum, 'ahtu', ahtu ) ! aht at u-point … … 928 926 CALL iom_rstput( 0, 0, inum, 'sdvecrtz', wsd ) ! now StokesDrift k-velocity 929 927 ENDIF 930 931 IF( ln_zdfosm ) THEN932 CALL iom_rstput( 0, 0, inum, 'hbl', hbl*tmask(:,:,1) ) ! now boundary-layer depth933 CALL iom_rstput( 0, 0, inum, 'hml', hml*tmask(:,:,1) ) ! now mixed-layer depth934 CALL iom_rstput( 0, 0, inum, 'avt_k', avt_k*wmask ) ! w-level diffusion935 CALL iom_rstput( 0, 0, inum, 'avm_k', avm_k*wmask ) ! now w-level viscosity936 CALL iom_rstput( 0, 0, inum, 'ghamt', ghamt*wmask ) ! non-local t forcing937 CALL iom_rstput( 0, 0, inum, 'ghams', ghams*wmask ) ! non-local s forcing938 CALL iom_rstput( 0, 0, inum, 'ghamu', ghamu*wmask ) ! non-local u forcing939 CALL iom_rstput( 0, 0, inum, 'ghamv', ghamu*wmask ) ! non-local v forcing940 ENDIF941 ! ! CALL histwrite( id_i, "zla", kt, zla*tmask(:,:,1) , jpi*jpj, idex) ! now Langmuir #942 ! ! CALL histwrite( id_i, "zvstr", kt, zvstr*tmask(:,:,1) , jpi*jpj, idex) ! now mixed velocity scale943 ! ! CALL histwrite( id_i, "zustar", kt, zustar*tmask(:,:,1) , jpi*jpj, idex) ! now friction velocity scale944 ! ! CALL histwrite( id_i, "zwstrl", kt, zwstrl*tmask(:,:,1) , jpi*jpj, idex) ! now Langmuir velocity scale945 ! ! CALL histwrite( id_i, "zwstrc", kt, zwstrc*tmask(:,:,1) , jpi*jpj, idex) ! now convective velocity scale946 ! ! CALL histwrite( id_i, "zwb_ent", kt, zwb_ent*tmask(:,:,1) , jpi*jpj, idex) ! now upward turb buoyancy entrainment flux947 ! ! CALL histwrite( id_i, "zdb_bl", kt, zdb_bl*tmask(:,:,1) , jpi*jpj, idex) ! now db at ml base948 928 949 929 #if defined key_si3
Note: See TracChangeset
for help on using the changeset viewer.