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 13334 for NEMO/branches/2020/dev_r13312_AGRIF-03-04_jchanut_vinterp_tstep/src/NST/agrif_ice_interp.F90 – NEMO

Ignore:
Timestamp:
2020-07-22T16:20:32+02:00 (4 years ago)
Author:
jchanut
Message:

finish bypassing ocean/ice initialization with AGRIF, #2222, #2129

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r13312_AGRIF-03-04_jchanut_vinterp_tstep/src/NST/agrif_ice_interp.F90

    r13286 r13334  
    2525   USE agrif_oce 
    2626   USE phycst , ONLY: rt0 
     27   USE icevar 
     28   USE sbc_ice, ONLY : tn_ice 
    2729    
    2830   IMPLICIT NONE 
     
    3032 
    3133   PUBLIC   agrif_interp_ice   ! called by agrif_user.F90 
    32    PUBLIC   interp_tra_ice, interp_u_ice, interp_v_ice  ! called by iceistate.F90 
     34   PUBLIC   agrif_istate_ice   ! called by icerst.F90 
    3335 
    3436   !!---------------------------------------------------------------------- 
     
    3941 
    4042CONTAINS 
     43 
     44   SUBROUTINE agrif_istate_ice 
     45      !!----------------------------------------------------------------------- 
     46      !!                 *** ROUTINE agrif_istate_ice  *** 
     47      !! 
     48      !!  ** Method  : Set initial ice fields from parent grid 
     49      !! 
     50      !!----------------------------------------------------------------------- 
     51      IF(lwp) WRITE(numout,*) ' ' 
     52      IF(lwp) WRITE(numout,*) 'Agrif_istate_ice : interp child ice initial state from parent' 
     53      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~~~' 
     54      IF(lwp) WRITE(numout,*) ' ' 
     55 
     56      ! Set a_i, v_i, v_s, sv_i, oa_i, a_ip, v_ip, t_su, e_s, e_i: 
     57      Agrif_SpecialValue    = -9999. 
     58      Agrif_UseSpecialValue = .TRUE. 
     59      CALL Agrif_init_variable(tra_iceini_id,procname=interp_tra_ice) 
     60      ! 
     61      ! Set u_ice, v_ice: 
     62      use_sign_north = .TRUE. 
     63      sign_north = -1. 
     64      Agrif_UseSpecialValue = .TRUE. 
     65      CALL Agrif_init_variable(u_iceini_id  ,procname=interp_u_ice) 
     66      CALL Agrif_init_variable(v_iceini_id  ,procname=interp_v_ice) 
     67      Agrif_SpecialValue = 0._wp 
     68      use_sign_north = .FALSE. 
     69      Agrif_UseSpecialValue = .FALSE. 
     70      ! lbc ???? 
     71      ! JC: do we really need the 3 lines below ? 
     72      CALL ice_var_glo2eqv 
     73      CALL ice_var_zapsmall 
     74      CALL ice_var_agg(2) 
     75 
     76      ! Melt ponds 
     77      WHERE( a_i > epsi10 ) 
     78         a_ip_frac(:,:,:) = a_ip(:,:,:) / a_i(:,:,:) 
     79      ELSEWHERE 
     80         a_ip_frac(:,:,:) = 0._wp 
     81      END WHERE 
     82      WHERE( a_ip > 0._wp )       ! ???????     
     83         h_ip(:,:,:) = v_ip(:,:,:) / a_ip(:,:,:) 
     84      ELSEWHERE 
     85         h_ip(:,:,:) = 0._wp 
     86      END WHERE    
     87 
     88      tn_ice(:,:,:) = t_su(:,:,:) 
     89      t1_ice(:,:,:) = t_i (:,:,1,:)  
     90 
     91   END SUBROUTINE agrif_istate_ice 
    4192 
    4293   SUBROUTINE agrif_interp_ice( cd_type, kiter, kitermax ) 
Note: See TracChangeset for help on using the changeset viewer.