Changeset 2927
- Timestamp:
- 2011-10-14T19:01:57+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
r2919 r2927 41 41 USE ice 42 42 #endif 43 USE domvvl 43 44 44 45 IMPLICIT NONE … … 68 69 INTEGER, PARAMETER :: nb_type_class = 14 69 70 INTEGER :: nb_sec 71 72 LOGICAL :: l_strpond ! FALSE: 0 section with heat/salt tranport 73 ! TRUE : 1 or more sections with heat/salt tranport 74 ! Used to open/close output files for heat/salt tranport 70 75 71 76 TYPE POINT_SECTION … … 81 86 LOGICAL :: llstrpond ! true if you want the computation of salt and 82 87 ! heat transports 83 LOGICAL :: ll_ice_section ! ice surf and icevolcomputation88 LOGICAL :: ll_ice_section ! ice surface and ice volume computation 84 89 LOGICAL :: ll_date_line ! = T if the section crosses the date-line 85 90 TYPE(COORD_SECTION), DIMENSION(2) :: coordSec ! longitude and latitude of the extremities of the sec … … 93 98 zlay ! level classes (99 if you don't want) 94 99 REAL(wp), DIMENSION(nb_type_class,nb_class_max) :: transport ! transport output 95 REAL(wp) :: slopeSection ! s ection's slopesection96 INTEGER :: nb_point ! section's number of points97 TYPE(POINT_SECTION),DIMENSION(nb_point_max) :: listPoint ! section's list point100 REAL(wp) :: slopeSection ! slope of the section 101 INTEGER :: nb_point ! number of points in section 102 TYPE(POINT_SECTION),DIMENSION(nb_point_max) :: listPoint ! list point in section 98 103 END TYPE SECTION 99 104 … … 134 139 & CALL ctl_stop( 'diadct: nn_dct should be smaller and a multiple of nn_dctwri' ) 135 140 136 !open output file137 CALL ctl_opn( numdct_vol, 'volume_transport', 'NEW', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )138 CALL ctl_opn( numdct_heat, 'heat_transport' , 'NEW', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )139 CALL ctl_opn( numdct_salt, 'salt_transport' , 'NEW', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )140 141 141 ENDIF 142 142 143 143 !Read section_ijglobal.diadct 144 144 CALL readsec 145 146 !open output file 147 IF( lwp ) THEN 148 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 153 ENDIF 154 145 155 146 156 END SUBROUTINE dia_dct_init … … 238 248 INTEGER :: isec, iiglo, ijglo, iiloc, ijloc,iost,i1 ,i2 ! temporary integer 239 249 INTEGER :: jsec, jpt ! dummy loop indices 250 INTEGER :: istrpond ! count number of section for which 251 ! heat/salt tranport is actived 240 252 241 253 INTEGER, DIMENSION(2) :: icoord 242 CHARACTER(len=160) :: clname !filename 243 CHARACTER(len=200) :: cltmp 254 CHARACTER(len=160) :: clname !filename 255 CHARACTER(len=200) :: cltmp 256 CHARACTER(len=200) :: clformat !automatic format 244 257 TYPE(POINT_SECTION),DIMENSION(nb_point_max) ::coordtemp !contains listpoints coordinates 245 258 !read in the file … … 249 262 lldebug !debug the section 250 263 !!------------------------------------------------------------------------------------- 264 istrpond = 0 ! init to zero number of section for which heat/salt tranport is actived 265 l_strpond = .FALSE. ! 251 266 252 267 !open input file … … 296 311 READ(numdct_in)iptglo 297 312 313 istrpond = istrpond + COUNT((/secs(jsec)%llstrpond/)) 314 298 315 !debug 299 316 !----- 317 300 318 IF( lwp .AND. ( jsec==nn_secdebug .OR. nn_secdebug==-1 ) )THEN 301 WRITE(numout,*) " Section name : ",TRIM(secs(jsec)%name) 302 WRITE(numout,*) " Compute heat and salt transport ? ",secs(jsec)%llstrpond 303 WRITE(numout,*) " Compute ice transport ? ",secs(jsec)%ll_ice_section 304 WRITE(numout,*) " Section crosses date-line ? ",secs(jsec)%ll_date_line 305 WRITE(numout,*) " Slope section : ",secs(jsec)%slopeSection 306 WRITE(numout,*) " Number of points in the section: ",iptglo 307 WRITE(numout,*) " Number of classes ",secs(jsec)%nb_class 308 ! WRITE(numout,'(A40,10(f8.3,1X))')" Insitu density classes : ",secs(jsec)%zsigi 309 WRITE(numout,'(A40,nb_class_max(f8.3,1X))')" Insitu density classes : ",secs(jsec)%zsigi 310 WRITE(numout,'(A40,10(f8.3,1X))')" Potential density classes : ",secs(jsec)%zsigp 311 WRITE(numout,'(A40,10(f8.3,1X))')" Salinity classes : ",secs(jsec)%zsal 312 WRITE(numout,'(A40,10(f8.3,1X))')" Temperature classes : ",secs(jsec)%ztem 313 WRITE(numout,'(A40,10(f8.3,1X))')" Depth classes : ",secs(jsec)%zlay 319 320 WRITE(clformat,'(a,i2,a)') '(A40,', nb_class_max,'(f8.3,1X))' 321 322 WRITE(numout,*) " Section name : ",TRIM(secs(jsec)%name) 323 WRITE(numout,*) " Compute heat and salt transport ? ",secs(jsec)%llstrpond 324 WRITE(numout,*) " Compute ice transport ? ",secs(jsec)%ll_ice_section 325 WRITE(numout,*) " Section crosses date-line ? ",secs(jsec)%ll_date_line 326 WRITE(numout,*) " Slope section : ",secs(jsec)%slopeSection 327 WRITE(numout,*) " Number of points in the section: ",iptglo 328 WRITE(numout,*) " Number of classes ",secs(jsec)%nb_class 329 WRITE(numout,clformat)" Insitu density classes : ",secs(jsec)%zsigi 330 WRITE(numout,clformat)" Potential density classes : ",secs(jsec)%zsigp 331 WRITE(numout,clformat)" Salinity classes : ",secs(jsec)%zsal 332 WRITE(numout,clformat)" Temperature classes : ",secs(jsec)%ztem 333 WRITE(numout,clformat)" Depth classes : ",secs(jsec)%zlay 314 334 ENDIF 315 335 … … 402 422 nb_sec = jsec-1 !number of section read in the file 403 423 424 IF( istrpond .GT. 0 ) l_strpond = .TRUE. ! output file for heat/salt transport actived 425 404 426 END SUBROUTINE readsec 405 427 … … 426 448 isgn ,& ! isgn= 1 : scan listpoint from start to end 427 449 ! isgn=-1 : scan listpoint from end to start 428 ipoint ,& !way of course in listpoint429 450 istart,iend !first and last points selected in listpoint 430 451 INTEGER :: jpoint =0 !loop on list points … … 485 506 !! *** ROUTINE transport *** 486 507 !! 487 !! ** Purpose : Compute the transport trough a sec 508 !! ** Purpose : Compute the transport trough a section 488 509 !! 489 510 !! ** Method :Transport through a given section is equal to the sum of transports 490 511 !! computed on each proc. 491 512 !! On each proc,transport is equal to the sum of transport computed through 492 !! segments linking each point sof sec%listPoint with the next one.513 !! segments linking each point of sec%listPoint with the next one. 493 514 !! 494 515 !! !BE carefull : 495 516 !! one section is a sum of segments 496 517 !! one segment is defined by 2 consectuives points in sec%listPoint 497 !! all points of sec%listPoint are position ned on the F-point of the cell.518 !! all points of sec%listPoint are positioned on the F-point of the cell. 498 519 !! 499 520 !! There are several loops: … … 580 601 581 602 !------------------------------------------------------------------------------------------- 582 ! Select good coordinate to have velocity of the segment:603 ! Select the appropriate coordinate for computing the velocity of the segment 583 604 ! 584 605 ! CASE(0) Case (2) … … 1098 1119 #if defined key_vvl 1099 1120 1100 ze3w = fsve3w(ii2,ij2,kk) - fsve3w(ii1,ij1,kk) 1101 1102 zfse3 = fsve3w(ii1,ij1,kk) * ( 1 + sshn(ii2,ij2) * mut(ii2,ij2,kk) ) 1103 zwgt1 = ( fse3w(ii2,ij2,kk) - zfse3 )/ fse3w(ii2,ij2,kk) 1104 1105 zfse3 = fsve3w(ii2,ij2,kk) * ( 1 + sshn(ii1,ij1) * mut(ii1,ij1,kk) ) 1106 zwgt2 = ( fse3w(ii1,ij1,kk) - zfse3 )/ fse3w(ii1,ij1,kk) 1121 ze3t = fse3t_n(ii2,ij2,kk) - fse3t_n(ii1,ij1,kk) 1122 zwgt1 = ( fse3w_n(ii2,ij2,kk) - fse3w_n(ii1,ij1,kk) ) / fse3w_n(ii2,ij2,kk) 1123 zwgt2 = ( fse3w_n(ii1,ij1,kk) - fse3w_n(ii2,ij2,kk) ) / fse3w_n(ii1,ij1,kk) 1107 1124 1108 1125 #else 1109 1126 1110 ze3t = fse3t(ii2,ij2,kk) -fse3t(ii1,ij1,kk)1127 ze3t = fse3t(ii2,ij2,kk) - fse3t(ii1,ij1,kk) 1111 1128 zwgt1 = ( fse3w(ii2,ij2,kk) - fse3w(ii1,ij1,kk) ) / fse3w(ii2,ij2,kk) 1112 1129 zwgt2 = ( fse3w(ii1,ij1,kk) - fse3w(ii2,ij2,kk) ) / fse3w(ii1,ij1,kk)
Note: See TracChangeset
for help on using the changeset viewer.