Changeset 2941
- Timestamp:
- 2011-10-17T14:17:40+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2011/dev_r2802_MERCATOR10_diadct/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90
r2927 r2941 70 70 INTEGER :: nb_sec 71 71 72 LOGICAL :: l_strpond ! FALSE: 0 section with heat/salt tranport73 ! TRUE : 1 or more sections with heat/salt tranport74 ! Used to open/close output files for heat/salt tranport75 76 72 TYPE POINT_SECTION 77 73 INTEGER :: I,J … … 99 95 REAL(wp), DIMENSION(nb_type_class,nb_class_max) :: transport ! transport output 100 96 REAL(wp) :: slopeSection ! slope of the section 101 INTEGER :: nb_point ! number of points in section102 TYPE(POINT_SECTION),DIMENSION(nb_point_max) :: listPoint ! list point in section97 INTEGER :: nb_point ! number of points in the section 98 TYPE(POINT_SECTION),DIMENSION(nb_point_max) :: listPoint ! list of points in the sections 103 99 END TYPE SECTION 104 100 … … 147 143 IF( lwp ) THEN 148 144 CALL ctl_opn( numdct_vol, 'volume_transport', 'NEW', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 149 IF( l_strpond )THEN 150 CALL ctl_opn( numdct_heat, 'heat_transport' , 'NEW', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 151 CALL ctl_opn( numdct_salt, 'salt_transport' , 'NEW', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 152 ENDIF 145 CALL ctl_opn( numdct_heat, 'heat_transport' , 'NEW', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 146 CALL ctl_opn( numdct_salt, 'salt_transport' , 'NEW', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 153 147 ENDIF 154 148 … … 248 242 INTEGER :: isec, iiglo, ijglo, iiloc, ijloc,iost,i1 ,i2 ! temporary integer 249 243 INTEGER :: jsec, jpt ! dummy loop indices 250 INTEGER :: istrpond ! count number of section for which251 244 ! heat/salt tranport is actived 252 245 … … 262 255 lldebug !debug the section 263 256 !!------------------------------------------------------------------------------------- 264 istrpond = 0 ! init to zero number of section for which heat/salt tranport is actived265 l_strpond = .FALSE. !266 257 267 258 !open input file … … 310 301 READ(numdct_in)secs(jsec)%slopeSection 311 302 READ(numdct_in)iptglo 312 313 istrpond = istrpond + COUNT((/secs(jsec)%llstrpond/))314 303 315 304 !debug … … 422 411 nb_sec = jsec-1 !number of section read in the file 423 412 424 IF( istrpond .GT. 0 ) l_strpond = .TRUE. ! output file for heat/salt transport actived425 426 413 END SUBROUTINE readsec 427 414 … … 506 493 !! *** ROUTINE transport *** 507 494 !! 508 !! ** Purpose : Compute the transport t rough a section495 !! ** Purpose : Compute the transport through a section 509 496 !! 510 497 !! ** Method :Transport through a given section is equal to the sum of transports … … 515 502 !! !BE carefull : 516 503 !! one section is a sum of segments 517 !! one segment is defined by 2 consectu ivespoints in sec%listPoint504 !! one segment is defined by 2 consectuve points in sec%listPoint 518 505 !! all points of sec%listPoint are positioned on the F-point of the cell. 519 506 !! … … 547 534 zice_surf_pos, zice_surf_neg !surface ice transport " 548 535 REAL(wp):: ztn, zsn, zrhoi, zrhop, zsshn, zfsdep ! temperature/salinity/ssh/potential density /depth at u/v point 549 REAL(wp) :: aj,i0,j0,i1,j1,i,j550 536 551 537 TYPE(POINT_SECTION) :: k … … 868 854 END SUBROUTINE transport 869 855 870 SUBROUTINE dia_dct_wri(kt, jsec,sec)856 SUBROUTINE dia_dct_wri(kt,ksec,sec) 871 857 !!------------------------------------------------------------- 872 858 !! Write transport output in numdct … … 888 874 INTEGER, INTENT(IN) :: kt ! time-step 889 875 TYPE(SECTION), INTENT(INOUT) :: sec ! section to write 890 INTEGER ,INTENT(IN) :: jsec ! section number876 INTEGER ,INTENT(IN) :: ksec ! section number 891 877 892 878 !!local declarations … … 949 935 950 936 !write volume transport per class 951 WRITE(numdct_vol,118) ndastp,kt, jsec,sec%name,zslope, &937 WRITE(numdct_vol,118) ndastp,kt,ksec,sec%name,zslope, & 952 938 jcl,classe,zbnd1,zbnd2,& 953 939 sec%transport(1,jcl),sec%transport(2,jcl), & … … 957 943 958 944 !write heat transport per class: 959 WRITE(numdct_heat,119) ndastp,kt, jsec,sec%name,zslope, &945 WRITE(numdct_heat,119) ndastp,kt,ksec,sec%name,zslope, & 960 946 jcl,classe,zbnd1,zbnd2,& 961 947 sec%transport(7,jcl)*1000._wp*rcp/1.e15,sec%transport(8,jcl)*1000._wp*rcp/1.e15, & 962 948 ( sec%transport(7,jcl)+sec%transport(8,jcl) )*1000._wp*rcp/1.e15 963 949 !write salt transport per class 964 WRITE(numdct_salt,119) ndastp,kt, jsec,sec%name,zslope, &950 WRITE(numdct_salt,119) ndastp,kt,ksec,sec%name,zslope, & 965 951 jcl,classe,zbnd1,zbnd2,& 966 952 sec%transport(9,jcl)*1000._wp/1.e9,sec%transport(10,jcl)*1000._wp/1.e9,& … … 975 961 976 962 !write total volume transport 977 WRITE(numdct_vol,118) ndastp,kt, jsec,sec%name,zslope, &963 WRITE(numdct_vol,118) ndastp,kt,ksec,sec%name,zslope, & 978 964 jcl,"total",zbnd1,zbnd2,& 979 965 zsumclass(1),zsumclass(2),zsumclass(1)+zsumclass(2) … … 982 968 983 969 !write total heat transport 984 WRITE(numdct_heat,119) ndastp,kt, jsec,sec%name,zslope, &970 WRITE(numdct_heat,119) ndastp,kt,ksec,sec%name,zslope, & 985 971 jcl,"total",zbnd1,zbnd2,& 986 972 zsumclass(7)* 1000._wp*rcp/1.e15,zsumclass(8)* 1000._wp*rcp/1.e15,& 987 973 (zsumclass(7)+zsumclass(8) )* 1000._wp*rcp/1.e15 988 974 !write total salt transport 989 WRITE(numdct_salt,119) ndastp,kt, jsec,sec%name,zslope, &975 WRITE(numdct_salt,119) ndastp,kt,ksec,sec%name,zslope, & 990 976 jcl,"total",zbnd1,zbnd2,& 991 977 zsumclass(9)*1000._wp/1.e9,zsumclass(10)*1000._wp/1.e9,& … … 996 982 IF ( sec%ll_ice_section) THEN 997 983 !write total ice volume transport 998 WRITE(numdct_vol,118) ndastp,kt, jsec,sec%name,zslope,&984 WRITE(numdct_vol,118) ndastp,kt,ksec,sec%name,zslope,& 999 985 jcl,"ice_vol",zbnd1,zbnd2,& 1000 986 sec%transport(9,1),sec%transport(10,1),& 1001 987 sec%transport(9,1)+sec%transport(10,1) 1002 988 !write total ice surface transport 1003 WRITE(numdct_vol,118) ndastp,kt, jsec,sec%name,zslope,&989 WRITE(numdct_vol,118) ndastp,kt,ksec,sec%name,zslope,& 1004 990 jcl,"ice_surf",zbnd1,zbnd2,& 1005 991 sec%transport(11,1),sec%transport(12,1), &
Note: See TracChangeset
for help on using the changeset viewer.