SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
prep_ocean_unif.F90
Go to the documentation of this file.
1 !SFX_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier
2 !SFX_LIC This is part of the SURFEX software governed by the CeCILL-C licence
3 !SFX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
4 !SFX_LIC for details. version 1.
5 ! #########
6 SUBROUTINE prep_ocean_unif(KLUOUT,HSURF,PFIELD)
7 ! #################################################################################
8 !
9 !!**** *PREP_OCEAN_UNIF* - prepares oceanic field from prescribed values
10 !!
11 !! PURPOSE
12 !! -------
13 !
14 !!** METHOD
15 !! ------
16 !!
17 !! REFERENCE
18 !! ---------
19 !!
20 !!
21 !! AUTHOR
22 !! ------
23 !! C. Lebeaupin Brossier
24 !!
25 !! MODIFICATIONS
26 !! -------------
27 !! Original 01/2008
28 !!------------------------------------------------------------------
29 !
30 
31 !
32 USE modd_csts, ONLY : xtt
33 USE modd_prep, ONLY : cinterp_type
34 USE modd_prep_seaflux, ONLY : xsst_unif
37 !
38 !
39 USE yomhook ,ONLY : lhook, dr_hook
40 USE parkind1 ,ONLY : jprb
41 !
42 IMPLICIT NONE
43 !
44 !* 0.1 declarations of arguments
45 !
46 INTEGER, INTENT(IN) :: kluout ! output listing logical unit
47  CHARACTER(LEN=7), INTENT(IN) :: hsurf ! type of field
48 REAL, POINTER, DIMENSION(:,:,:) :: pfield ! field to interpolate horizontally
49 !
50 !* 0.2 declarations of local variables
51 REAL :: zsss_unif=37.6
52 REAL :: zgradt,zgrads
53 INTEGER :: jlev
54 REAL(KIND=JPRB) :: zhook_handle
55 !
56 !
57 !-------------------------------------------------------------------------------------
58 !
59 IF (lhook) CALL dr_hook('PREP_OCEAN_UNIF',0,zhook_handle)
60 SELECT CASE(hsurf)
61 !
62 !* 3.1 oceanic temperature
63 !
64  CASE('TEMP_OC')
65  zgradt=1.2/1000.
66  ALLOCATE(pfield(1,nockmax-nockmin+1,1))
67  pfield(:,1,:) = xsst_unif-xtt
68  DO jlev=1,nockmax
69  pfield(:,jlev+1,:) = xsst_unif-xtt-zgradt*(xzhoc(jlev)+1)
70  ENDDO
71 !
72 !* 3.2 oceanic salinity
73 !
74  CASE('SALT_OC')
75  zgrads=-0.5/1000.
76  ALLOCATE(pfield(1,nockmax-nockmin+1,1))
77  pfield(:,1,:) = zsss_unif
78  DO jlev=1,nockmax
79  pfield(:,jlev+1,:) = zsss_unif+zgrads*(xzhoc(jlev)+1)
80  ENDDO
81 !
82 !* 3.3 oceanic currents
83 !
84  CASE('UCUR_OC')
85  ALLOCATE(pfield(1,nockmax-nockmin+1,1))
86  pfield = 0.
87 !
88  CASE('VCUR_OC')
89  ALLOCATE(pfield(1,nockmax-nockmin+1,1))
90  pfield = 0.
91 !
92 END SELECT
93 !
94 !* 4. Interpolation method
95 ! --------------------
96 !
97  cinterp_type='UNIF '
98 IF (lhook) CALL dr_hook('PREP_OCEAN_UNIF',1,zhook_handle)
99 !
100 !
101 !-------------------------------------------------------------------------------------
102 END SUBROUTINE prep_ocean_unif
subroutine prep_ocean_unif(KLUOUT, HSURF, PFIELD)