- Timestamp:
- 2020-11-27T17:26:33+01:00 (4 years ago)
- Location:
- NEMO/branches/2020/tickets_icb_1900
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/tickets_icb_1900
- Property svn:externals
-
NEMO/branches/2020/tickets_icb_1900/src/OCE/SBC/sbcrnf.F90
r13237 r13899 160 160 & iom_varid( numror, 'rnf_b', ldstop = .FALSE. ) > 0 ) THEN 161 161 IF(lwp) WRITE(numout,*) ' nit000-1 runoff forcing fields red in the restart file', lrxios 162 CALL iom_get( numror, jpdom_auto glo, 'rnf_b', rnf_b, ldxios = lrxios ) ! before runoff163 CALL iom_get( numror, jpdom_auto glo, 'rnf_hc_b', rnf_tsc_b(:,:,jp_tem), ldxios = lrxios ) ! before heat content of runoff164 CALL iom_get( numror, jpdom_auto glo, 'rnf_sc_b', rnf_tsc_b(:,:,jp_sal), ldxios = lrxios ) ! before salinity content of runoff162 CALL iom_get( numror, jpdom_auto, 'rnf_b', rnf_b, ldxios = lrxios ) ! before runoff 163 CALL iom_get( numror, jpdom_auto, 'rnf_hc_b', rnf_tsc_b(:,:,jp_tem), ldxios = lrxios ) ! before heat content of runoff 164 CALL iom_get( numror, jpdom_auto, 'rnf_sc_b', rnf_tsc_b(:,:,jp_sal), ldxios = lrxios ) ! before salinity content of runoff 165 165 ELSE !* no restart: set from nit000 values 166 166 IF(lwp) WRITE(numout,*) ' nit000-1 runoff forcing fields set to nit000' … … 209 209 IF( ln_rnf_depth .OR. ln_rnf_depth_ini ) THEN !== runoff distributed over several levels ==! 210 210 IF( ln_linssh ) THEN !* constant volume case : just apply the runoff input flow 211 DO_2D _11_11211 DO_2D( 1, 1, 1, 1 ) 212 212 DO jk = 1, nk_rnf(ji,jj) 213 213 phdivn(ji,jj,jk) = phdivn(ji,jj,jk) - ( rnf(ji,jj) + rnf_b(ji,jj) ) * zfact * r1_rho0 / h_rnf(ji,jj) … … 215 215 END_2D 216 216 ELSE !* variable volume case 217 DO_2D _11_11217 DO_2D( 1, 1, 1, 1 ) ! update the depth over which runoffs are distributed 218 218 h_rnf(ji,jj) = 0._wp 219 DO jk = 1, nk_rnf(ji,jj) ! recalculates h_rnf to be the depth in metres219 DO jk = 1, nk_rnf(ji,jj) ! recalculates h_rnf to be the depth in metres 220 220 h_rnf(ji,jj) = h_rnf(ji,jj) + e3t(ji,jj,jk,Kmm) ! to the bottom of the relevant grid box 221 221 END DO … … 354 354 rn_dep_file = TRIM( cn_dir )//TRIM( sn_dep_rnf%clname ) 355 355 IF( .NOT. sn_dep_rnf%ln_clim ) THEN ; WRITE(rn_dep_file, '(a,"_y",i4)' ) TRIM( rn_dep_file ), nyear ! add year 356 IF( sn_dep_rnf%cl type== 'monthly' ) WRITE(rn_dep_file, '(a,"m",i2)' ) TRIM( rn_dep_file ), nmonth ! add month357 ENDIF 358 CALL iom_open ( rn_dep_file, inum ) ! open file359 CALL iom_get ( inum, jpdom_ data, sn_dep_rnf%clvar, h_rnf ) ! read the river mouth array360 CALL iom_close( inum ) ! close file356 IF( sn_dep_rnf%clftyp == 'monthly' ) WRITE(rn_dep_file, '(a,"m",i2)' ) TRIM( rn_dep_file ), nmonth ! add month 357 ENDIF 358 CALL iom_open ( rn_dep_file, inum ) ! open file 359 CALL iom_get ( inum, jpdom_global, sn_dep_rnf%clvar, h_rnf ) ! read the river mouth array 360 CALL iom_close( inum ) ! close file 361 361 ! 362 362 nk_rnf(:,:) = 0 ! set the number of level over which river runoffs are applied 363 DO_2D _11_11363 DO_2D( 1, 1, 1, 1 ) 364 364 IF( h_rnf(ji,jj) > 0._wp ) THEN 365 365 jk = 2 … … 374 374 ENDIF 375 375 END_2D 376 DO_2D _11_11376 DO_2D( 1, 1, 1, 1 ) ! set the associated depth 377 377 h_rnf(ji,jj) = 0._wp 378 378 DO jk = 1, nk_rnf(ji,jj) … … 391 391 CALL iom_open( TRIM( sn_rnf%clname ), inum ) ! open runoff file 392 392 nbrec = iom_getszuld( inum ) 393 zrnfcl(:,:,1) = 0._wp ! init the max to 0. in 1393 zrnfcl(:,:,1) = 0._wp ! init the max to 0. in 1 394 394 DO jm = 1, nbrec 395 CALL iom_get( inum, jpdom_ data, TRIM( sn_rnf%clvar ), zrnfcl(:,:,2), jm ) ! read the value in 2396 zrnfcl(:,:,1) = MAXVAL( zrnfcl(:,:,:), DIM=3 ) ! store the maximum value in time in 1395 CALL iom_get( inum, jpdom_global, TRIM( sn_rnf%clvar ), zrnfcl(:,:,2), jm ) ! read the value in 2 396 zrnfcl(:,:,1) = MAXVAL( zrnfcl(:,:,:), DIM=3 ) ! store the maximum value in time in 1 397 397 END DO 398 398 CALL iom_close( inum ) … … 404 404 WHERE( zrnfcl(:,:,1) > 0._wp ) h_rnf(:,:) = zacoef * zrnfcl(:,:,1) ! compute depth for all runoffs 405 405 ! 406 DO_2D _11_11406 DO_2D( 1, 1, 1, 1 ) ! take in account min depth of ocean rn_hmin 407 407 IF( zrnfcl(ji,jj,1) > 0._wp ) THEN 408 408 jk = mbkt(ji,jj) … … 412 412 ! 413 413 nk_rnf(:,:) = 0 ! number of levels on which runoffs are distributed 414 DO_2D _11_11414 DO_2D( 1, 1, 1, 1 ) 415 415 IF( zrnfcl(ji,jj,1) > 0._wp ) THEN 416 416 jk = 2 … … 423 423 END_2D 424 424 ! 425 DO_2D _11_11425 DO_2D( 1, 1, 1, 1 ) ! set the associated depth 426 426 h_rnf(ji,jj) = 0._wp 427 427 DO jk = 1, nk_rnf(ji,jj) … … 519 519 cl_rnfile = TRIM( cn_dir )//TRIM( sn_cnf%clname ) 520 520 IF( .NOT. sn_cnf%ln_clim ) THEN ; WRITE(cl_rnfile, '(a,"_y",i4)' ) TRIM( cl_rnfile ), nyear ! add year 521 IF( sn_cnf%cl type== 'monthly' ) WRITE(cl_rnfile, '(a,"m",i2)' ) TRIM( cl_rnfile ), nmonth ! add month521 IF( sn_cnf%clftyp == 'monthly' ) WRITE(cl_rnfile, '(a,"m",i2)' ) TRIM( cl_rnfile ), nmonth ! add month 522 522 ENDIF 523 523 ! 524 524 ! horizontal mask (read in NetCDF file) 525 CALL iom_open ( cl_rnfile, inum ) ! open file526 CALL iom_get ( inum, jpdom_ data, sn_cnf%clvar, rnfmsk ) ! read the river mouth array527 CALL iom_close( inum ) ! close file525 CALL iom_open ( cl_rnfile, inum ) ! open file 526 CALL iom_get ( inum, jpdom_global, sn_cnf%clvar, rnfmsk ) ! read the river mouth array 527 CALL iom_close( inum ) ! close file 528 528 ! 529 529 IF( l_clo_rnf ) CALL clo_rnf( rnfmsk ) ! closed sea inflow set as river mouth
Note: See TracChangeset
for help on using the changeset viewer.