Changeset 12721 for NEMO/branches/UKMO/NEMO_4.0.2_GO8_package_ENHANCE-02_ISF_nemo/src/OCE/DIA/diahsb.F90
- Timestamp:
- 2020-04-08T20:42:57+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/UKMO/NEMO_4.0.2_GO8_package_ENHANCE-02_ISF_nemo/src/OCE/DIA/diahsb.F90
r12658 r12721 17 17 USE phycst ! physical constants 18 18 USE sbc_oce ! surface thermohaline fluxes 19 USE isf_oce ! ice shelf fluxes 19 20 USE sbcrnf ! river runoff 20 USE sbcisf ! ice shelves21 21 USE domvvl ! vertical scale factors 22 22 USE traqsr ! penetrative solar radiation … … 48 48 REAL(wp), DIMENSION(:,:) , ALLOCATABLE :: ssh_hc_loc_ini, ssh_sc_loc_ini ! 49 49 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: hc_loc_ini, sc_loc_ini, e3t_ini ! 50 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmask_ini 50 51 51 52 !! * Substitutions … … 91 92 ! 1 - Trends due to forcing ! 92 93 ! ------------------------- ! 93 z_frc_trd_v = r1_rau0 * glob_sum( 'diahsb', - ( emp(:,:) - rnf(:,:) + fwfisf (:,:) ) * surf(:,:) ) ! volume fluxes94 z_frc_trd_v = r1_rau0 * glob_sum( 'diahsb', - ( emp(:,:) - rnf(:,:) + fwfisf_cav(:,:) + fwfisf_par(:,:) ) * surf(:,:) ) ! volume fluxes 94 95 z_frc_trd_t = glob_sum( 'diahsb', sbc_tsc(:,:,jp_tem) * surf(:,:) ) ! heat fluxes 95 96 z_frc_trd_s = glob_sum( 'diahsb', sbc_tsc(:,:,jp_sal) * surf(:,:) ) ! salt fluxes … … 98 99 IF( ln_rnf_sal) z_frc_trd_s = z_frc_trd_s + glob_sum( 'diahsb', rnf_tsc(:,:,jp_sal) * surf(:,:) ) 99 100 ! ! Add ice shelf heat & salt input 100 IF( ln_isf ) z_frc_trd_t = z_frc_trd_t + glob_sum( 'diahsb', risf_tsc(:,:,jp_tem) * surf(:,:) ) 101 IF( ln_isf ) z_frc_trd_t = z_frc_trd_t & 102 & + glob_sum( 'diahsb', ( risf_cav_tsc(:,:,jp_tem) + risf_par_tsc(:,:,jp_tem) ) * surf(:,:) ) 101 103 ! ! Add penetrative solar radiation 102 104 IF( ln_traqsr ) z_frc_trd_t = z_frc_trd_t + r1_rau0_rcp * glob_sum( 'diahsb', qsr (:,:) * surf(:,:) ) … … 155 157 ! 156 158 DO jk = 1, jpkm1 ! volume variation (calculated with scale factors) 157 zwrk(:,:,jk) = ( surf(:,:)*e3t_n(:,:,jk) - surf_ini(:,:)*e3t_ini(:,:,jk) ) * tmask(:,:,jk)159 zwrk(:,:,jk) = surf(:,:)*e3t_n(:,:,jk)*tmask(:,:,jk) - surf_ini(:,:)*e3t_ini(:,:,jk)*tmask_ini(:,:,jk) 158 160 END DO 159 zdiff_v2 = glob_sum_full( 'diahsb', zwrk(:,:,:) ) 161 zdiff_v2 = glob_sum_full( 'diahsb', zwrk(:,:,:) ) ! glob_sum_full needed as tmask and tmask_ini could be different 160 162 DO jk = 1, jpkm1 ! heat content variation 161 zwrk(:,:,jk) = ( surf(:,:)*e3t_n(:,:,jk)*tsn(:,:,jk,jp_tem) - surf_ini(:,:)*hc_loc_ini(:,:,jk) ) * tmask(:,:,jk)163 zwrk(:,:,jk) = ( surf(:,:)*e3t_n(:,:,jk)*tsn(:,:,jk,jp_tem) - surf_ini(:,:)*hc_loc_ini(:,:,jk) ) 162 164 END DO 163 165 zdiff_hc = glob_sum_full( 'diahsb', zwrk(:,:,:) ) 164 166 DO jk = 1, jpkm1 ! salt content variation 165 zwrk(:,:,jk) = ( surf(:,:)*e3t_n(:,:,jk)*tsn(:,:,jk,jp_sal) - surf_ini(:,:)*sc_loc_ini(:,:,jk) ) * tmask(:,:,jk)167 zwrk(:,:,jk) = ( surf(:,:)*e3t_n(:,:,jk)*tsn(:,:,jk,jp_sal) - surf_ini(:,:)*sc_loc_ini(:,:,jk) ) 166 168 END DO 167 169 zdiff_sc = glob_sum_full( 'diahsb', zwrk(:,:,:) ) … … 187 189 zwrk(:,:,jk) = surf(:,:) * e3t_n(:,:,jk) * tmask(:,:,jk) 188 190 END DO 189 zvol_tot = glob_sum _full( 'diahsb', zwrk(:,:,:) )191 zvol_tot = glob_sum( 'diahsb', zwrk(:,:,:) ) 190 192 191 193 !!gm to be added ? … … 270 272 CALL iom_get( numror, jpdom_autoglo, 'ssh_ini' , ssh_ini , ldxios = lrxios ) 271 273 CALL iom_get( numror, jpdom_autoglo, 'e3t_ini' , e3t_ini , ldxios = lrxios ) 274 CALL iom_get( numror, jpdom_autoglo, 'tmask_ini' , tmask_ini , ldxios = lrxios ) 272 275 CALL iom_get( numror, jpdom_autoglo, 'hc_loc_ini', hc_loc_ini, ldxios = lrxios ) 273 276 CALL iom_get( numror, jpdom_autoglo, 'sc_loc_ini', sc_loc_ini, ldxios = lrxios ) … … 285 288 ! if ice sheet/oceqn coupling, need to mask ini variables here (mask could change at the next NEMO instance). 286 289 e3t_ini (:,:,jk) = e3t_n(:,:,jk) * tmask(:,:,jk) ! initial vertical scale factors 290 tmask_ini (:,:,jk) = tmask(:,:,jk) ! initial mask 287 291 hc_loc_ini(:,:,jk) = tsn(:,:,jk,jp_tem) * e3t_n(:,:,jk) * tmask(:,:,jk) ! initial heat content 288 292 sc_loc_ini(:,:,jk) = tsn(:,:,jk,jp_sal) * e3t_n(:,:,jk) * tmask(:,:,jk) ! initial salt content … … 325 329 CALL iom_rstput( kt, nitrst, numrow, 'ssh_ini' , ssh_ini , ldxios = lwxios ) 326 330 CALL iom_rstput( kt, nitrst, numrow, 'e3t_ini' , e3t_ini , ldxios = lwxios ) 331 CALL iom_rstput( kt, nitrst, numrow, 'tmask_ini' , tmask_ini , ldxios = lwxios ) 327 332 CALL iom_rstput( kt, nitrst, numrow, 'hc_loc_ini', hc_loc_ini, ldxios = lwxios ) 328 333 CALL iom_rstput( kt, nitrst, numrow, 'sc_loc_ini', sc_loc_ini, ldxios = lwxios ) … … 396 401 ! ------------------- ! 397 402 ALLOCATE( hc_loc_ini(jpi,jpj,jpk), sc_loc_ini(jpi,jpj,jpk), surf_ini(jpi,jpj), & 398 & e3t_ini(jpi,jpj,jpk), surf(jpi,jpj), ssh_ini(jpi,jpj), STAT=ierror )403 & e3t_ini(jpi,jpj,jpk), surf(jpi,jpj), ssh_ini(jpi,jpj), tmask_ini(jpi,jpj,jpk),STAT=ierror ) 399 404 IF( ierror > 0 ) THEN 400 405 CALL ctl_stop( 'dia_hsb_init: unable to allocate hc_loc_ini' ) ; RETURN
Note: See TracChangeset
for help on using the changeset viewer.