flo_oce.F90 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. MODULE flo_oce
  2. !!======================================================================
  3. !! *** MODULE flo_oce ***
  4. !! lagrangian floats : define in memory all floats parameters and variables
  5. !!======================================================================
  6. !! History : OPA ! 1999-10 (CLIPPER projet)
  7. !! NEMO 1.0 ! 2002-11 (G. Madec, A. Bozec) F90: Free form and module
  8. !!----------------------------------------------------------------------
  9. #if defined key_floats || defined key_esopa
  10. !!----------------------------------------------------------------------
  11. !! 'key_floats' drifting floats
  12. !!----------------------------------------------------------------------
  13. USE par_oce ! ocean parameters
  14. USE in_out_manager ! I/O manager
  15. USE lib_mpp ! MPP library
  16. IMPLICIT NONE
  17. PUBLIC
  18. PUBLIC flo_oce_alloc ! Routine called in floats.F90
  19. LOGICAL, PUBLIC, PARAMETER :: lk_floats = .TRUE. !: float flag
  20. !! float parameters
  21. !! ----------------
  22. INTEGER, PUBLIC :: jpnfl !: total number of floats during the run
  23. INTEGER, PUBLIC :: jpnnewflo !: number of floats added in a new run
  24. INTEGER, PUBLIC :: jpnrstflo !: number of floats for the restart
  25. !! float variables
  26. !! ---------------
  27. INTEGER , PUBLIC, ALLOCATABLE, DIMENSION(:) :: nisobfl !: =0 for a isobar float , =1 for a float following the w velocity
  28. INTEGER , PUBLIC, ALLOCATABLE, DIMENSION(:) :: ngrpfl !: number to identify searcher group
  29. INTEGER , PUBLIC, ALLOCATABLE, DIMENSION(:) :: nfloat !: number to identify searcher group
  30. REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:) :: flxx , flyy , flzz !: long, lat, depth of float (decimal degree, m >0)
  31. REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:) :: tpifl, tpjfl, tpkfl !: (i,j,k) indices of float position
  32. REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: wb !: vertical velocity at previous time step (m s-1).
  33. ! !! * namelist namflo : langrangian floats *
  34. LOGICAL, PUBLIC :: ln_rstflo !: T/F float restart
  35. LOGICAL, PUBLIC :: ln_argo !: T/F argo type floats
  36. LOGICAL, PUBLIC :: ln_flork4 !: T/F 4th order Runge-Kutta
  37. LOGICAL, PUBLIC :: ln_ariane !: handle ariane input/output convention
  38. LOGICAL, PUBLIC :: ln_flo_ascii !: write in ascii (T) or in Netcdf (F)
  39. INTEGER, PUBLIC :: nn_writefl !: frequency of float output file
  40. INTEGER, PUBLIC :: nn_stockfl !: frequency of float restart file
  41. !!----------------------------------------------------------------------
  42. !! NEMO/OPA 4.0 , NEMO Consortium (2011)
  43. !! $Id: flo_oce.F90 4147 2013-11-04 11:51:55Z cetlod $
  44. !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
  45. !!----------------------------------------------------------------------
  46. CONTAINS
  47. INTEGER FUNCTION flo_oce_alloc()
  48. !!----------------------------------------------------------------------
  49. !! *** FUNCTION flo_oce_alloc ***
  50. !!----------------------------------------------------------------------
  51. ALLOCATE( wb(jpi,jpj,jpk) , nfloat(jpnfl) , nisobfl(jpnfl) , ngrpfl(jpnfl) , &
  52. flxx(jpnfl) , flyy(jpnfl) , flzz(jpnfl) , &
  53. tpifl(jpnfl) , tpjfl(jpnfl) , tpkfl(jpnfl) , STAT=flo_oce_alloc )
  54. !
  55. IF( lk_mpp ) CALL mpp_sum ( flo_oce_alloc )
  56. IF( flo_oce_alloc /= 0 ) CALL ctl_warn('flo_oce_alloc: failed to allocate arrays')
  57. END FUNCTION flo_oce_alloc
  58. #else
  59. !!----------------------------------------------------------------------
  60. !! Default option : NO drifting floats
  61. !!----------------------------------------------------------------------
  62. LOGICAL, PUBLIC, PARAMETER :: lk_floats = .FALSE. !: float flag
  63. #endif
  64. !!======================================================================
  65. END MODULE flo_oce