Changeset 2113
- Timestamp:
- 2010-09-22T21:20:46+02:00 (14 years ago)
- Location:
- branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DYN/sshwzv.F90
r2000 r2113 27 27 USE diaar5, ONLY : lk_diaar5 28 28 USE iom 29 USE sbcrnf, ONLY : rnf_dep, rnf_mod_dep ! River runoff 29 30 30 31 IMPLICIT NONE … … 134 135 hvr(:,:) = vmask(:,:,1) / ( hv(:,:) + 1.e0 - vmask(:,:,1) ) 135 136 ! 137 ! 138 DO jj = 1, jpj 139 DO ji = 1, jpi 140 rnf_dep(ji,jj) = 0. 141 DO jk = 1, rnf_mod_dep(ji,jj) ! recalculates rnf_dep to be the depth 142 rnf_dep(ji,jj) = rnf_dep(ji,jj) + fse3t(ji,jj,jk) ! in metres to the bottom of the relevant grid box 143 ENDDO 144 ENDDO 145 ENDDO 146 ! 136 147 ENDIF 137 148 -
branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/SBC/sbcrnf.F90
r2006 r2113 33 33 TYPE(FLD_N) , PUBLIC :: sn_cnf !: information about the runoff mouth file to be read 34 34 TYPE(FLD_N) :: sn_sal_rnf !: information about the salinities of runoff file to be read 35 TYPE(FLD_N) :: sn_t mp_rnf !: information about the temperatures of runoff file to be read35 TYPE(FLD_N) :: sn_tem_rnf !: information about the temperatures of runoff file to be read 36 36 TYPE(FLD_N) :: sn_dep_rnf !: information about the depth which river inflow affects 37 37 LOGICAL , PUBLIC :: ln_rnf_mouth = .false. !: specific treatment in mouths vicinity … … 48 48 49 49 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_sal_rnf !: structure of input river runoff salinity (file information, fields read) 50 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_t mp_rnf !: structure of input river runoff temperature (file information, fields read)50 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_tem_rnf !: structure of input river runoff temperature (file information, fields read) 51 51 52 52 REAL, PUBLIC, DIMENSION(jpi,jpj) :: rnf_dep !: depth of runoff in m 53 53 INTEGER, PUBLIC, DIMENSION(jpi,jpj) :: rnf_mod_dep !: depth of runoff in model levels 54 54 REAL, PUBLIC, DIMENSION(jpi,jpj) :: rnf_sal !: salinity of river runoff 55 REAL, PUBLIC, DIMENSION(jpi,jpj) :: rnf_t mp!: temperature of river runoff55 REAL, PUBLIC, DIMENSION(jpi,jpj) :: rnf_tem !: temperature of river runoff 56 56 57 57 INTEGER :: ji, jj ,jk ! dummy loop indices … … 98 98 IF ( ln_rnf_att ) THEN 99 99 CALL fld_read ( kt, nn_fsbc, sf_sal_rnf ) 100 CALL fld_read ( kt, nn_fsbc, sf_t mp_rnf )100 CALL fld_read ( kt, nn_fsbc, sf_tem_rnf ) 101 101 ENDIF 102 102 … … 117 117 IF ( ln_rnf_att ) THEN 118 118 rnf_sal(:,:) = ( sf_sal_rnf(1)%fnow(:,:,1) ) 119 rnf_t mp(:,:) = ( sf_tmp_rnf(1)%fnow(:,:,1) )119 rnf_tem(:,:) = ( sf_tem_rnf(1)%fnow(:,:,1) ) 120 120 ELSE 121 121 rnf_sal(:,:) = 0 122 rnf_t mp(:,:) = -999122 rnf_tem(:,:) = -999 123 123 ENDIF 124 124 CALL iom_put( "runoffs", rnf ) ! runoffs … … 143 143 CHARACTER(len=32) :: rn_dep_file ! runoff file name 144 144 !! 145 NAMELIST/namsbc_rnf/ cn_dir, ln_rnf_emp, sn_rnf, sn_cnf, sn_sal_rnf, sn_t mp_rnf, sn_dep_rnf, &145 NAMELIST/namsbc_rnf/ cn_dir, ln_rnf_emp, sn_rnf, sn_cnf, sn_sal_rnf, sn_tem_rnf, sn_dep_rnf, & 146 146 & ln_rnf_mouth, ln_rnf_att, rn_hrnf, rn_avt_rnf, rn_rfact 147 147 !!---------------------------------------------------------------------- … … 157 157 158 158 sn_sal_rnf = FLD_N( 'runoffs', 24. , 'rosaline' , .TRUE. , .true. , 'yearly' , '' , '' ) 159 sn_t mp_rnf = FLD_N( 'runoffs', 24. , 'rotemper' , .TRUE. , .true. , 'yearly' , '' , '' )159 sn_tem_rnf = FLD_N( 'runoffs', 24. , 'rotemper' , .TRUE. , .true. , 'yearly' , '' , '' ) 160 160 sn_dep_rnf = FLD_N( 'runoffs', 0. , 'rodepth' , .FALSE. , .true. , 'yearly' , '' , '' ) 161 161 ! … … 190 190 ELSE ! runoffs read in a file : set sf_rnf structure 191 191 ! 192 ! Allocate sf_rnf structure and (if required) sf_sal_rnf and sf_t mp_rnf structures192 ! Allocate sf_rnf structure and (if required) sf_sal_rnf and sf_tem_rnf structures 193 193 ALLOCATE( sf_rnf(1), STAT=ierror ) 194 194 IF( ierror > 0 ) THEN … … 206 206 ALLOCATE( sf_sal_rnf(1)%fdta(jpi,jpj,1,2) ) 207 207 208 ALLOCATE( sf_t mp_rnf(1), STAT=ierror )208 ALLOCATE( sf_tem_rnf(1), STAT=ierror ) 209 209 IF( ierror > 0 ) THEN 210 CALL ctl_stop( 'sbc_tmp_rnf: unable to allocate sf_t mp_rnf structure' ) ; RETURN210 CALL ctl_stop( 'sbc_tmp_rnf: unable to allocate sf_tem_rnf structure' ) ; RETURN 211 211 ENDIF 212 ALLOCATE( sf_t mp_rnf(1)%fnow(jpi,jpj,1) )213 ALLOCATE( sf_t mp_rnf(1)%fdta(jpi,jpj,1,2) )212 ALLOCATE( sf_tem_rnf(1)%fnow(jpi,jpj,1) ) 213 ALLOCATE( sf_tem_rnf(1)%fdta(jpi,jpj,1,2) ) 214 214 ENDIF 215 215 ! fill sf_rnf with sn_rnf and control print … … 218 218 IF ( ln_rnf_att ) THEN 219 219 CALL fld_fill (sf_sal_rnf, (/ sn_sal_rnf /), cn_dir, 'sbc_rnf_init', 'read runoff salinity data', 'namsbc_rnf' ) 220 CALL fld_fill (sf_t mp_rnf, (/ sn_tmp_rnf /), cn_dir, 'sbc_rnf_init', 'read runoff temperature data', 'namsbc_rnf' )220 CALL fld_fill (sf_tem_rnf, (/ sn_tem_rnf /), cn_dir, 'sbc_rnf_init', 'read runoff temperature data', 'namsbc_rnf' ) 221 221 222 222 rn_dep_file = TRIM( cn_dir )//TRIM( sn_dep_rnf%clname ) … … 225 225 CALL iom_close( inum ) ! close file 226 226 227 rnf_mod_dep(:,:) =0228 DO jj =1,jpj229 DO ji =1,jpi227 rnf_mod_dep(:,:) = 0. 228 DO jj = 1, jpj 229 DO ji = 1, jpi 230 230 IF ( rnf_dep(ji,jj) > 0.e0 ) THEN 231 jk =2232 DO WHILE ( jk /=jpkm1 .AND. fsdept(ji,jj,jk) < rnf_dep(ji,jj) ); jk=jk+1; ENDDO233 rnf_mod_dep(ji,jj) =jk234 ELSE IF ( rnf_dep(ji,jj) .eq. -1) THEN235 rnf_mod_dep(ji,jj) =1236 ELSE IF ( rnf_dep(ji,jj) .eq.-999 ) THEN237 rnf_mod_dep(ji,jj) =jpkm1238 ELSE IF ( rnf_dep(ji,jj) /= 0 ) THEN231 jk = 2 232 DO WHILE ( jk /= jpkm1 .AND. fsdept(ji,jj,jk) < rnf_dep(ji,jj) ) ; jk = jk + 1 ; ENDDO 233 rnf_mod_dep(ji,jj) = jk 234 ELSE IF ( rnf_dep(ji,jj) == -1. ) THEN 235 rnf_mod_dep(ji,jj) = 1. 236 ELSE IF ( rnf_dep(ji,jj) == -999 ) THEN 237 rnf_mod_dep(ji,jj) = jpkm1 238 ELSE IF ( rnf_dep(ji,jj) /= 0. ) THEN 239 239 CALL ctl_stop( 'runoff depth not positive, and not -999 or -1, rnf value in file fort.999' ) 240 240 WRITE(999,*) 'ji, jj, rnf(ji,jj) :', ji, jj, rnf(ji,jj) … … 243 243 ENDDO 244 244 ELSE 245 rnf_mod_dep(:,:) =1245 rnf_mod_dep(:,:) = 1. 246 246 ENDIF 247 247 ! 248 248 ENDIF 249 ! 250 DO jj = 1, jpj 251 DO ji = 1, jpi 252 rnf_dep(ji,jj) = 0. 253 DO jk = 1, rnf_mod_dep(ji,jj) ! recalculates rnf_dep to be the depth 254 rnf_dep(ji,jj) = rnf_dep(ji,jj) + fse3t(ji,jj,jk) ! in metres to the bottom of the relevant grid box 255 ENDDO 256 ENDDO 257 ENDDO 258 ! 249 259 250 260 ! ! ======================== -
branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/TRA/trasbc.F90
r2104 r2113 152 152 DO jj = 1, jpj 153 153 DO ji = 1, jpi 154 rnf_dep(ji,jj) = 0.e0155 DO jk = 1, rnf_mod_dep(ji,jj) ! recalculates rnf_dep to be the depth156 rnf_dep(ji,jj) = rnf_dep(ji,jj) + fse3t(ji,jj,jk) ! in metres to the bottom of the relevant grid box157 END DO158 154 zdep = 1. / rnf_dep(ji,jj) 159 155 zse3t= 1. / fse3t(ji,jj,1) 160 IF( rnf_t mp(ji,jj) == -999 ) rnf_tmp(ji,jj) = tsn(ji,jj,1,jp_tem) ! if not specified set runoff temp to be sst156 IF( rnf_tem(ji,jj) == -999 ) rnf_tem(ji,jj) = tsn(ji,jj,1,jp_tem) ! if not specified set runoff temp to be sst 161 157 162 158 IF( rnf(ji,jj) > 0.e0 ) THEN … … 181 177 182 178 ! direct flux 183 zta = rnf_t mp(ji,jj) * rnf(ji,jj) * zsrau * zdep179 zta = rnf_tem(ji,jj) * rnf(ji,jj) * zsrau * zdep 184 180 zsa = rnf_sal(ji,jj) * rnf(ji,jj) * zsrau * zdep 185 181 … … 190 186 ELSE 191 187 DO jk = 1, rnf_mod_dep(ji,jj) 192 zta = ( rnf_t mp(ji,jj) - tsn(ji,jj,jk,jp_tem) ) * rnf(ji,jj) * zsrau * zdep188 zta = ( rnf_tem(ji,jj) - tsn(ji,jj,jk,jp_tem) ) * rnf(ji,jj) * zsrau * zdep 193 189 zsa = ( rnf_sal(ji,jj) - tsn(ji,jj,jk,jp_sal) ) * rnf(ji,jj) * zsrau * zdep 194 190 tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) + zta ! add the trend to the general tracer trend
Note: See TracChangeset
for help on using the changeset viewer.