Changeset 11692 for NEMO/branches/2019/dev_r11514_HPC-02_single-core-extrahalo/src/OCE/DIA/diawri.F90
- Timestamp:
- 2019-10-12T16:08:18+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r11514_HPC-02_single-core-extrahalo/src/OCE/DIA/diawri.F90
r11418 r11692 430 430 !! define all the NETCDF files and fields 431 431 !! At each time step call histdef to compute the mean if ncessary 432 !! Each n write time step, output the instantaneous or mean fields432 !! Each nn_write time step, output the instantaneous or mean fields 433 433 !!---------------------------------------------------------------------- 434 434 INTEGER, INTENT( in ) :: kt ! ocean time-step index … … 446 446 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zw3d ! 3D workspace 447 447 !!---------------------------------------------------------------------- 448 !449 IF( ln_timing ) CALL timing_start('dia_wri')450 448 ! 451 449 IF( ninist == 1 ) THEN !== Output the initial state and forcings ==! … … 454 452 ENDIF 455 453 ! 454 IF( nn_write == -1 ) RETURN ! we will never do any output 455 ! 456 IF( ln_timing ) CALL timing_start('dia_wri') 457 ! 456 458 ! 0. Initialisation 457 459 ! ----------------- … … 463 465 clop = "x" ! no use of the mask value (require less cpu time and otherwise the model crashes) 464 466 #if defined key_diainstant 465 zsto = n write * rdt467 zsto = nn_write * rdt 466 468 clop = "inst("//TRIM(clop)//")" 467 469 #else … … 469 471 clop = "ave("//TRIM(clop)//")" 470 472 #endif 471 zout = n write * rdt473 zout = nn_write * rdt 472 474 zmax = ( nitend - nit000 + 1 ) * rdt 473 475 … … 500 502 ! WRITE root name in date.file for use by postpro 501 503 IF(lwp) THEN 502 CALL dia_nam( clhstnam, n write,' ' )504 CALL dia_nam( clhstnam, nn_write,' ' ) 503 505 CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 504 506 WRITE(inum,*) clhstnam … … 508 510 ! Define the T grid FILE ( nid_T ) 509 511 510 CALL dia_nam( clhstnam, n write, 'grid_T' )512 CALL dia_nam( clhstnam, nn_write, 'grid_T' ) 511 513 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam ! filename 512 514 CALL histbeg( clhstnam, jpi, glamt, jpj, gphit, & ! Horizontal grid: glamt and gphit … … 544 546 ! Define the U grid FILE ( nid_U ) 545 547 546 CALL dia_nam( clhstnam, n write, 'grid_U' )548 CALL dia_nam( clhstnam, nn_write, 'grid_U' ) 547 549 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam ! filename 548 550 CALL histbeg( clhstnam, jpi, glamu, jpj, gphiu, & ! Horizontal grid: glamu and gphiu … … 557 559 ! Define the V grid FILE ( nid_V ) 558 560 559 CALL dia_nam( clhstnam, n write, 'grid_V' ) ! filename561 CALL dia_nam( clhstnam, nn_write, 'grid_V' ) ! filename 560 562 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam 561 563 CALL histbeg( clhstnam, jpi, glamv, jpj, gphiv, & ! Horizontal grid: glamv and gphiv … … 570 572 ! Define the W grid FILE ( nid_W ) 571 573 572 CALL dia_nam( clhstnam, n write, 'grid_W' ) ! filename574 CALL dia_nam( clhstnam, nn_write, 'grid_W' ) ! filename 573 575 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam 574 576 CALL histbeg( clhstnam, jpi, glamt, jpj, gphit, & ! Horizontal grid: glamt and gphit … … 661 663 ENDIF 662 664 663 IF( .NOT. ln_cpl) THEN665 IF( ln_ssr ) THEN 664 666 CALL histdef( nid_T, "sohefldp", "Surface Heat Flux: Damping" , "W/m2" , & ! qrp 665 667 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) … … 669 671 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 670 672 ENDIF 671 672 IF( ln_cpl .AND. nn_ice <= 1 ) THEN 673 CALL histdef( nid_T, "sohefldp", "Surface Heat Flux: Damping" , "W/m2" , & ! qrp 674 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 675 CALL histdef( nid_T, "sowafldp", "Surface Water Flux: Damping" , "Kg/m2/s", & ! erp 676 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 677 CALL histdef( nid_T, "sosafldp", "Surface salt flux: Damping" , "Kg/m2/s", & ! erp * sn 678 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 679 ENDIF 680 673 681 674 clmx ="l_max(only(x))" ! max index on a period 682 675 ! CALL histdef( nid_T, "sobowlin", "Bowl Index" , "W-point", & ! bowl INDEX … … 754 747 ! donne le nombre d'elements, et ndex la liste des indices a sortir 755 748 756 IF( lwp .AND. MOD( itmod, n write ) == 0 ) THEN749 IF( lwp .AND. MOD( itmod, nn_write ) == 0 ) THEN 757 750 WRITE(numout,*) 'dia_wri : write model outputs in NetCDF files at ', kt, 'time-step' 758 751 WRITE(numout,*) '~~~~~~ ' … … 818 811 ENDIF 819 812 820 IF( .NOT. ln_cpl) THEN813 IF( ln_ssr ) THEN 821 814 CALL histwrite( nid_T, "sohefldp", it, qrp , ndim_hT, ndex_hT ) ! heat flux damping 822 815 CALL histwrite( nid_T, "sowafldp", it, erp , ndim_hT, ndex_hT ) ! freshwater flux damping 823 IF( ln_ssr ) zw2d(:,:) = erp(:,:) * tsn(:,:,1,jp_sal) * tmask(:,:,1) 824 CALL histwrite( nid_T, "sosafldp", it, zw2d , ndim_hT, ndex_hT ) ! salt flux damping 825 ENDIF 826 IF( ln_cpl .AND. nn_ice <= 1 ) THEN 827 CALL histwrite( nid_T, "sohefldp", it, qrp , ndim_hT, ndex_hT ) ! heat flux damping 828 CALL histwrite( nid_T, "sowafldp", it, erp , ndim_hT, ndex_hT ) ! freshwater flux damping 829 IF( ln_ssr ) zw2d(:,:) = erp(:,:) * tsn(:,:,1,jp_sal) * tmask(:,:,1) 816 zw2d(:,:) = erp(:,:) * tsn(:,:,1,jp_sal) * tmask(:,:,1) 830 817 CALL histwrite( nid_T, "sosafldp", it, zw2d , ndim_hT, ndex_hT ) ! salt flux damping 831 818 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.