Changeset 14939 for NEMO/branches
- Timestamp:
- 2021-06-02T12:13:48+02:00 (3 years ago)
- Location:
- NEMO/branches/UKMO/NEMO_4.0.4_icesheet_and_river_coupling
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/UKMO/NEMO_4.0.4_icesheet_and_river_coupling/cfgs/SHARED/namelist_ref
r14299 r14939 435 435 rn_dep_max = 150. ! depth over which runoffs is spread ( ln_rnf_depth_ini = .true ) 436 436 nn_rnf_depth_file = 0 ! create (=1) a runoff depth file or not (=0) 437 ln_rnf_icb = .false. ! read in iceberg flux from a file (fill sn_i_rnf if .true.) 437 ln_rnf_icb = .false. ! read in iceberg flux from a file (fill sn_i_rnf if .true.) 438 ln_icb_mass = .false. ! Scale iceberg flux to match mass flux from atmosphere model 438 439 439 440 cn_dir = './' ! root directory for the runoff data location -
NEMO/branches/UKMO/NEMO_4.0.4_icesheet_and_river_coupling/src/OCE/SBC/sbcrnf.F90
r14075 r14939 41 41 REAL(wp) :: rn_rnf_max !: maximum value of the runoff climatologie (ln_rnf_depth_ini =T) 42 42 REAL(wp) :: rn_dep_max !: depth over which runoffs is spread (ln_rnf_depth_ini =T) 43 REAL(wp) :: tot_flux !: total iceberg flux (temporary variable) 43 44 INTEGER :: nn_rnf_depth_file !: create (=1) a runoff depth file or not (=0) 44 45 LOGICAL :: ln_rnf_icb !: iceberg flux is specified in a file 46 LOGICAL :: ln_icb_mass !: Scale iceberg flux to match FW flux from coupled model 45 47 LOGICAL :: ln_rnf_tem !: temperature river runoffs attribute specified in a file 46 48 LOGICAL , PUBLIC :: ln_rnf_sal !: salinity river runoffs attribute specified in a file … … 108 110 !!---------------------------------------------------------------------- 109 111 REAL(wp), DIMENSION(jpi,jpj) :: ztfrz ! freezing point used for temperature correction 112 REAL(wp), PARAMETER :: rsmall = 1.e-10_wp ! ICB flux epsilon 113 110 114 ! 111 115 ! … … 117 121 IF( .NOT. l_rnfcpl ) THEN 118 122 CALL fld_read ( kt, nn_fsbc, sf_rnf ) ! Read Runoffs data and provide it at kt ( runoffs + iceberg ) 119 IF( ln_rnf_icb ) CALL fld_read ( kt, nn_fsbc, sf_i_rnf ) ! idem for iceberg flux if required120 ENDIF123 ENDIF 124 IF( ln_rnf_icb ) CALL fld_read ( kt, nn_fsbc, sf_i_rnf ) ! idem for iceberg flux if required 121 125 IF( ln_rnf_tem ) CALL fld_read ( kt, nn_fsbc, sf_t_rnf ) ! idem for runoffs temperature if required 122 126 IF( ln_rnf_sal ) CALL fld_read ( kt, nn_fsbc, sf_s_rnf ) ! idem for runoffs salinity if required … … 126 130 IF( .NOT. l_rnfcpl ) THEN 127 131 rnf(:,:) = rn_rfact * ( sf_rnf(1)%fnow(:,:,1) ) * tmask(:,:,1) ! updated runoff value at time step kt 128 IF( ln_rnf_icb ) THEN 129 fwficb(:,:) = rn_rfact * ( sf_i_rnf(1)%fnow(:,:,1) ) * tmask(:,:,1) ! updated runoff value at time step kt 130 CALL iom_put( 'iceberg_cea' , fwficb(:,:) ) ! output iceberg flux 131 CALL iom_put( 'hflx_icb_cea' , fwficb(:,:) * rLfus ) ! output Heat Flux into Sea Water due to Iceberg Thermodynamics --> 132 ENDIF 132 ENDIF 133 IF( ln_rnf_icb ) THEN 134 fwficb(:,:) = rn_rfact * ( sf_i_rnf(1)%fnow(:,:,1) ) * tmask(:,:,1) ! updated runoff value at time step kt 135 IF( ln_icb_mass ) THEN 136 ! Modify the Iceberg FW flux to be consistent with the change in 137 ! mass of the Antarctic/Greenland ice sheet for FW conservation in 138 ! coupled model. This isn't perfect as FW flux will go into ocean at 139 ! wrong time of year but more important to maintain FW balance 140 tot_flux = SUM(fwficb(:,:)*e1e2t(:,:)*tmask_i(:,:)*greenland_icesheet_mask(:,:)) !Need to multiply by area to convert to kg/s 141 IF( lk_mpp ) CALL mpp_sum( 'icbclv', tot_flux ) 142 IF( tot_flux > rsmall ) THEN 143 WHERE( greenland_icesheet_mask(:,:) == 1.0 ) & 144 & fwficb(:,:) = fwficb(:,:) * greenland_icesheet_mass_rate_of_change * rn_greenland_calving_fraction & 145 & / tot_flux 146 ELSE IF( rn_greenland_calving_fraction < rsmall ) THEN 147 WHERE( greenland_icesheet_mask(:,:) == 1.0 ) fwficb(:,:) = 0.0 148 ELSE 149 CALL CTL_STOP('STOP', 'No iceberg runoff data read in for Greenland. Check input file or set rn_greenland_calving_fraction=0.0') 150 ENDIF 151 tot_flux = MAXVAL(fwficb(:,:)*tmask_i(:,:)) 152 IF( lk_mpp ) CALL mpp_max( 'icbclv', tot_flux ) 153 WRITE(numout,*) 'Max fwficb: ',tot_flux 154 155 tot_flux = SUM(fwficb(:,:)*e1e2t(:,:)*tmask_i(:,:)*antarctica_icesheet_mask(:,:)) 156 IF( lk_mpp ) CALL mpp_sum( 'icbclv', tot_flux ) 157 IF( tot_flux > rsmall ) THEN 158 WHERE( antarctica_icesheet_mask(:,:) == 1.0 ) & 159 & fwficb(:,:) = fwficb(:,:) * antarctica_icesheet_mass_rate_of_change * rn_antarctica_calving_fraction & 160 & / (tot_flux + 1.0e-10_wp ) 161 ELSE IF( rn_antarctica_calving_fraction < rsmall ) THEN 162 WHERE( antarctica_icesheet_mask(:,:) == 1.0 ) fwficb(:,:) = 0.0 163 ELSE 164 CALL CTL_STOP('STOP', 'No iceberg runoff data read in for Greenland. Check input file or set rn_antarctica_calving_fraction=0.0') 165 ENDIF 166 tot_flux = MAXVAL(fwficb(:,:)*tmask_i(:,:)) 167 IF( lk_mpp ) CALL mpp_max( 'icbclv', tot_flux ) 168 WRITE(numout,*) 'Max fwficb: ',tot_flux, antarctica_icesheet_mass_rate_of_change 169 ENDIF 170 CALL iom_put( 'iceberg_cea' , fwficb(:,:) ) ! output iceberg flux 171 CALL iom_put( 'hflx_icb_cea' , fwficb(:,:) * rLfus ) ! output Heat Flux into Sea Water due to Iceberg Thermodynamics --> 172 rnf(:,:) = rnf(:,:) + fwficb(:,:) ! fwficb isn't used anywhere else so add it to runoff here 173 qns_tot(:,:) = qns_tot(:,:) - fwficb(:,:) * rLfus ! TG: I think this is correct 133 174 ENDIF 134 175 ! … … 252 293 REAL(wp), DIMENSION(jpi,jpj,2) :: zrnfcl 253 294 !! 254 NAMELIST/namsbc_rnf/ cn_dir , ln_rnf_depth, ln_rnf_tem, ln_rnf_sal, ln_rnf_icb, &295 NAMELIST/namsbc_rnf/ cn_dir , ln_rnf_depth, ln_rnf_tem, ln_rnf_sal, ln_rnf_icb, ln_icb_mass, & 255 296 & sn_rnf, sn_cnf , sn_i_rnf, sn_s_rnf , sn_t_rnf , sn_dep_rnf, & 256 297 & ln_rnf_mouth , rn_hrnf , rn_avt_rnf, rn_rfact, & … … 310 351 CALL fld_fill( sf_rnf, (/ sn_rnf /), cn_dir, 'sbc_rnf_init', 'read runoffs data', 'namsbc_rnf', no_print ) 311 352 ! 312 IF( ln_rnf_icb ) THEN ! Create (if required) sf_i_rnf structure313 IF(lwp) WRITE(numout,*)314 IF(lwp) WRITE(numout,*) ' iceberg flux read in a file'315 ALLOCATE( sf_i_rnf(1), STAT=ierror )316 IF( ierror > 0 ) THEN317 CALL ctl_stop( 'sbc_rnf_init: unable to allocate sf_i_rnf structure' ) ; RETURN318 ENDIF319 ALLOCATE( sf_i_rnf(1)%fnow(jpi,jpj,1) )320 IF( sn_i_rnf%ln_tint ) ALLOCATE( sf_i_rnf(1)%fdta(jpi,jpj,1,2))321 CALL fld_fill (sf_i_rnf, (/ sn_i_rnf /), cn_dir, 'sbc_rnf_init', 'read iceberg flux data', 'namsbc_rnf')322 ELSE323 fwficb(:,:) = 0._wp324 ENDIF325 326 ENDIF 353 ENDIF 354 IF( ln_rnf_icb ) THEN ! Create (if required) sf_i_rnf structure 355 IF(lwp) WRITE(numout,*) 356 IF(lwp) WRITE(numout,*) ' iceberg flux read in a file' 357 ALLOCATE( sf_i_rnf(1), STAT=ierror ) 358 IF( ierror > 0 ) THEN 359 CALL ctl_stop( 'sbc_rnf_init: unable to allocate sf_i_rnf structure' ) ; RETURN 360 ENDIF 361 ALLOCATE( sf_i_rnf(1)%fnow(jpi,jpj,1) ) 362 IF( sn_i_rnf%ln_tint ) ALLOCATE( sf_i_rnf(1)%fdta(jpi,jpj,1,2) ) 363 CALL fld_fill (sf_i_rnf, (/ sn_i_rnf /), cn_dir, 'sbc_rnf_init', 'read iceberg flux data', 'namsbc_rnf' ) 364 ELSE 365 fwficb(:,:) = 0._wp 366 ENDIF 367 327 368 ! 328 369 IF( ln_rnf_tem ) THEN ! Create (if required) sf_t_rnf structure
Note: See TracChangeset
for help on using the changeset viewer.