Changeset 6140 for trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90
- Timestamp:
- 2015-12-21T12:35:23+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90
r5836 r6140 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 ! routinecalled in sbcmod module34 PUBLIC sbc_rnf_div ! routinecalled in divhor module35 PUBLIC sbc_rnf_alloc ! routinecalled in sbcmod module36 PUBLIC sbc_rnf_init ! routinecalled in sbcmod module34 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 37 38 38 ! 39 CHARACTER(len=100) :: cn_dir !: Root directory for location of rnf files39 ! !!* namsbc_rnf namelist * 40 CHARACTER(len=100) :: cn_dir !: Root directory for location of rnf files 40 41 LOGICAL :: ln_rnf_depth !: depth river runoffs attribute specified in a file 41 LOGICAL :: ln_rnf_depth_ini !: depth river runoffs computed at the initialisation42 REAL(wp) :: rn_rnf_max !: maximum value of the runoff climatologie ( ln_rnf_depth_ini = .true)43 REAL(wp) :: rn_dep_max !: depth over which runoffs is spread ( ln_rnf_depth_ini = .true)44 INTEGER :: nn_rnf_depth_file !: create (=1) a runoff depth file or not (=0)45 LOGICAL :: ln_rnf_tem !: temperature river runoffs attribute specified in a file46 LOGICAL , PUBLIC :: ln_rnf_sal !: salinity river runoffs attribute specified in a file47 TYPE(FLD_N) , PUBLIC :: sn_rnf !: information about the runoff file to be read48 TYPE(FLD_N) :: sn_cnf !: information about the runoff mouth file to be read49 TYPE(FLD_N) :: sn_s_rnf !: information about the salinities of runoff file to be read50 TYPE(FLD_N) :: sn_t_rnf !: information about the temperatures of runoff file to be read51 TYPE(FLD_N) :: sn_dep_rnf !: information about the depth which river inflow affects52 LOGICAL , PUBLIC :: ln_rnf_mouth !: specific treatment in mouths vicinity53 REAL(wp) :: rn_hrnf !: runoffs, depth over which enhanced vertical mixing is used54 REAL(wp) , PUBLIC :: rn_avt_rnf !: runoffs, value of the additional vertical mixing coef. [m2/s]55 REAL(wp) :: rn_rfact!: multiplicative factor for runoff56 57 LOGICAL , PUBLIC :: l_rnfcpl = .false. !runoffs recieved from oasis58 59 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 60 61 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: rnfmsk !: river mouth mask (hori.) 61 62 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: rnfmsk_z !: river mouth mask (vert.) … … 68 69 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_t_rnf ! structure: river runoff temperature (file information, fields read) 69 70 70 !! * Substitutions71 # include "domzgr_substitute.h90"72 71 !!---------------------------------------------------------------------- 73 72 !! NEMO/OPA 3.3 , NEMO Consortium (2010) … … 127 126 IF( ln_rnf_sal ) CALL fld_read ( kt, nn_fsbc, sf_s_rnf ) ! idem for runoffs salinity if required 128 127 ! 129 ! Runoff reduction only associated to the ORCA2_LIM configuration130 ! when reading the NetCDF file runoff_1m_nomask.nc131 IF( cp_cfg == 'orca' .AND. jp_cfg == 2 .AND. .NOT. l_rnfcpl ) THEN132 WHERE( 40._wp < gphit(:,:) .AND. gphit(:,:) < 65._wp )133 sf_rnf(1)%fnow(:,:,1) = 0.85 * sf_rnf(1)%fnow(:,:,1)134 END WHERE135 ENDIF136 !137 128 IF( MOD( kt - 1, nn_fsbc ) == 0 ) THEN 138 129 ! … … 142 133 IF( ln_rnf_tem ) THEN ! use runoffs temperature data 143 134 rnf_tsc(:,:,jp_tem) = ( sf_t_rnf(1)%fnow(:,:,1) ) * rnf(:,:) * r1_rau0 135 CALL eos_fzp( sss_m(:,:), ztfrz(:,:) ) 144 136 WHERE( sf_t_rnf(1)%fnow(:,:,1) == -999._wp ) ! if missing data value use SST as runoffs temperature 145 137 rnf_tsc(:,:,jp_tem) = sst_m(:,:) * rnf(:,:) * r1_rau0 146 138 END WHERE 147 139 WHERE( sf_t_rnf(1)%fnow(:,:,1) == -222._wp ) ! where fwf comes from melting of ice shelves or iceberg 148 ztfrz(:,:) = -1.9 !tfreez( sss_m(:,:) ) !PM to be discuss (trouble if sensitivity study) 149 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 150 141 END WHERE 151 142 ELSE ! use SST as runoffs temperature … … 211 202 ! 212 203 IF( ln_rnf_depth .OR. ln_rnf_depth_ini ) THEN !== runoff distributed over several levels ==! 213 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 214 213 DO jj = 1, jpj ! update the depth over which runoffs are distributed 215 214 DO ji = 1, jpi 216 215 h_rnf(ji,jj) = 0._wp 217 216 DO jk = 1, nk_rnf(ji,jj) ! recalculates h_rnf to be the depth in metres 218 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 219 218 END DO 220 219 ! ! apply the runoff input flow … … 224 223 END DO 225 224 END DO 226 ELSE ! constant volume case : just apply the runoff input flow227 DO jj = 1, jpj228 DO ji = 1, jpi229 DO jk = 1, nk_rnf(ji,jj)230 phdivn(ji,jj,jk) = phdivn(ji,jj,jk) - ( rnf(ji,jj) + rnf_b(ji,jj) ) * zfact * r1_rau0 / h_rnf(ji,jj)231 END DO232 END DO233 END DO234 225 ENDIF 235 226 ELSE !== runoff put only at the surface ==! 236 IF( lk_vvl ) THEN ! variable volume case 237 h_rnf(:,:) = fse3t(:,:,1) ! recalculate h_rnf to be depth of top box 238 ENDIF 239 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) 240 229 ENDIF 241 230 ! … … 377 366 h_rnf(ji,jj) = 0._wp 378 367 DO jk = 1, nk_rnf(ji,jj) 379 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) 380 369 END DO 381 370 END DO … … 435 424 h_rnf(ji,jj) = 0._wp 436 425 DO jk = 1, nk_rnf(ji,jj) 437 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) 438 427 END DO 439 428 END DO … … 448 437 ELSE ! runoffs applied at the surface 449 438 nk_rnf(:,:) = 1 450 h_rnf (:,:) = fse3t(:,:,1)439 h_rnf (:,:) = e3t_n(:,:,1) 451 440 ENDIF 452 441 !
Note: See TracChangeset
for help on using the changeset viewer.