New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 13965 – NEMO

Changeset 13965


Ignore:
Timestamp:
2020-12-02T10:17:02+01:00 (3 years ago)
Author:
clem
Message:

attempt to cleanup vp rheology so it can be merged (maybe). I put a stop to restrain from using it and I cleaned the namelists

Location:
NEMO/branches/2020/SI3_vp_rheology
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/SI3_vp_rheology/cfgs/SHARED/namelist_ice_ref

    r13920 r13965  
    9898      rn_relast     =   0.333         !     ratio of elastic timescale to ice time step: Telast = dt_ice * rn_relast  
    9999                                      !        advised value: 1/3 (nn_nevp=100) or 1/9 (nn_nevp=300) 
    100    ln_rhg_VP        = .false.         !  VP rheology 
    101    nn_nout_vp       = 10              !     number of outer iterations 
    102    nn_ninn_vp       = 1500            !     number of inner iterations 
    103    ln_zebra_vp      = .true.          !     activate zebra solver 
    104    rn_relaxu_vp     = 0.95            !     relaxation factor for u-velocity 
    105    rn_relaxv_vp     = 0.95            !     relaxation factor for v-velocity 
    106    rn_uerr_max_vp   = 0.80            !     maximum error on velocity 
    107    rn_uerr_min_vp   = 1.0e-04         !     velocity to decide convergence 
    108    nn_cvgchk_vp     = 5               !     iteration step for convergence check 
    109    nn_rhg_chkcvg    =   0             !  check convergence of rheology 
     100      nn_rhg_chkcvg =   0             !     check convergence of rheology 
    110101                                      !     = 0  no check 
    111102                                      !     = 1  check at the main time step (output xml: uice_cvg) 
    112103                                      !     = 2  check at both main and rheology time steps (additional output: ice_cvg.nc) 
    113104                                      !          this option 2 asks a lot of communications between cpu 
     105   ln_rhg_VP        = .false.         !  VP rheology 
     106   nn_vp_nout       = 10              !     number of outer iterations 
     107   nn_vp_ninn       = 1500            !     number of inner iterations 
     108   nn_vp_cvgchk     = 5               !     iteration step for convergence check 
    114109/ 
    115110!------------------------------------------------------------------------------ 
  • NEMO/branches/2020/SI3_vp_rheology/src/ICE/ice.F90

    r13920 r13965  
    158158   INTEGER , PUBLIC ::   nn_rhg_chkcvg    !: check ice rheology convergence  
    159159   ! -- vp 
    160    INTEGER , PUBLIC ::   nn_nout_vp       !: Number of outer iterations 
    161    INTEGER , PUBLIC ::   nn_ninn_vp       !: Number of inner iterations (linear system solver) 
    162    LOGICAL , PUBLIC ::   ln_zebra_vp      !: activate zebra (solve the linear system problem every odd j-band, then one every even one) 
    163    REAL(wp), PUBLIC ::   rn_relaxu_vp     !: U-relaxation factor (MV: can probably be merged with V-factor once ok) 
    164    REAL(wp), PUBLIC ::   rn_relaxv_vp     !: V-relaxation factor  
    165    REAL(wp), PUBLIC ::   rn_uerr_max_vp   !: maximum velocity error, above which a forcing error is considered and solver is stopped 
    166    REAL(wp), PUBLIC ::   rn_uerr_min_vp   !: minimum velocity error, beyond which convergence is assumed 
    167    INTEGER , PUBLIC ::   nn_cvgchk_vp     !: Number of iterations every each convergence is checked 
     160   INTEGER , PUBLIC ::   nn_vp_nout       !: Number of outer iterations 
     161   INTEGER , PUBLIC ::   nn_vp_ninn       !: Number of inner iterations (linear system solver) 
     162   INTEGER , PUBLIC ::   nn_vp_cvgchk     !: Number of iterations every each convergence is checked 
    168163   ! 
    169164   !                                     !!** ice-advection namelist (namdyn_adv) ** 
  • NEMO/branches/2020/SI3_vp_rheology/src/ICE/icedyn_rhg.F90

    r13920 r13965  
    8181         CALL ice_dyn_rhg_evp( kt, Kmm, stress1_i, stress2_i, stress12_i, shear_i, divu_i, delta_i ) 
    8282         !         
    83          !                             !---------------------------------------------! 
    84       CASE( np_rhgVP  )                ! Viscous-Plastic rheology                    ! 
    85          !                             !---------------------------------------------! 
     83         !                             !------------------------! 
     84      CASE( np_rhgVP  )                ! Viscous-Plastic        ! 
     85         !                             !------------------------! 
    8686         CALL ice_dyn_rhg_vp ( kt, shear_i, divu_i, delta_i ) 
     87         ! 
    8788      END SELECT 
    8889      ! 
     
    117118      !! 
    118119      NAMELIST/namdyn_rhg/  ln_rhg_EVP, ln_aEVP, rn_creepl, rn_ecc , nn_nevp, rn_relast, nn_rhg_chkcvg,   &    !-- evp 
    119     &                       ln_rhg_VP, nn_nout_vp, nn_ninn_vp, ln_zebra_vp, rn_relaxu_vp, rn_relaxv_vp, rn_uerr_max_vp, rn_uerr_min_vp, nn_cvgchk_vp  !-- vp  
     120    &                       ln_rhg_VP, nn_vp_nout, nn_vp_ninn, nn_vp_cvgchk                                    !-- vp  
    120121      !!------------------------------------------------------------------- 
    121122      ! 
     
    137138         WRITE(numout,*) '         number of iterations for subcycling               nn_nevp       = ', nn_nevp 
    138139         WRITE(numout,*) '         ratio of elastic timescale over ice time step     rn_relast     = ', rn_relast 
    139          WRITE(numout,*) '      check convergence of rheology                        nn_rhg_chkcvg = ', nn_rhg_chkcvg ! maybe duplicates nn_cvgchk_vp ? 
    140          WRITE(numout,*) '      rheology VP     (icedyn_rhg_VP)                      ln_rhg_VP     = ', ln_rhg_VP 
    141          WRITE(numout,*) '         number of outer iterations                        nn_nout_vp    = ', nn_nout_vp 
    142          WRITE(numout,*) '         number of inner iterations                        nn_ninn_vp    = ', nn_ninn_vp 
    143          WRITE(numout,*) '         activate zebra solver                             ln_zebra_vp   = ', ln_zebra_vp 
    144          WRITE(numout,*) '         relaxation factor for u                           rn_relaxu_vp  = ', rn_relaxu_vp 
    145          WRITE(numout,*) '         relaxation factor for v                           rn_relaxv_vp  = ', rn_relaxv_vp 
    146          WRITE(numout,*) '         maximum error on velocity                         rn_uerr_max_vp = ', rn_uerr_max_vp 
    147          WRITE(numout,*) '         velocity to decide convergence                    rn_uerr_min_vp = ', rn_uerr_min_vp 
    148          WRITE(numout,*) '         iteration step for convergence check              nn_cvgchk_vp   = ', nn_cvgchk_vp 
    149          IF    ( nn_rhg_chkcvg == 0 ) THEN   ;   WRITE(numout,*) '         no check' 
    150          ELSEIF( nn_rhg_chkcvg == 1 ) THEN   ;   WRITE(numout,*) '         check cvg at the main time step' 
    151          ELSEIF( nn_rhg_chkcvg == 2 ) THEN   ;   WRITE(numout,*) '         check cvg at both main and rheology time steps' 
     140         WRITE(numout,*) '         check convergence of rheology                     nn_rhg_chkcvg = ', nn_rhg_chkcvg 
     141         WRITE(numout,*) '      rheology VP   (icedyn_rhg_VP)                        ln_rhg_VP     = ', ln_rhg_VP 
     142         WRITE(numout,*) '         number of outer iterations                        nn_vp_nout    = ', nn_vp_nout 
     143         WRITE(numout,*) '         number of inner iterations                        nn_vp_ninn    = ', nn_vp_ninn 
     144         WRITE(numout,*) '         iteration step for convergence check              nn_vp_cvgchk  = ', nn_vp_cvgchk 
     145         IF( ln_rhg_EVP ) THEN 
     146            IF    ( nn_rhg_chkcvg == 0 ) THEN   ;   WRITE(numout,*) '         no check cvg' 
     147            ELSEIF( nn_rhg_chkcvg == 1 ) THEN   ;   WRITE(numout,*) '         check cvg at the main time step' 
     148            ELSEIF( nn_rhg_chkcvg == 2 ) THEN   ;   WRITE(numout,*) '         check cvg at both main and rheology time steps' 
     149            ENDIF 
    152150         ENDIF 
    153151      ENDIF 
  • NEMO/branches/2020/SI3_vp_rheology/src/ICE/icedyn_rhg_vp.F90

    r13921 r13965  
    4141   PUBLIC   ice_dyn_rhg_vp   ! called by icedyn_rhg.F90 
    4242 
     43 
     44   LOGICAL  ::   lp_zebra_vp =.TRUE.      ! activate zebra (solve the linear system problem every odd j-band, then one every even one) 
     45   REAL(wp) ::   zrelaxu_vp=0.95     ! U-relaxation factor (MV: can probably be merged with V-factor once ok) 
     46   REAL(wp) ::   zrelaxv_vp=0.95     ! V-relaxation factor  
     47   REAL(wp) ::   zuerr_max_vp=0.80   ! maximum velocity error, above which a forcing error is considered and solver is stopped 
     48   REAL(wp) ::   zuerr_min_vp=1.e-04   ! minimum velocity error, beyond which convergence is assumed 
     49 
    4350   !! for convergence tests 
    4451   INTEGER ::   ncvgid        ! netcdf file id 
     
    204211      REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   zdiag_xmtrp_snw, zdiag_ymtrp_snw ! X/Y-component of snow mass transport (kg/s, SIMIP) 
    205212      REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   zdiag_xatrp, zdiag_yatrp         ! X/Y-component of area transport (m2/s, SIMIP) 
    206                          
     213 
     214 
     215      CALL ctl_stop( 'STOP', 'icedyn_rhg_vp: stop because vp rheology is an ongoing work and should not be used' ) 
     216       
    207217      !!---------------------------------------------------------------------------------------------------------------------- 
    208218      ! DEBUG put all forcing terms to zero 
     
    236246      END DO 
    237247       
    238       IF ( ln_zebra_vp ) THEN; nn_zebra_vp = 2 
     248      IF ( lp_zebra_vp ) THEN; nn_zebra_vp = 2 
    239249                         ELSE; nn_zebra_vp = 1; ENDIF  
    240250 
    241       nn_nvp = nn_nout_vp * nn_ninn_vp ! maximum number of iterations 
    242  
    243       IF( lwp )   WRITE(numout,*) ' ln_zebra_vp : ', ln_zebra_vp 
     251      nn_nvp = nn_vp_nout * nn_vp_ninn ! maximum number of iterations 
     252 
     253      IF( lwp )   WRITE(numout,*) ' lp_zebra_vp : ', lp_zebra_vp 
    244254      IF( lwp )   WRITE(numout,*) ' nn_zebra_vp : ', nn_zebra_vp 
    245255      IF( lwp )   WRITE(numout,*) ' nn_nvp      : ', nn_nvp 
     
    414424      jter = 0 
    415425 
    416       DO i_out = 1, nn_nout_vp 
     426      DO i_out = 1, nn_vp_nout 
    417427 
    418428         IF( lwp )   WRITE(numout,*) ' outer loop  i_out : ', i_out 
     
    796806         ll_v_iterate = .TRUE. 
    797807 
    798          DO i_inn = 1, nn_ninn_vp ! inner loop iterations 
     808         DO i_inn = 1, nn_vp_ninn ! inner loop iterations 
    799809 
    800810            IF( lwp )   WRITE(numout,*) ' inner loop 1 i_inn : ', i_inn 
     
    898908                        DO ji = 2, jpi - 1     
    899909                         
    900                            u_ice(ji,jj) = zu_b(ji,jj) + rn_relaxu_vp * ( u_ice(ji,jj) - zu_b(ji,jj) ) ! relaxation 
     910                           u_ice(ji,jj) = zu_b(ji,jj) + zrelaxu_vp * ( u_ice(ji,jj) - zu_b(ji,jj) ) ! relaxation 
    901911                            
    902912                           u_ice(ji,jj) =   zmsk00x(ji,jj)                                        &   ! masking 
     
    9961006                        DO jj = 2, jpj - 1 
    9971007                         
    998                             v_ice(ji,jj) = zv_b(ji,jj) + rn_relaxv_vp * ( v_ice(ji,jj) - zv_b(ji,jj) )    ! relaxation 
     1008                            v_ice(ji,jj) = zv_b(ji,jj) + zrelaxv_vp * ( v_ice(ji,jj) - zv_b(ji,jj) )    ! relaxation 
    9991009                             
    10001010                            v_ice(ji,jj) =   zmsk00y(ji,jj)                                        &      ! masking 
     
    10361046                   
    10371047                  ! - Stop if error is too large ("safeguard against bad forcing" of original Zhang routine) 
    1038                   IF ( i_inn > 1 .AND. zuerr_max > rn_uerr_max_vp ) THEN 
     1048                  IF ( i_inn > 1 .AND. zuerr_max > zuerr_max_vp ) THEN 
    10391049                      IF ( lwp ) WRITE(numout,*) " VP rheology error was too large : ", zuerr_max, " in outer U-iteration ", i_out, " after ", i_inn, " iterations, we stopped " 
    10401050                      ll_u_iterate = .FALSE. 
     
    10421052                   
    10431053                  ! - Stop if error small enough 
    1044                   IF ( zuerr_max < rn_uerr_min_vp ) THEN                                         
     1054                  IF ( zuerr_max < zuerr_min_vp ) THEN                                         
    10451055                      IF ( lwp ) WRITE(numout,*) " VP rheology nicely done in outer U-iteration ", i_out, " after ", i_inn, " iterations, finished! " 
    10461056                      ll_u_iterate = .FALSE. 
     
    10681078                   
    10691079                  ! - Stop if error is too large ("safeguard against bad forcing" of original Zhang routine) 
    1070                   IF ( i_inn > 1 .AND. zverr_max > rn_uerr_max_vp ) THEN 
     1080                  IF ( i_inn > 1 .AND. zverr_max > zuerr_max_vp ) THEN 
    10711081                      IF ( lwp ) WRITE(numout,*) " VP rheology error was too large : ", zverr_max, " in outer V-iteration ", i_out, " after ", i_inn, " iterations, we stopped " 
    10721082                      ll_v_iterate = .FALSE. 
     
    10741084                   
    10751085                  ! - Stop if error small enough 
    1076                   IF ( zverr_max < rn_uerr_min_vp ) THEN                                         
     1086                  IF ( zverr_max < zuerr_min_vp ) THEN                                         
    10771087                      IF ( lwp ) WRITE(numout,*) " VP rheology nicely done in outer V-iteration ", i_out, " after ", i_inn, " iterations, finished! " 
    10781088                      ll_v_iterate = .FALSE. 
  • NEMO/branches/2020/SI3_vp_rheology/src/ICE/iceistate.F90

    r13920 r13965  
    174174      u_ice (:,:) = 0._wp 
    175175      v_ice (:,:) = 0._wp 
    176  
    177       CALL lbc_lnk_multi( 'ice_istate' , u_ice, 'U', -1., v_ice, 'V', -1. )  ! required for VP rheology 
    178176      ! 
    179177      !------------------------------------------------------------------------ 
Note: See TracChangeset for help on using the changeset viewer.