Changeset 3831
- Timestamp:
- 2013-03-06T17:21:23+01:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90
r3682 r3831 97 97 INTEGER, INTENT(in) :: kt ! ocean time step 98 98 !! 99 INTEGER :: ji, jj ! dummy loop indices 99 INTEGER :: ji, jj ! dummy loop indices 100 INTEGER :: z_err = 0 ! dummy integer for error handling 100 101 !!---------------------------------------------------------------------- 101 102 ! … … 143 144 ! ! else use S=0 for runoffs (done one for all in the init) 144 145 ! 145 IF( ln_rnf_tem .OR. ln_rnf_sal ) THEN ! runoffs as outflow: use ocean SST and SSS 146 WHERE( rnf(:,:) < 0._wp ) ! example baltic model when flow is out of domain 147 rnf_tsc(:,:,jp_tem) = sst_m(:,:) * rnf(:,:) * r1_rau0 148 rnf_tsc(:,:,jp_sal) = sss_m(:,:) * rnf(:,:) * r1_rau0 149 END WHERE 150 ENDIF 146 IF ( ANY( rnf(:,:) < 0._wp ) ) z_err=1 147 IF( lk_mpp) CALL mpp_sum(z_err) 148 IF ( z_err > 0 ) CALL ctl_stop( 'sbc_rnf : negative runnoff values exist' ) 151 149 ! 152 150 CALL iom_put( "runoffs", rnf ) ! output runoffs arrays … … 342 340 IF(lwp) WRITE(numout,*) ' runoffs depth read in a file' 343 341 rn_dep_file = TRIM( cn_dir )//TRIM( sn_dep_rnf%clname ) 342 IF( .NOT. sn_dep_rnf%ln_clim ) THEN ; WRITE(rn_dep_file, '(a,"_y",i4)' ) TRIM( rn_dep_file ), nyear ! add year 343 IF( sn_dep_rnf%cltype == 'monthly' ) WRITE(rn_dep_file, '(a,"m",i2)' ) TRIM( rn_dep_file ), nmonth ! add month 344 ENDIF 344 345 CALL iom_open ( rn_dep_file, inum ) ! open file 345 346 CALL iom_get ( inum, jpdom_data, sn_dep_rnf%clvar, h_rnf ) ! read the river mouth array … … 356 357 ELSEIF( h_rnf(ji,jj) == -999._wp ) THEN ; nk_rnf(ji,jj) = mbkt(ji,jj) 357 358 ELSE 358 CALL ctl_stop( ' runoff depth not positive, and not -999 or -1, rnf value in file fort.999' )359 WRITE(999,*) 'ji, jj, rnf(ji,jj) :', ji, jj,rnf(ji,jj)359 CALL ctl_stop( 'sbc_rnf_init: runoff depth not positive, and not -999 or -1, rnf value in file fort.999' ) 360 WRITE(999,*) 'ji, jj, h_rnf(ji,jj) :', ji, jj, h_rnf(ji,jj) 360 361 ENDIF 361 362 END DO
Note: See TracChangeset
for help on using the changeset viewer.