Changeset 11823 for NEMO/branches
- Timestamp:
- 2019-10-29T12:00:04+01:00 (4 years ago)
- Location:
- NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/DOM/domain.F90
r11553 r11823 26 26 !!---------------------------------------------------------------------- 27 27 USE oce ! ocean variables 28 USE isfstp29 28 USE dom_oce ! domain: ocean 30 29 USE sbc_oce ! surface boundary condition: ocean … … 449 448 #endif 450 449 ! 451 ! need to know ln_isfcpl for istate (restart extrapolation)452 ! and for domvvl_init (ssh extrapolation when recompute e3 variable453 CALL isf_nam454 !455 450 END SUBROUTINE dom_nam 456 451 -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/DOM/domvvl.F90
r11553 r11823 19 19 !!---------------------------------------------------------------------- 20 20 USE oce ! ocean dynamics and tracers 21 USE isfcpl22 USE isf23 21 USE phycst ! physical constant 24 22 USE dom_oce ! ocean space and time domain … … 38 36 39 37 PUBLIC dom_vvl_init ! called by domain.F90 38 PUBLIC dom_vvl_zgr ! called by isfcpl.F90 40 39 PUBLIC dom_vvl_sf_nxt ! called by step.F90 41 40 PUBLIC dom_vvl_sf_swp ! called by step.F90 … … 117 116 !! Reference : Leclair, M., and G. Madec, 2011, Ocean Modelling. 118 117 !!---------------------------------------------------------------------- 118 ! 119 IF(lwp) WRITE(numout,*) 120 IF(lwp) WRITE(numout,*) 'dom_vvl_init : Variable volume activated' 121 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~' 122 ! 123 CALL dom_vvl_ctl ! choose vertical coordinate (z_star, z_tilde or layer) 124 ! 125 ! ! Allocate module arrays 126 IF( dom_vvl_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'dom_vvl_init : unable to allocate arrays' ) 127 ! 128 ! ! Read or initialize e3t_(b/n), tilde_e3t_(b/n) and hdiv_lf 129 CALL dom_vvl_rst( nit000, 'READ' ) 130 e3t_a(:,:,jpk) = e3t_0(:,:,jpk) ! last level always inside the sea floor set one for all 131 ! 132 CALL dom_vvl_zgr() ! interpolation scale factor, depth and water column 133 ! 134 END SUBROUTINE dom_vvl_init 135 ! 136 SUBROUTINE dom_vvl_zgr() 137 !!---------------------------------------------------------------------- 138 !! *** ROUTINE dom_vvl_init *** 139 !! 140 !! ** Purpose : Interpolation of all scale factors, 141 !! depths and water column heights 142 !! 143 !! ** Method : - interpolate scale factors 144 !! 145 !! ** Action : - e3t_(n/b) and tilde_e3t_(n/b) 146 !! - Regrid: e3(u/v)_n 147 !! e3(u/v)_b 148 !! e3w_n 149 !! e3(u/v)w_b 150 !! e3(u/v)w_n 151 !! gdept_n, gdepw_n and gde3w_n 152 !! - h(t/u/v)_0 153 !! - frq_rst_e3t and frq_rst_hdv 154 !! 155 !! Reference : Leclair, M., and G. Madec, 2011, Ocean Modelling. 156 !!---------------------------------------------------------------------- 119 157 INTEGER :: ji, jj, jk 120 158 INTEGER :: ii0, ii1, ij0, ij1 121 159 REAL(wp):: zcoef 122 160 !!---------------------------------------------------------------------- 123 !124 IF(lwp) WRITE(numout,*)125 IF(lwp) WRITE(numout,*) 'dom_vvl_init : Variable volume activated'126 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~'127 !128 CALL dom_vvl_ctl ! choose vertical coordinate (z_star, z_tilde or layer)129 !130 ! ! Allocate module arrays131 IF( dom_vvl_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'dom_vvl_init : unable to allocate arrays' )132 !133 ! ! Read or initialize e3t_(b/n), tilde_e3t_(b/n) and hdiv_lf134 CALL dom_vvl_rst( nit000, 'READ' )135 e3t_a(:,:,jpk) = e3t_0(:,:,jpk) ! last level always inside the sea floor set one for all136 161 ! 137 162 ! !== Set of all other vertical scale factors ==! (now and before) … … 265 290 ENDIF 266 291 ! 267 END SUBROUTINE dom_vvl_init 268 292 END SUBROUTINE dom_vvl_zgr 269 293 270 294 SUBROUTINE dom_vvl_sf_nxt( kt, kcall ) … … 816 840 id5 = iom_varid( numror, 'hdiv_lf', ldstop = .FALSE. ) 817 841 ! 818 ! coupling with an ice sheet model (grounding/calving line migration)819 IF ( ln_isfcpl ) THEN820 !821 ! extrapolate ssh over new water column if needed822 CALL isfcpl_ssh()823 !824 ! e3t need to be computed where ice shelf draft changed (new ht_0)825 id1 = 0 ; id2 = 0 ; id3 = 0 ; id4 = 0 ; id5 = 0826 !827 END IF828 842 ! ! --------- ! 829 843 ! ! all cases ! 830 844 ! ! --------- ! 845 ! 831 846 IF( MIN( id1, id2 ) > 0 ) THEN ! all required arrays exist 832 847 CALL iom_get( numror, jpdom_autoglo, 'e3t_b', e3t_b(:,:,:), ldxios = lrxios ) … … 1046 1061 ! 1047 1062 IF( ioptio /= 1 ) CALL ctl_stop( 'Choose ONE vertical coordinate in namelist nam_vvl' ) 1048 IF( .NOT. ln_vvl_zstar .AND. ln_isf ) CALL ctl_stop( 'Only vvl_zstar has been tested with ice shelf cavity' )1049 1063 ! 1050 1064 IF(lwp) THEN ! Print the choice -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/DYN/divhor.F90
r11541 r11823 86 86 END DO 87 87 END DO 88 89 ztmp = 0.0 90 DO jk = jpkm1,1,-1 91 ztmp(:,:) = ztmp(:,:) + hdivn(:,:,jk) * e3t_n(:,:,jk) 92 END DO 93 CALL debug('divhor 1',ztmp) 94 88 ! 95 89 #if defined key_agrif 96 90 IF( .NOT. Agrif_Root() ) THEN … … 102 96 #endif 103 97 ! 104 IF( ln_rnf ) CALL sbc_rnf_div( hdivn )!== runoffs ==! (update hdivn field)98 IF( ln_rnf ) CALL sbc_rnf_div( hdivn ) !== runoffs ==! (update hdivn field) 105 99 ! 106 100 #if defined key_asminc … … 109 103 #endif 110 104 ! 111 IF( ln_isf . OR. ln_isfcpl )CALL isf_hdiv( kt, hdivn ) !== ice shelf ==! (update hdivn field)105 IF( ln_isf .AND. kt /= 0 ) CALL isf_hdiv( kt, hdivn ) !== ice shelf ==! (update hdivn field) 112 106 ! 113 107 CALL lbc_lnk( 'divhor', hdivn, 'T', 1. ) ! (no sign change) 114 !115 ztmp = 0.0116 DO jk = jpkm1,1,-1117 ztmp(:,:) = ztmp(:,:) + hdivn(:,:,jk) * e3t_n(:,:,jk)118 END DO119 CALL debug('divhor 2',ztmp)120 108 ! 121 109 IF( ln_timing ) CALL timing_stop('div_hor') -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/IOM/restart.F90
r11553 r11823 19 19 !!---------------------------------------------------------------------- 20 20 USE oce ! ocean dynamics and tracers 21 USE isf ! ice shelf22 USE isfcpl ! ice shelf coupling23 21 USE dom_oce ! ocean space and time domain 24 22 USE sbc_ice ! only lk_si3 … … 284 282 ENDIF 285 283 ! 286 ! ice sheet coupling: extrapolation of restart to fill new wet cell and compute divergence correction287 IF ( ln_isfcpl ) CALL isfcpl_init()288 !289 284 IF( neuler == 0 ) THEN ! Euler restart (neuler=0) 290 285 tsb (:,:,:,:) = tsn (:,:,:,:) ! all before fields set to now values -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcpl.F90
r11553 r11823 16 16 USE isfutils ! debuging 17 17 USE lib_mpp ! mpp routine 18 USE domvvl ! vertical scale factor interpolation 18 19 ! 19 20 USE in_out_manager ! I/O manager … … 62 63 ! 63 64 ! mask velocity properly (mask used in restart not compatible with new mask) 64 un(:,:,:) = un(:,:,: ,) * umask(:,:,:)65 vn(:,:,:) = vn(:,:,: ,) * vmask(:,:,:)65 un(:,:,:) = un(:,:,:) * umask(:,:,:) 66 vn(:,:,:) = vn(:,:,:) * vmask(:,:,:) 66 67 ! 67 68 ! Need to : - include in the cpl cons the risfcpl_vol/tsc contribution … … 91 92 END SUBROUTINE isfcpl_rst_write 92 93 93 SUBROUTINE isfcpl_ssh ()94 SUBROUTINE isfcpl_ssh 94 95 !!---------------------------------------------------------------------- 95 96 !! *** ROUTINE iscpl_ssh *** … … 149 150 sshn(:,:) = zssh(:,:) * ssmask(:,:) 150 151 ! 151 ! force to start on an euler time step152 neuler = 0153 !154 152 sshb(:,:) = sshn(:,:) 155 153 ! 154 ! recompute the vertical scale factor, depth and water thickness 155 CALL dom_vvl_zgr 156 ! 156 157 END SUBROUTINE isfcpl_ssh 157 158 158 SUBROUTINE isfcpl_tra ()159 SUBROUTINE isfcpl_tra 159 160 !!---------------------------------------------------------------------- 160 161 !! *** ROUTINE iscpl_tra *** … … 297 298 tsn(:,:,:,jp_sal) = zts0(:,:,:,jp_sal) * tmask(:,:,:) 298 299 ! 300 tsb(:,:,:,:) = tsn(:,:,:,:) 301 ! 299 302 ! sanity check 300 303 ! ----------------------------------------------------------------------------------------- … … 383 386 CALL lbc_lnk( 'iscpl', zqvolb, 'T', 1. ) 384 387 CALL lbc_lnk( 'iscpl', zqvoln, 'T', 1. ) 385 DO jk = 1,jpk386 CALL debug('zqvolb',zqvolb(:,:,jk))387 END DO388 DO jk = 1,jpk389 CALL debug('zqvoln',zqvoln(:,:,jk))390 END DO391 388 ! 392 389 ! get 3d tra increment to apply at the first time step -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfload.F90
r11553 r11823 76 76 ! 77 77 ! !- assume water displaced by the ice shelf is at T=-1.9 and S=34.4 (rude) 78 zts_top(:,:,jp_tem) = -1.9_wp ; zts_top(:,:,jp_sal) = 3 5.4_wp78 zts_top(:,:,jp_tem) = -1.9_wp ; zts_top(:,:,jp_sal) = 34.4_wp 79 79 ! 80 80 DO jk = 1, jpk !- compute density of the water displaced by the ice shelf -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfstp.F90
r11553 r11823 15 15 USE oce ! ocean dynamics and tracers 16 16 USE dom_oce ! ocean space and time domain 17 USE domvvl, ONLY : ln_vvl_zstar 17 18 USE phycst ! physical constants 18 19 USE eosbn2 ! equation of state … … 120 121 !! ** Purpose : Initialisation of the ice shelf public variables 121 122 !! 122 !! ** Method : Read the namsbc namelist and set derived parameters 123 !! Call init routines for all other SBC modules that have one 124 !! 125 !! ** Action : - read namsbc parameters 123 !! ** Method : Read the namisf namelist, check option compatibility and set derived parameters 124 !! 125 !! ** Action : - read namisf parameters 126 126 !! - allocate memory 127 !! - call cav/param init routine 127 !! - output print 128 !! - ckeck option compatibility 129 !! - call cav/param/isfcpl init routine 128 130 !!---------------------------------------------------------------------- 129 131 ! … … 144 146 ! terminate routine now if no ice shelf melt formulation specify 145 147 IF ( ln_isf ) THEN 146 !147 !---------------------------------------------------------------------------------------------------------------------148 ! initialisation melt in the cavity149 IF ( ln_isfcav_mlt ) THEN150 !151 ! initialisation of cav variable152 CALL isf_cav_init()153 !154 ! read cav variable from restart155 IF ( ln_rstart ) CALL isfrst_read('cav', risf_cav_tsc, fwfisf_cav, risf_cav_tsc_b, fwfisf_cav_b)156 !157 END IF158 !159 !---------------------------------------------------------------------------------------------------------------------160 ! initialisation parametrised melt161 IF ( ln_isfpar_mlt ) THEN162 !163 ! initialisation of par variable164 CALL isf_par_init()165 !166 ! read par variable from restart167 IF ( ln_rstart ) CALL isfrst_read('par', risf_par_tsc, fwfisf_par, risf_par_tsc_b, fwfisf_par_b)168 !169 END IF170 148 ! 171 149 !--------------------------------------------------------------------------------------------------------------------- … … 173 151 IF( ln_isfcpl ) THEN 174 152 ! 153 ! start on an euler time step 154 neuler = 0 155 ! 156 ! ice sheet coupling: extrapolation of restart to fill new wet cell and compute divergence correction 157 CALL isfcpl_init() 158 ! 159 ! all before fields set to now values 160 tsb (:,:,:,:) = tsn (:,:,:,:) 161 ub (:,:,:) = un (:,:,:) 162 vb (:,:,:) = vn (:,:,:) 163 sshb (:,:) = sshn (:,:) 164 e3t_b(:,:,:) = e3t_n(:,:,:) 165 175 166 ! prepare writing restart 176 167 IF( lwxios ) CALL iom_set_rstw_var_active('ssmask') … … 182 173 END IF 183 174 ! 175 !--------------------------------------------------------------------------------------------------------------------- 176 ! initialisation melt in the cavity 177 IF ( ln_isfcav_mlt ) THEN 178 ! 179 ! initialisation of cav variable 180 CALL isf_cav_init() 181 ! 182 ! read cav variable from restart 183 IF ( ln_rstart ) CALL isfrst_read('cav', risf_cav_tsc, fwfisf_cav, risf_cav_tsc_b, fwfisf_cav_b) 184 ! 185 END IF 186 ! 187 !--------------------------------------------------------------------------------------------------------------------- 188 ! initialisation parametrised melt 189 IF ( ln_isfpar_mlt ) THEN 190 ! 191 ! initialisation of par variable 192 CALL isf_par_init() 193 ! 194 ! read par variable from restart 195 IF ( ln_rstart ) CALL isfrst_read('par', risf_par_tsc, fwfisf_par, risf_par_tsc_b, fwfisf_par_b) 196 ! 197 END IF 198 ! 184 199 END IF 185 200 186 201 END SUBROUTINE isf_init 187 202 188 SUBROUTINE isf_ctl()! 203 SUBROUTINE isf_ctl() 204 !!--------------------------------------------------------------------- 205 !! *** ROUTINE isf_ctl *** 206 !! 207 !! ** Purpose : output print and option compatibility check 208 !! 209 !!---------------------------------------------------------------------- 189 210 IF (lwp) THEN 190 211 WRITE(numout,*) … … 272 293 END IF 273 294 ! 295 ! compatibility ice shelf and vvl 296 IF( .NOT. ln_vvl_zstar .AND. ln_isf ) CALL ctl_stop( 'Only vvl_zstar has been tested with ice shelf cavity' ) 297 ! 274 298 END IF 275 299 END SUBROUTINE isf_ctl
Note: See TracChangeset
for help on using the changeset viewer.