Changeset 5327
- Timestamp:
- 2015-06-01T12:31:30+02:00 (9 years ago)
- Location:
- branches/2015/dev_r5204_CNRS_PISCES_dcy/NEMOGCM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_r5204_CNRS_PISCES_dcy/NEMOGCM/CONFIG/SHARED/namelist_ref
r5190 r5327 420 420 ln_rnf_tem = .false. ! read in temperature information for runoff 421 421 ln_rnf_sal = .false. ! read in salinity information for runoff 422 ln_rnf_depth_ini = .false. ! compute depth at initialisation from runoff file 423 rn_rnf_max = 5.735e-4 ! max value of the runoff climatologie over global domain ( ln_rnf_depth_ini = .true ) 424 rn_dep_max = 150. ! depth over which runoffs is spread ( ln_rnf_depth_ini = .true ) 425 nn_rnf_depth_file = 0 ! create (=1) a runoff depth file or not (=0) 422 426 / 423 427 !----------------------------------------------------------------------- -
branches/2015/dev_r5204_CNRS_PISCES_dcy/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90
r5226 r5327 37 37 ! !!* namsbc_rnf namelist * 38 38 CHARACTER(len=100), PUBLIC :: cn_dir !: Root directory for location of ssr files 39 LOGICAL , PUBLIC :: ln_rnf_depth !: depth river runoffs attribute specified in a file 39 LOGICAL , PUBLIC :: ln_rnf_depth !: depth river runoffs attribute specified in a file 40 LOGICAL :: ln_rnf_depth_ini !: depth river runoffs computed at the initialisation 41 REAL(wp) :: rn_rnf_max !: maximum value of the runoff climatologie ( ln_rnf_depth_ini = .true ) 42 REAL(wp) :: rn_dep_max !: depth over which runoffs is spread ( ln_rnf_depth_ini = .true ) 43 INTEGER :: nn_rnf_depth_file !: create (=1) a runoff depth file or not (=0) 40 44 LOGICAL , PUBLIC :: ln_rnf_tem !: temperature river runoffs attribute specified in a file 41 45 LOGICAL , PUBLIC :: ln_rnf_sal !: salinity river runoffs attribute specified in a file … … 104 108 ! 105 109 CALL wrk_alloc( jpi,jpj, ztfrz) 110 111 ! 112 IF( kt == nit000 ) CALL sbc_rnf_init ! Read namelist and allocate structures 106 113 107 114 ! ! ---------------------------------------- ! … … 252 259 !!---------------------------------------------------------------------- 253 260 CHARACTER(len=32) :: rn_dep_file ! runoff file name 254 INTEGER :: ji, jj, jk ! dummy loop indices261 INTEGER :: ji, jj, jk, jm ! dummy loop indices 255 262 INTEGER :: ierror, inum ! temporary integer 256 263 INTEGER :: ios ! Local integer output status for namelist read 264 INTEGER :: nbrec ! temporary integer 265 REAL(wp) :: zacoef 266 REAL(wp), DIMENSION(12) :: zrec ! times records 267 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: zrnfcl 268 REAL(wp), DIMENSION(:,: ), ALLOCATABLE :: zrnf 257 269 ! 258 270 NAMELIST/namsbc_rnf/ cn_dir, ln_rnf_emp, ln_rnf_depth, ln_rnf_tem, ln_rnf_sal, & 259 271 & sn_rnf, sn_cnf , sn_s_rnf , sn_t_rnf , sn_dep_rnf, & 260 & ln_rnf_mouth , rn_hrnf , rn_avt_rnf, rn_rfact 272 & ln_rnf_mouth , rn_hrnf , rn_avt_rnf, rn_rfact, & 273 & ln_rnf_depth_ini , rn_dep_max , rn_rnf_max, nn_rnf_depth_file 261 274 !!---------------------------------------------------------------------- 262 275 ! … … 296 309 IF(lwp) WRITE(numout,*) 297 310 IF(lwp) WRITE(numout,*) ' runoffs directly provided in the precipitations' 298 IF( ln_rnf_depth .OR. ln_rnf_tem .OR. ln_rnf_sal ) THEN311 IF( ln_rnf_depth .OR. ln_rnf_tem .OR. ln_rnf_sal .OR. ln_rnf_depth_ini ) THEN 299 312 CALL ctl_warn( 'runoffs already included in precipitations, so runoff (T,S, depth) attributes will not be used' ) 300 ln_rnf_depth = .FALSE. ; ln_rnf_tem = .FALSE. ; ln_rnf_sal = .FALSE. 313 ln_rnf_depth = .FALSE. ; ln_rnf_tem = .FALSE. ; ln_rnf_sal = .FALSE. ; ln_rnf_depth_ini = .FALSE. 301 314 ENDIF 302 315 ! … … 372 385 END DO 373 386 END DO 387 ! 388 ELSE IF( ln_rnf_depth_ini ) THEN ! runoffs applied at the surface 389 ! 390 IF(lwp) WRITE(numout,*) 391 IF(lwp) WRITE(numout,*) ' depth of runoff computed once from max value of runoff' 392 IF(lwp) WRITE(numout,*) ' max value of the runoff climatologie (over global domain) rn_rnf_max = ', rn_rnf_max 393 IF(lwp) WRITE(numout,*) ' depth over which runoffs is spread rn_dep_max = ', rn_dep_max 394 IF(lwp) WRITE(numout,*) ' create (=1) a runoff depth file or not (=0) nn_rnf_depth_file = ', nn_rnf_depth_file 395 396 CALL iom_open( TRIM( sn_rnf%clname ), inum ) ! open runoff file 397 CALL iom_gettime( inum, zrec, kntime=nbrec) 398 ALLOCATE( zrnfcl(jpi,jpj,nbrec) ) ; ALLOCATE( zrnf(jpi,jpj) ) 399 DO jm = 1, nbrec 400 CALL iom_get( inum, jpdom_data, TRIM( sn_rnf%clvar ), zrnfcl(:,:,jm), jm ) 401 END DO 402 CALL iom_close( inum ) 403 zrnf(:,:) = MAXVAL( zrnfcl(:,:,:), DIM=3 ) ! maximum value in time 404 DEALLOCATE( zrnfcl ) 405 ! 406 h_rnf(:,:) = 1. 407 ! 408 zacoef = rn_dep_max / rn_rnf_max ! coef of linear relation between runoff and its depth (150m for max of runoff) 409 ! 410 WHERE( zrnf(:,:) > 0._wp ) h_rnf(:,:) = zacoef * zrnf(:,:) ! compute depth for all runoffs 411 ! 412 DO jj = 1, jpj ! take in account min depth of ocean rn_hmin 413 DO ji = 1, jpi 414 IF( zrnf(ji,jj) > 0._wp ) THEN 415 jk = mbkt(ji,jj) 416 h_rnf(ji,jj) = MIN( h_rnf(ji,jj), gdept_0(ji,jj,jk ) ) 417 ENDIF 418 END DO 419 END DO 420 ! 421 nk_rnf(:,:) = 0 ! number of levels on which runoffs are distributed 422 DO jj = 1, jpj 423 DO ji = 1, jpi 424 IF( zrnf(ji,jj) > 0._wp ) THEN 425 jk = 2 426 DO WHILE ( jk /= mbkt(ji,jj) .AND. gdept_0(ji,jj,jk) < h_rnf(ji,jj) ) ; jk = jk + 1 ; END DO 427 nk_rnf(ji,jj) = jk 428 ELSE 429 nk_rnf(ji,jj) = 1 430 ENDIF 431 END DO 432 END DO 433 ! 434 DEALLOCATE( zrnf ) 435 ! 436 DO jj = 1, jpj ! set the associated depth 437 DO ji = 1, jpi 438 h_rnf(ji,jj) = 0._wp 439 DO jk = 1, nk_rnf(ji,jj) 440 h_rnf(ji,jj) = h_rnf(ji,jj) + fse3t(ji,jj,jk) 441 END DO 442 END DO 443 END DO 444 ! 445 IF( nn_rnf_depth_file == 1 ) THEN ! save output nb levels for runoff 446 IF(lwp) WRITE(numout,*) ' create runoff depht file' 447 CALL iom_open ( TRIM( sn_dep_rnf%clname ), inum, ldwrt = .TRUE., kiolib = jprstlib ) 448 CALL iom_rstput( 0, 0, inum, 'rodepth', h_rnf ) 449 CALL iom_close ( inum ) 450 ENDIF 374 451 ELSE ! runoffs applied at the surface 375 452 nk_rnf(:,:) = 1
Note: See TracChangeset
for help on using the changeset viewer.