- Timestamp:
- 2016-07-19T10:38:35+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/NERC/dev_r5549_BDY_ZEROGRAD/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90
r5503 r6808 12 12 13 13 !!---------------------------------------------------------------------- 14 !! sbc_rnf : monthly runoffs read in a NetCDF file15 !! sbc_rnf_init : runoffs initialisation16 !! rnf_mouth : set river mouth mask14 !! sbc_rnf : monthly runoffs read in a NetCDF file 15 !! sbc_rnf_init : runoffs initialisation 16 !! rnf_mouth : set river mouth mask 17 17 !!---------------------------------------------------------------------- 18 USE dom_oce ! ocean space and time domain 19 USE phycst ! physical constants 20 USE sbc_oce ! surface boundary condition variables 21 USE sbcisf ! PM we could remove it I think 22 USE closea ! closed seas 23 USE fldread ! read input field at current time step 24 USE in_out_manager ! I/O manager 25 USE iom ! I/O module 26 USE lib_mpp ! MPP library 27 USE eosbn2 28 USE wrk_nemo ! Memory allocation 18 USE dom_oce ! ocean space and time domain 19 USE phycst ! physical constants 20 USE sbc_oce ! surface boundary condition variables 21 USE sbcisf ! PM we could remove it I think 22 USE closea ! closed seas 23 USE eosbn2 ! Equation Of State 24 ! 25 USE in_out_manager ! I/O manager 26 USE fldread ! read input field at current time step 27 USE iom ! I/O module 28 USE lib_mpp ! MPP library 29 USE wrk_nemo ! Memory allocation 29 30 30 31 IMPLICIT NONE 31 32 PRIVATE 32 33 33 PUBLIC sbc_rnf ! routine call in sbcmod module 34 PUBLIC sbc_rnf_div ! routine called in divcurl module 35 PUBLIC sbc_rnf_alloc ! routine call in sbcmod module 36 PUBLIC sbc_rnf_init ! (PUBLIC for TAM) 37 ! !!* namsbc_rnf namelist * 38 CHARACTER(len=100) :: cn_dir !: Root directory for location of rnf files 34 PUBLIC sbc_rnf ! called in sbcmod module 35 PUBLIC sbc_rnf_div ! called in divhor module 36 PUBLIC sbc_rnf_alloc ! called in sbcmod module 37 PUBLIC sbc_rnf_init ! called in sbcmod module 38 39 ! !!* namsbc_rnf namelist * 40 CHARACTER(len=100) :: cn_dir !: Root directory for location of rnf files 39 41 LOGICAL :: ln_rnf_depth !: depth river runoffs attribute specified in a file 40 LOGICAL :: ln_rnf_depth_ini !: depth river runoffs computed at the initialisation41 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)44 LOGICAL :: ln_rnf_tem !: temperature river runoffs attribute specified in a file45 LOGICAL , PUBLIC :: ln_rnf_sal !: salinity river runoffs attribute specified in a file46 TYPE(FLD_N) , PUBLIC :: sn_rnf !: information about the runoff file to be read47 TYPE(FLD_N) :: sn_cnf !: information about the runoff mouth file to be read48 TYPE(FLD_N) :: sn_s_rnf !: information about the salinities of runoff file to be read49 TYPE(FLD_N) :: sn_t_rnf !: information about the temperatures of runoff file to be read50 TYPE(FLD_N) :: sn_dep_rnf !: information about the depth which river inflow affects51 LOGICAL , PUBLIC :: ln_rnf_mouth !: specific treatment in mouths vicinity52 REAL(wp) :: rn_hrnf !: runoffs, depth over which enhanced vertical mixing is used53 REAL(wp) , PUBLIC :: rn_avt_rnf !: runoffs, value of the additional vertical mixing coef. [m2/s]54 REAL(wp) :: rn_rfact!: multiplicative factor for runoff55 56 LOGICAL , PUBLIC :: l_rnfcpl = .false. !runoffs recieved from oasis57 58 INTEGER , PUBLIC :: nkrnf = 0 !: nb of levels over which Kz is increased at river mouths42 LOGICAL :: ln_rnf_depth_ini !: depth river runoffs computed at the initialisation 43 REAL(wp) :: rn_rnf_max !: maximum value of the runoff climatologie (ln_rnf_depth_ini =T) 44 REAL(wp) :: rn_dep_max !: depth over which runoffs is spread (ln_rnf_depth_ini =T) 45 INTEGER :: nn_rnf_depth_file !: create (=1) a runoff depth file or not (=0) 46 LOGICAL :: ln_rnf_tem !: temperature river runoffs attribute specified in a file 47 LOGICAL , PUBLIC :: ln_rnf_sal !: salinity river runoffs attribute specified in a file 48 TYPE(FLD_N) , PUBLIC :: sn_rnf !: information about the runoff file to be read 49 TYPE(FLD_N) :: sn_cnf !: information about the runoff mouth file to be read 50 TYPE(FLD_N) :: sn_s_rnf !: information about the salinities of runoff file to be read 51 TYPE(FLD_N) :: sn_t_rnf !: information about the temperatures of runoff file to be read 52 TYPE(FLD_N) :: sn_dep_rnf !: information about the depth which river inflow affects 53 LOGICAL , PUBLIC :: ln_rnf_mouth !: specific treatment in mouths vicinity 54 REAL(wp) :: rn_hrnf !: runoffs, depth over which enhanced vertical mixing is used 55 REAL(wp) , PUBLIC :: rn_avt_rnf !: runoffs, value of the additional vertical mixing coef. [m2/s] 56 REAL(wp) , PUBLIC :: rn_rfact !: multiplicative factor for runoff 57 58 LOGICAL , PUBLIC :: l_rnfcpl = .false. !: runoffs recieved from oasis 59 INTEGER , PUBLIC :: nkrnf = 0 !: nb of levels over which Kz is increased at river mouths 60 59 61 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: rnfmsk !: river mouth mask (hori.) 60 62 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: rnfmsk_z !: river mouth mask (vert.) … … 67 69 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_t_rnf ! structure: river runoff temperature (file information, fields read) 68 70 69 !! * Substitutions70 # include "domzgr_substitute.h90"71 71 !!---------------------------------------------------------------------- 72 72 !! NEMO/OPA 3.3 , NEMO Consortium (2010) … … 126 126 IF( ln_rnf_sal ) CALL fld_read ( kt, nn_fsbc, sf_s_rnf ) ! idem for runoffs salinity if required 127 127 ! 128 ! Runoff reduction only associated to the ORCA2_LIM configuration129 ! when reading the NetCDF file runoff_1m_nomask.nc130 IF( cp_cfg == 'orca' .AND. jp_cfg == 2 .AND. .NOT. l_rnfcpl ) THEN131 WHERE( 40._wp < gphit(:,:) .AND. gphit(:,:) < 65._wp )132 sf_rnf(1)%fnow(:,:,1) = 0.85 * sf_rnf(1)%fnow(:,:,1)133 END WHERE134 ENDIF135 !136 128 IF( MOD( kt - 1, nn_fsbc ) == 0 ) THEN 137 129 ! … … 141 133 IF( ln_rnf_tem ) THEN ! use runoffs temperature data 142 134 rnf_tsc(:,:,jp_tem) = ( sf_t_rnf(1)%fnow(:,:,1) ) * rnf(:,:) * r1_rau0 135 CALL eos_fzp( sss_m(:,:), ztfrz(:,:) ) 143 136 WHERE( sf_t_rnf(1)%fnow(:,:,1) == -999._wp ) ! if missing data value use SST as runoffs temperature 144 137 rnf_tsc(:,:,jp_tem) = sst_m(:,:) * rnf(:,:) * r1_rau0 145 138 END WHERE 146 139 WHERE( sf_t_rnf(1)%fnow(:,:,1) == -222._wp ) ! where fwf comes from melting of ice shelves or iceberg 147 ztfrz(:,:) = -1.9 !tfreez( sss_m(:,:) ) !PM to be discuss (trouble if sensitivity study) 148 rnf_tsc(:,:,jp_tem) = ztfrz(:,:) * rnf(:,:) * r1_rau0 - rnf(:,:) * lfusisf * r1_rau0_rcp 140 rnf_tsc(:,:,jp_tem) = ztfrz(:,:) * rnf(:,:) * r1_rau0 - rnf(:,:) * rlfusisf * r1_rau0_rcp 149 141 END WHERE 150 142 ELSE ! use SST as runoffs temperature … … 210 202 ! 211 203 IF( ln_rnf_depth .OR. ln_rnf_depth_ini ) THEN !== runoff distributed over several levels ==! 212 IF( lk_vvl ) THEN ! variable volume case 204 IF( ln_linssh ) THEN !* constant volume case : just apply the runoff input flow 205 DO jj = 1, jpj 206 DO ji = 1, jpi 207 DO jk = 1, nk_rnf(ji,jj) 208 phdivn(ji,jj,jk) = phdivn(ji,jj,jk) - ( rnf(ji,jj) + rnf_b(ji,jj) ) * zfact * r1_rau0 / h_rnf(ji,jj) 209 END DO 210 END DO 211 END DO 212 ELSE !* variable volume case 213 213 DO jj = 1, jpj ! update the depth over which runoffs are distributed 214 214 DO ji = 1, jpi 215 215 h_rnf(ji,jj) = 0._wp 216 216 DO jk = 1, nk_rnf(ji,jj) ! recalculates h_rnf to be the depth in metres 217 h_rnf(ji,jj) = h_rnf(ji,jj) + fse3t(ji,jj,jk) ! to the bottom of the relevant grid box217 h_rnf(ji,jj) = h_rnf(ji,jj) + e3t_n(ji,jj,jk) ! to the bottom of the relevant grid box 218 218 END DO 219 219 ! ! apply the runoff input flow … … 223 223 END DO 224 224 END DO 225 ELSE ! constant volume case : just apply the runoff input flow226 DO jj = 1, jpj227 DO ji = 1, jpi228 DO jk = 1, nk_rnf(ji,jj)229 phdivn(ji,jj,jk) = phdivn(ji,jj,jk) - ( rnf(ji,jj) + rnf_b(ji,jj) ) * zfact * r1_rau0 / h_rnf(ji,jj)230 END DO231 END DO232 END DO233 225 ENDIF 234 226 ELSE !== runoff put only at the surface ==! 235 IF( lk_vvl ) THEN ! variable volume case 236 h_rnf(:,:) = fse3t(:,:,1) ! recalculate h_rnf to be depth of top box 237 ENDIF 238 phdivn(:,:,1) = phdivn(:,:,1) - ( rnf(:,:) + rnf_b(:,:) ) * zfact * r1_rau0 / fse3t(:,:,1) 227 h_rnf (:,:) = e3t_n (:,:,1) ! update h_rnf to be depth of top box 228 phdivn(:,:,1) = phdivn(:,:,1) - ( rnf(:,:) + rnf_b(:,:) ) * zfact * r1_rau0 / e3t_n(:,:,1) 239 229 ENDIF 240 230 ! … … 376 366 h_rnf(ji,jj) = 0._wp 377 367 DO jk = 1, nk_rnf(ji,jj) 378 h_rnf(ji,jj) = h_rnf(ji,jj) + fse3t(ji,jj,jk)368 h_rnf(ji,jj) = h_rnf(ji,jj) + e3t_n(ji,jj,jk) 379 369 END DO 380 370 END DO … … 434 424 h_rnf(ji,jj) = 0._wp 435 425 DO jk = 1, nk_rnf(ji,jj) 436 h_rnf(ji,jj) = h_rnf(ji,jj) + fse3t(ji,jj,jk)426 h_rnf(ji,jj) = h_rnf(ji,jj) + e3t_n(ji,jj,jk) 437 427 END DO 438 428 END DO … … 447 437 ELSE ! runoffs applied at the surface 448 438 nk_rnf(:,:) = 1 449 h_rnf (:,:) = fse3t(:,:,1)439 h_rnf (:,:) = e3t_n(:,:,1) 450 440 ENDIF 451 441 !
Note: See TracChangeset
for help on using the changeset viewer.