agrif_ice.F90 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. MODULE agrif_ice
  2. !!======================================================================
  3. !! *** MODULE agrif_ice ***
  4. !! AGRIF : define in memory AGRIF variables for sea-ice
  5. !!----------------------------------------------------------------------
  6. !! History : 3.4 ! 2012-08 (R. Benshila) Original code
  7. !!----------------------------------------------------------------------
  8. #if defined key_agrif && defined key_lim2
  9. !!----------------------------------------------------------------------
  10. !! 'key_agrif' AGRIF zoom
  11. !!----------------------------------------------------------------------
  12. USE par_oce ! ocean parameters
  13. IMPLICIT NONE
  14. PRIVATE
  15. PUBLIC agrif_ice_alloc ! routine called by nemo_init in nemogcm.F90
  16. INTEGER, PUBLIC :: u_ice_id, v_ice_id, adv_ice_id
  17. REAL(wp), PUBLIC :: lim_nbstep = 0. ! child time position in sea-ice model
  18. #if defined key_lim2_vp
  19. REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:) :: u_ice_nst, v_ice_nst
  20. #else
  21. REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:,:) :: u_ice_oe, u_ice_sn !: boundaries arrays
  22. REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:,:) :: v_ice_oe, v_ice_sn !: " "
  23. #endif
  24. REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:,:,:) :: adv_ice_oe, adv_ice_sn !: " "
  25. !!----------------------------------------------------------------------
  26. !! NEMO/NST 3.3.4 , NEMO Consortium (2012)
  27. !! $Id: agrif_ice.F90 3680 2012-11-27 14:42:24Z rblod $
  28. !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
  29. !!----------------------------------------------------------------------
  30. CONTAINS
  31. INTEGER FUNCTION agrif_ice_alloc()
  32. !!----------------------------------------------------------------------
  33. !! *** FUNCTION agrif_ice_alloc ***
  34. !!----------------------------------------------------------------------
  35. #if defined key_lim2_vp
  36. ALLOCATE( u_ice_nst(jpi,jpj), v_ice_nst(jpi,jpj) , &
  37. #else
  38. ALLOCATE( u_ice_oe(4,jpj,2) , v_ice_oe(4,jpj,2) , &
  39. & u_ice_sn(jpi,4,2) , v_ice_sn(jpi,4,2) , &
  40. #endif
  41. & adv_ice_oe (4,jpj,7,2) , adv_ice_sn (jpi,4,7,2) , &
  42. & STAT = agrif_ice_alloc)
  43. #if ! defined key_lim2_vp
  44. u_ice_oe(:,:,:) = 0.e0
  45. v_ice_oe(:,:,:) = 0.e0
  46. u_ice_sn(:,:,:) = 0.e0
  47. v_ice_sn(:,:,:) = 0.e0
  48. #endif
  49. adv_ice_oe (:,:,:,:) = 0.e0
  50. adv_ice_sn (:,:,:,:) = 0.e0
  51. !
  52. END FUNCTION agrif_ice_alloc
  53. #endif
  54. !!======================================================================
  55. END MODULE agrif_ice