- Timestamp:
- 2020-04-12T12:15:05+02:00 (4 years ago)
- Location:
- NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/cfgs/SHARED/field_def_nemo-ice.xml
r12720 r12741 173 173 <field id="frq_m" unit="-" /> 174 174 175 <!-- rheology convergence tests --> 176 <field id="uice_cvg" long_name="sea ice velocity convergence" standard_name="sea_ice_velocity_convergence" unit="m/s" /> 177 175 178 <!-- ================= --> 176 179 <!-- Add-ons for SIMIP --> -
NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/cfgs/SHARED/namelist_ice_ref
r12734 r12741 97 97 rn_relast = 0.333 ! ratio of elastic timescale to ice time step: Telast = dt_ice * rn_relast 98 98 ! advised value: 1/3 (rn_nevp=120) or 1/9 (rn_nevp=300) 99 ln_rhg_chkcvg = .false. ! check convergence of rheology (outputs: file ice_cvg.nc & variable uice_cvg) 99 100 / 100 101 !------------------------------------------------------------------------------ … … 249 250 ln_icediahsb = .false. ! output the heat, mass & salt budgets (T) or not (F) 250 251 ln_icectl = .false. ! ice points output for debug (T or F) 251 iiceprt = 10 ! i-index for debug 252 jiceprt = 10 ! j-index for debug 253 / 252 iiceprt = 10 ! i-index for debug 253 jiceprt = 10 ! j-index for debug 254 ln_icediacvg = .false. ! check convergence of ice rheology (outputs: file ice_cvg.nc & variable uice_cvg) 255 / -
NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/doc/namelists/namdia
r11703 r12741 8 8 ln_icediahsb = .false. ! output the heat, mass & salt budgets (T) or not (F) 9 9 ln_icectl = .false. ! ice points output for debug (T or F) 10 iiceprt = 10 !i-index for debug11 jiceprt = 10 !j-index for debug10 iiceprt = 10 ! i-index for debug 11 jiceprt = 10 ! j-index for debug 12 12 / -
NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/doc/namelists/namdyn_rhg
r11025 r12741 9 9 rn_relast = 0.333 ! ratio of elastic timescale to ice time step: Telast = dt_ice * rn_relast 10 10 ! advised value: 1/3 (rn_nevp=120) or 1/9 (rn_nevp=300) 11 ln_rhg_chkcvg = .false. ! check convergence of rheology (outputs: file ice_cvg.nc & variable uice_cvg) 11 12 / -
NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/src/ICE/ice.F90
r12733 r12741 155 155 INTEGER , PUBLIC :: nn_nevp !: number of iterations for subcycling 156 156 REAL(wp), PUBLIC :: rn_relast !: ratio => telast/rdt_ice (1/3 or 1/9 depending on nb of subcycling nevp) 157 LOGICAL , PUBLIC :: ln_rhg_chkcvg !: check ice rheology convergence 157 158 ! 158 159 ! !!** ice-advection namelist (namdyn_adv) ** -
NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/src/ICE/icedyn_rhg.F90
r11536 r12741 110 110 INTEGER :: ios, ioptio ! Local integer output status for namelist read 111 111 !! 112 NAMELIST/namdyn_rhg/ ln_rhg_EVP, ln_aEVP, rn_creepl, rn_ecc , nn_nevp, rn_relast 112 NAMELIST/namdyn_rhg/ ln_rhg_EVP, ln_aEVP, rn_creepl, rn_ecc , nn_nevp, rn_relast, ln_rhg_chkcvg 113 113 !!------------------------------------------------------------------- 114 114 ! … … 126 126 WRITE(numout,*) '~~~~~~~~~~~~~~~' 127 127 WRITE(numout,*) ' Namelist : namdyn_rhg:' 128 WRITE(numout,*) ' rheology EVP (icedyn_rhg_evp) ln_rhg_EVP = ', ln_rhg_EVP 129 WRITE(numout,*) ' use adaptive EVP (aEVP) ln_aEVP = ', ln_aEVP 130 WRITE(numout,*) ' creep limit rn_creepl = ', rn_creepl 131 WRITE(numout,*) ' eccentricity of the elliptical yield curve rn_ecc = ', rn_ecc 132 WRITE(numout,*) ' number of iterations for subcycling nn_nevp = ', nn_nevp 133 WRITE(numout,*) ' ratio of elastic timescale over ice time step rn_relast = ', rn_relast 128 WRITE(numout,*) ' rheology EVP (icedyn_rhg_evp) ln_rhg_EVP = ', ln_rhg_EVP 129 WRITE(numout,*) ' use adaptive EVP (aEVP) ln_aEVP = ', ln_aEVP 130 WRITE(numout,*) ' creep limit rn_creepl = ', rn_creepl 131 WRITE(numout,*) ' eccentricity of the elliptical yield curve rn_ecc = ', rn_ecc 132 WRITE(numout,*) ' number of iterations for subcycling nn_nevp = ', nn_nevp 133 WRITE(numout,*) ' ratio of elastic timescale over ice time step rn_relast = ', rn_relast 134 WRITE(numout,*) ' check convergence of rheology ln_rhg_chkcvg = ', ln_rhg_chkcvg 134 135 ENDIF 135 136 ! -
NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/src/ICE/icedyn_rhg_evp.F90
r11536 r12741 41 41 USE prtctl ! Print control 42 42 43 USE netcdf ! NetCDF library for convergence test 43 44 IMPLICIT NONE 44 45 PRIVATE … … 49 50 !! * Substitutions 50 51 # include "vectopt_loop_substitute.h90" 52 53 !! for convergence tests 54 INTEGER :: ncvgid ! netcdf file id 55 INTEGER :: nvarid ! netcdf variable id 56 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zmsk00, zmsk15 51 57 !!---------------------------------------------------------------------- 52 58 !! NEMO/ICE 4.0 , NEMO Consortium (2018) … … 125 131 REAL(wp) :: zvCr ! critical ice volume above which ice is landfast 126 132 ! 127 REAL(wp) :: zresm ! Maximal error on ice velocity128 133 REAL(wp) :: zintb, zintn ! dummy argument 129 134 REAL(wp) :: zfac_x, zfac_y … … 141 146 REAL(wp), DIMENSION(jpi,jpj) :: zds ! shear 142 147 REAL(wp), DIMENSION(jpi,jpj) :: zs1, zs2, zs12 ! stress tensor components 143 !!$ REAL(wp), DIMENSION(jpi,jpj) :: zu_ice, zv_ice, zresr ! check convergence144 148 REAL(wp), DIMENSION(jpi,jpj) :: zsshdyn ! array used for the calculation of ice surface slope: 145 149 ! ! ocean surface (ssh_m) if ice is not embedded … … 160 164 REAL(wp), PARAMETER :: zmmin = 1._wp ! ice mass (kg/m2) below which ice velocity becomes very small 161 165 REAL(wp), PARAMETER :: zamin = 0.001_wp ! ice concentration below which ice velocity becomes very small 166 !! --- check convergence 167 REAL(wp), DIMENSION(jpi,jpj) :: zu_ice, zv_ice 162 168 !! --- diags 163 REAL(wp), DIMENSION(jpi,jpj) :: zmsk00164 169 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zsig1, zsig2, zsig3 165 170 !! --- SIMIP diags … … 174 179 IF( kt == nit000 .AND. lwp ) WRITE(numout,*) '-- ice_dyn_rhg_evp: EVP sea-ice rheology' 175 180 ! 176 !!gm for Clem: OPTIMIZATION: I think zfmask can be computed one for all at the initialization.... 181 ! for diagnostics and convergence tests 182 ALLOCATE( zmsk00(jpi,jpj), zmsk15(jpi,jpj) ) 183 DO jj = 1, jpj 184 DO ji = 1, jpi 185 zmsk00(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - epsi06 ) ) ! 1 if ice , 0 if no ice 186 zmsk15(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - 0.15_wp ) ) ! 1 if 15% ice, 0 if less 187 END DO 188 END DO 189 ! 190 !!gm for Clem: OPTIMIZATION: I think zfmask can be computed one for all at the initialization.... 177 191 !------------------------------------------------------------------------------! 178 192 ! 0) mask at F points for the ice … … 345 359 l_full_nf_update = jter == nn_nevp ! false: disable full North fold update (performances) for iter = 1 to nn_nevp-1 346 360 ! 347 !!$ IF(ln_ctl) THEN ! Convergence test 348 !!$ DO jj = 1, jpjm1 349 !!$ zu_ice(:,jj) = u_ice(:,jj) ! velocity at previous time step 350 !!$ zv_ice(:,jj) = v_ice(:,jj) 351 !!$ END DO 352 !!$ ENDIF 361 ! convergence test 362 IF(ln_rhg_chkcvg) THEN 363 DO jj = 1, jpj 364 DO ji = 1, jpi 365 zu_ice(ji,jj) = u_ice(ji,jj) * umask(ji,jj,1) ! velocity at previous time step 366 zv_ice(ji,jj) = v_ice(ji,jj) * vmask(ji,jj,1) 367 END DO 368 END DO 369 ENDIF 353 370 354 371 ! --- divergence, tension & shear (Appendix B of Hunke & Dukowicz, 2002) --- ! … … 667 684 ENDIF 668 685 669 !!$ IF(ln_ctl) THEN ! Convergence test 670 !!$ DO jj = 2 , jpjm1 671 !!$ zresr(:,jj) = MAX( ABS( u_ice(:,jj) - zu_ice(:,jj) ), ABS( v_ice(:,jj) - zv_ice(:,jj) ) ) 672 !!$ END DO 673 !!$ zresm = MAXVAL( zresr( 1:jpi, 2:jpjm1 ) ) 674 !!$ CALL mpp_max( 'icedyn_rhg_evp', zresm ) ! max over the global domain 675 !!$ ENDIF 686 ! convergence test 687 IF(ln_rhg_chkcvg) THEN 688 CALL rhg_cvg( kt, jter, nn_nevp, u_ice, v_ice, zu_ice, zv_ice ) 689 ENDIF 676 690 ! 677 691 ! ! ==================== ! … … 734 748 ! 5) diagnostics 735 749 !------------------------------------------------------------------------------! 736 DO jj = 1, jpj737 DO ji = 1, jpi738 zmsk00(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - epsi06 ) ) ! 1 if ice, 0 if no ice739 END DO740 END DO741 742 750 ! --- ice-ocean, ice-atm. & ice-oceanbottom(landfast) stresses --- ! 743 751 IF( iom_use('utau_oi') .OR. iom_use('vtau_oi') .OR. iom_use('utau_ai') .OR. iom_use('vtau_ai') .OR. & … … 796 804 DEALLOCATE( zsig1 , zsig2 , zsig3 ) 797 805 ENDIF 798 806 799 807 ! --- SIMIP --- ! 800 808 IF( iom_use('dssh_dx') .OR. iom_use('dssh_dy') .OR. & … … 852 860 ENDIF 853 861 ! 862 ! --- convergence tests --- ! 863 IF( ln_rhg_chkcvg ) THEN 864 IF( iom_use('uice_cvg') ) THEN ! output: u(t=nn_nevp) - u(t=nn_nevp-1) 865 CALL iom_put( 'uice_cvg', MAX( ABS( u_ice(:,:) - zu_ice(:,:) ) * umask(:,:,1) , & 866 & ABS( v_ice(:,:) - zv_ice(:,:) ) * vmask(:,:,1) ) * zmsk15(:,:) ) 867 ENDIF 868 ENDIF 869 ! 870 DEALLOCATE( zmsk00, zmsk15 ) 871 ! 854 872 END SUBROUTINE ice_dyn_rhg_evp 873 874 875 SUBROUTINE rhg_cvg( kt, kiter, kitermax, pu, pv, pub, pvb ) 876 !!---------------------------------------------------------------------- 877 !! *** ROUTINE rhg_cvg *** 878 !! 879 !! ** Purpose : check convergence of oce rheology 880 !! 881 !! ** Method : create a file ice_cvg.nc containing the convergence of ice velocity 882 !! during the sub timestepping of rheology so as: 883 !! uice_cvg = MAX( u(t+1) - u(t) , v(t+1) - v(t) ) 884 !! This routine is called every sub-iteration, so it is cpu expensive 885 !! 886 !! ** Note : for the first sub-iteration, uice_cvg is set to 0 (too large otherwise) 887 !!---------------------------------------------------------------------- 888 INTEGER , INTENT(in) :: kt, kiter, kitermax ! ocean time-step index 889 REAL(wp), DIMENSION(:,:), INTENT(in) :: pu, pv, pub, pvb ! now and before velocities 890 !! 891 INTEGER :: it, idtime, istatus 892 INTEGER :: ji, jj ! dummy loop indices 893 REAL(wp) :: zresm ! local real 894 CHARACTER(len=20) :: clname 895 REAL(wp), DIMENSION(jpi,jpj) :: zres ! check convergence 896 !!---------------------------------------------------------------------- 897 898 ! create file 899 IF( kt == nit000 .AND. kiter == 1 ) THEN 900 ! 901 IF( lwp ) THEN 902 WRITE(numout,*) 903 WRITE(numout,*) 'rhg_cvg : ice rheology convergence control' 904 WRITE(numout,*) '~~~~~~~' 905 ENDIF 906 ! 907 IF( lwm ) THEN 908 clname = 'ice_cvg.nc' 909 IF( .NOT. Agrif_Root() ) clname = TRIM(Agrif_CFixed())//"_"//TRIM(clname) 910 istatus = NF90_CREATE( TRIM(clname), NF90_CLOBBER, ncvgid ) 911 istatus = NF90_DEF_DIM( ncvgid, 'time' , NF90_UNLIMITED, idtime ) 912 istatus = NF90_DEF_VAR( ncvgid, 'uice_cvg', NF90_DOUBLE , (/ idtime /), nvarid ) 913 istatus = NF90_ENDDEF(ncvgid) 914 ENDIF 915 ! 916 ENDIF 917 918 ! time 919 it = ( kt - 1 ) * kitermax + kiter 920 921 ! convergence 922 IF( kiter == 1 ) THEN ! remove the first iteration for calculations of convergence (always very large) 923 zresm = 0._wp 924 ELSE 925 DO jj = 1, jpj 926 DO ji = 1, jpi 927 zres(ji,jj) = MAX( ABS( pu(ji,jj) - pub(ji,jj) ) * umask(ji,jj,1), & 928 & ABS( pv(ji,jj) - pvb(ji,jj) ) * vmask(ji,jj,1) ) * zmsk15(ji,jj) 929 END DO 930 END DO 931 zresm = MAXVAL( zres ) 932 CALL mpp_max( 'icedyn_rhg_evp', zresm ) ! max over the global domain 933 ENDIF 934 935 IF( lwm ) THEN 936 ! write variables 937 istatus = NF90_PUT_VAR( ncvgid, nvarid, (/zresm/), (/it/), (/1/) ) 938 ! close file 939 IF( kt == nitend ) istatus = NF90_CLOSE(ncvgid) 940 ENDIF 941 942 END SUBROUTINE rhg_cvg 855 943 856 944 … … 910 998 END SUBROUTINE rhg_evp_rst 911 999 1000 912 1001 #else 913 1002 !!----------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.