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 12988 for NEMO/branches/2020 – NEMO

Changeset 12988 for NEMO/branches/2020


Ignore:
Timestamp:
2020-05-28T16:21:45+02:00 (4 years ago)
Author:
clem
Message:

deal with possible out of bounds ice concentration at initial time step and remove unecessary initialization of before values

Location:
NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/src/ICE
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/src/ICE/iceistate.F90

    r12890 r12988  
    8585      !! ** Steps   :   1) Set initial surface and basal temperatures 
    8686      !!                2) Recompute or read sea ice state variables 
    87       !!                3) Fill in the ice thickness distribution using gaussian 
    88       !!                4) Fill in space-dependent arrays for state variables 
    89       !!                5) snow-ice mass computation 
    90       !!                6) store before fields 
     87      !!                3) Fill in space-dependent arrays for state variables 
     88      !!                4) snow-ice mass computation 
    9189      !! 
    9290      !! ** Notes   : o_i, t_su, t_s, t_i, sz_i must be filled everywhere, even 
     
    284282         ENDIF 
    285283          
    286          !-------------! 
    287          ! fill fields ! 
    288          !-------------! 
     284         !----------------! 
     285         ! 3) fill fields ! 
     286         !----------------! 
    289287         ! select ice covered grid points 
    290288         npti = 0 ; nptidx(:) = 0 
     
    393391         t1_ice(:,:,:) = t_i (:,:,1,:) 
    394392         ! 
     393         ! ice concentration should not exceed amax 
     394         at_i(:,:) = SUM( a_i, dim=3 ) 
     395         DO jl = 1, jpl 
     396            WHERE( at_i(:,:) > rn_amax_2d(:,:) )   a_i(:,:,jl) = a_i(:,:,jl) * rn_amax_2d(:,:) / at_i(:,:) 
     397         END DO 
     398         at_i(:,:) = SUM( a_i, dim=3 ) 
     399         ! 
    395400      ENDIF ! ln_iceini 
    396401      ! 
    397       at_i(:,:) = SUM( a_i, dim=3 ) 
    398       ! 
    399402      !---------------------------------------------- 
    400       ! 3) Snow-ice mass (case ice is fully embedded) 
     403      ! 4) Snow-ice mass (case ice is fully embedded) 
    401404      !---------------------------------------------- 
    402405      snwice_mass  (:,:) = tmask(:,:,1) * SUM( rhos * v_s(:,:,:) + rhoi * v_i(:,:,:), dim=3  )   ! snow+ice mass 
     
    448451         ENDIF 
    449452      ENDIF 
    450        
    451       !------------------------------------ 
    452       ! 4) store fields at before time-step 
    453       !------------------------------------ 
    454       ! it is only necessary for the 1st interpolation by Agrif 
    455       a_i_b  (:,:,:)   = a_i  (:,:,:) 
    456       e_i_b  (:,:,:,:) = e_i  (:,:,:,:) 
    457       v_i_b  (:,:,:)   = v_i  (:,:,:) 
    458       v_s_b  (:,:,:)   = v_s  (:,:,:) 
    459       e_s_b  (:,:,:,:) = e_s  (:,:,:,:) 
    460       sv_i_b (:,:,:)   = sv_i (:,:,:) 
    461       u_ice_b(:,:)     = u_ice(:,:) 
    462       v_ice_b(:,:)     = v_ice(:,:) 
    463       ! total concentration is needed for Lupkes parameterizations 
    464       at_i_b (:,:)     = at_i (:,:)  
    465453 
    466454!!clem: output of initial state should be written here but it is impossible because 
  • NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/src/ICE/icestp.F90

    r12919 r12988  
    202202         IF( lrst_ice )                 CALL ice_rst_write( kt )      ! -- Ice restart file  
    203203         ! 
    204          IF( ln_icectl )                CALL ice_ctl( kt )            ! -- alerts in case of model crash 
     204         IF( ln_icectl )                CALL ice_ctl( kt )            ! -- Control checks 
    205205         ! 
    206206      ENDIF   ! End sea-ice time step only 
     
    223223      !! ** purpose :   Initialize sea-ice parameters 
    224224      !!---------------------------------------------------------------------- 
    225       INTEGER :: ji, jj, ierr 
     225      INTEGER :: jl, ierr 
    226226      !!---------------------------------------------------------------------- 
    227227      IF(lwp) WRITE(numout,*) 
     
    247247      IF( ierr /= 0 )   CALL ctl_stop('STOP', 'ice_init : unable to allocate ice arrays') 
    248248      ! 
     249      !                                ! set max concentration in both hemispheres 
     250      WHERE( gphit(:,:) > 0._wp )   ;   rn_amax_2d(:,:) = rn_amax_n  ! NH 
     251      ELSEWHERE                     ;   rn_amax_2d(:,:) = rn_amax_s  ! SH 
     252      END WHERE 
     253      ! 
    249254      CALL ice_itd_init                ! ice thickness distribution initialization 
    250255      ! 
     
    252257      ! 
    253258      !                                ! Initial sea-ice state 
    254  
    255259      IF ( ln_rstart .OR. nn_iceini_file == 2 ) THEN 
    256260         CALL ice_rst_read                      ! start from a restart file 
    257261      ELSE 
    258262         CALL ice_istate_init 
    259          CALL ice_istate( nit000 )              ! start from rest: sea-ice deduced from sst 
     263         CALL ice_istate( nit000 )              ! start from rest or read a file 
    260264      ENDIF 
    261265      CALL ice_var_glo2eqv 
     
    275279      tn_ice(:,:,:) = t_su(:,:,:)      ! initialisation of surface temp for coupled simu 
    276280      ! 
    277       !                                ! set max concentration in both hemispheres 
    278       WHERE( gphit(:,:) > 0._wp )   ;   rn_amax_2d(:,:) = rn_amax_n  ! NH 
    279       ELSEWHERE                     ;   rn_amax_2d(:,:) = rn_amax_s  ! SH 
    280       END WHERE 
    281  
    282281      IF( ln_rstart )   CALL iom_close( numrir )  ! close input ice restart file 
    283282      ! 
Note: See TracChangeset for help on using the changeset viewer.