Changeset 10523
 Timestamp:
 20190116T10:36:03+01:00 (5 years ago)
 Location:
 NEMO/trunk/src/OCE
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

NEMO/trunk/src/OCE/IOM/iom.F90
r10522 r10523 1354 1354 iom_getszuld = 1 1355 1355 IF( kiomid > 0 ) THEN 1356 IF( iom_file(kiomid)%iduld .GE. 0 ) THEN 1357 iom_getszuld = iom_file(kiomid)%lenuld 1358 ENDIF 1356 IF( iom_file(kiomid)%iduld > 0 ) iom_getszuld = iom_file(kiomid)%lenuld 1359 1357 ENDIF 1360 1358 END FUNCTION iom_getszuld 
NEMO/trunk/src/OCE/SBC/sbcrnf.F90
r10522 r10523 240 240 INTEGER :: nbrec ! temporary integer 241 241 REAL(wp) :: zacoef 242 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: zrnfcl 243 REAL(wp), DIMENSION(:,: ), ALLOCATABLE :: zrnf 242 REAL(wp), DIMENSION(jpi,jpj,2) :: zrnfcl 244 243 !! 245 244 NAMELIST/namsbc_rnf/ cn_dir , ln_rnf_depth, ln_rnf_tem, ln_rnf_sal, & … … 372 371 CALL iom_open( TRIM( sn_rnf%clname ), inum ) ! open runoff file 373 372 nbrec = iom_getszuld( inum ) 374 ALLOCATE( zrnfcl(jpi,jpj,nbrec) ) ; ALLOCATE( zrnf(jpi,jpj) )373 zrnfcl(:,:,1) = 0._wp ! init the max to 0. in 1 375 374 DO jm = 1, nbrec 376 CALL iom_get( inum, jpdom_data, TRIM( sn_rnf%clvar ), zrnfcl(:,:,jm), jm ) 375 CALL iom_get( inum, jpdom_data, TRIM( sn_rnf%clvar ), zrnfcl(:,:,2), jm ) ! read the value in 2 376 zrnfcl(:,:,1) = MAXVAL( zrnfcl(:,:,:), DIM=3 ) ! store the maximum value in time in 1 377 377 END DO 378 378 CALL iom_close( inum ) 379 zrnf(:,:) = MAXVAL( zrnfcl(:,:,:), DIM=3 ) ! maximum value in time380 DEALLOCATE( zrnfcl )381 379 ! 382 380 h_rnf(:,:) = 1. … … 384 382 zacoef = rn_dep_max / rn_rnf_max ! coef of linear relation between runoff and its depth (150m for max of runoff) 385 383 ! 386 WHERE( zrnf (:,:) > 0._wp ) h_rnf(:,:) = zacoef * zrnf(:,:) ! compute depth for all runoffs384 WHERE( zrnfcl(:,:,1) > 0._wp ) h_rnf(:,:) = zacoef * zrnfcl(:,:,1) ! compute depth for all runoffs 387 385 ! 388 386 DO jj = 1, jpj ! take in account min depth of ocean rn_hmin 389 387 DO ji = 1, jpi 390 IF( zrnf (ji,jj) > 0._wp ) THEN388 IF( zrnfcl(ji,jj,1) > 0._wp ) THEN 391 389 jk = mbkt(ji,jj) 392 390 h_rnf(ji,jj) = MIN( h_rnf(ji,jj), gdept_0(ji,jj,jk ) ) … … 398 396 DO jj = 1, jpj 399 397 DO ji = 1, jpi 400 IF( zrnf (ji,jj) > 0._wp ) THEN398 IF( zrnfcl(ji,jj,1) > 0._wp ) THEN 401 399 jk = 2 402 400 DO WHILE ( jk /= mbkt(ji,jj) .AND. gdept_0(ji,jj,jk) < h_rnf(ji,jj) ) ; jk = jk + 1 … … 408 406 END DO 409 407 END DO 410 !411 DEALLOCATE( zrnf )412 408 ! 413 409 DO jj = 1, jpj ! set the associated depth
Note: See TracChangeset
for help on using the changeset viewer.