Changeset 11536 for NEMO/trunk/tests/CANAL/MY_SRC/diawri.F90
- Timestamp:
- 2019-09-11T15:54:18+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/tests/CANAL/MY_SRC/diawri.F90
r10425 r11536 531 531 !! define all the NETCDF files and fields 532 532 !! At each time step call histdef to compute the mean if ncessary 533 !! Each n write time step, output the instantaneous or mean fields533 !! Each nn_write time step, output the instantaneous or mean fields 534 534 !!---------------------------------------------------------------------- 535 535 INTEGER, INTENT( in ) :: kt ! ocean time-step index … … 547 547 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zw3d ! 3D workspace 548 548 !!---------------------------------------------------------------------- 549 !550 IF( ln_timing ) CALL timing_start('dia_wri')551 549 ! 552 550 IF( ninist == 1 ) THEN !== Output the initial state and forcings ==! … … 555 553 ENDIF 556 554 ! 555 IF( nn_write == -1 ) RETURN ! we will never do any output 556 ! 557 IF( ln_timing ) CALL timing_start('dia_wri') 558 ! 557 559 ! 0. Initialisation 558 560 ! ----------------- … … 564 566 clop = "x" ! no use of the mask value (require less cpu time and otherwise the model crashes) 565 567 #if defined key_diainstant 566 zsto = n write * rdt568 zsto = nn_write * rdt 567 569 clop = "inst("//TRIM(clop)//")" 568 570 #else … … 570 572 clop = "ave("//TRIM(clop)//")" 571 573 #endif 572 zout = n write * rdt574 zout = nn_write * rdt 573 575 zmax = ( nitend - nit000 + 1 ) * rdt 574 576 … … 601 603 ! WRITE root name in date.file for use by postpro 602 604 IF(lwp) THEN 603 CALL dia_nam( clhstnam, n write,' ' )605 CALL dia_nam( clhstnam, nn_write,' ' ) 604 606 CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 605 607 WRITE(inum,*) clhstnam … … 609 611 ! Define the T grid FILE ( nid_T ) 610 612 611 CALL dia_nam( clhstnam, n write, 'grid_T' )613 CALL dia_nam( clhstnam, nn_write, 'grid_T' ) 612 614 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam ! filename 613 615 CALL histbeg( clhstnam, jpi, glamt, jpj, gphit, & ! Horizontal grid: glamt and gphit … … 645 647 ! Define the U grid FILE ( nid_U ) 646 648 647 CALL dia_nam( clhstnam, n write, 'grid_U' )649 CALL dia_nam( clhstnam, nn_write, 'grid_U' ) 648 650 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam ! filename 649 651 CALL histbeg( clhstnam, jpi, glamu, jpj, gphiu, & ! Horizontal grid: glamu and gphiu … … 658 660 ! Define the V grid FILE ( nid_V ) 659 661 660 CALL dia_nam( clhstnam, n write, 'grid_V' ) ! filename662 CALL dia_nam( clhstnam, nn_write, 'grid_V' ) ! filename 661 663 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam 662 664 CALL histbeg( clhstnam, jpi, glamv, jpj, gphiv, & ! Horizontal grid: glamv and gphiv … … 671 673 ! Define the W grid FILE ( nid_W ) 672 674 673 CALL dia_nam( clhstnam, n write, 'grid_W' ) ! filename675 CALL dia_nam( clhstnam, nn_write, 'grid_W' ) ! filename 674 676 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam 675 677 CALL histbeg( clhstnam, jpi, glamt, jpj, gphit, & ! Horizontal grid: glamt and gphit … … 762 764 ENDIF 763 765 764 IF( .NOT. ln_cpl) THEN766 IF( ln_ssr ) THEN 765 767 CALL histdef( nid_T, "sohefldp", "Surface Heat Flux: Damping" , "W/m2" , & ! qrp 766 768 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) … … 770 772 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 771 773 ENDIF 772 773 IF( ln_cpl .AND. nn_ice <= 1 ) THEN 774 CALL histdef( nid_T, "sohefldp", "Surface Heat Flux: Damping" , "W/m2" , & ! qrp 775 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 776 CALL histdef( nid_T, "sowafldp", "Surface Water Flux: Damping" , "Kg/m2/s", & ! erp 777 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 778 CALL histdef( nid_T, "sosafldp", "Surface salt flux: Damping" , "Kg/m2/s", & ! erp * sn 779 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 780 ENDIF 781 774 782 775 clmx ="l_max(only(x))" ! max index on a period 783 776 ! CALL histdef( nid_T, "sobowlin", "Bowl Index" , "W-point", & ! bowl INDEX … … 855 848 ! donne le nombre d'elements, et ndex la liste des indices a sortir 856 849 857 IF( lwp .AND. MOD( itmod, n write ) == 0 ) THEN850 IF( lwp .AND. MOD( itmod, nn_write ) == 0 ) THEN 858 851 WRITE(numout,*) 'dia_wri : write model outputs in NetCDF files at ', kt, 'time-step' 859 852 WRITE(numout,*) '~~~~~~ ' … … 919 912 ENDIF 920 913 921 IF( .NOT. ln_cpl) THEN914 IF( ln_ssr ) THEN 922 915 CALL histwrite( nid_T, "sohefldp", it, qrp , ndim_hT, ndex_hT ) ! heat flux damping 923 916 CALL histwrite( nid_T, "sowafldp", it, erp , ndim_hT, ndex_hT ) ! freshwater flux damping 924 IF( ln_ssr ) zw2d(:,:) = erp(:,:) * tsn(:,:,1,jp_sal) * tmask(:,:,1) 925 CALL histwrite( nid_T, "sosafldp", it, zw2d , ndim_hT, ndex_hT ) ! salt flux damping 926 ENDIF 927 IF( ln_cpl .AND. nn_ice <= 1 ) THEN 928 CALL histwrite( nid_T, "sohefldp", it, qrp , ndim_hT, ndex_hT ) ! heat flux damping 929 CALL histwrite( nid_T, "sowafldp", it, erp , ndim_hT, ndex_hT ) ! freshwater flux damping 930 IF( ln_ssr ) zw2d(:,:) = erp(:,:) * tsn(:,:,1,jp_sal) * tmask(:,:,1) 917 zw2d(:,:) = erp(:,:) * tsn(:,:,1,jp_sal) * tmask(:,:,1) 931 918 CALL histwrite( nid_T, "sosafldp", it, zw2d , ndim_hT, ndex_hT ) ! salt flux damping 932 919 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.