SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
modi_glt_getmlrf.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 !GLT_LIC The GELATO model is a seaice model used in stand-alone or embedded mode.
6 !GLT_LIC It has been developed by Meteo-France. The holder of GELATO is Meteo-France.
7 !GLT_LIC
8 !GLT_LIC This software is governed by the CeCILL-C license under French law and biding
9 !GLT_LIC by the rules of distribution of free software. See the CeCILL-C_V1-en.txt
10 !GLT_LIC (English) and CeCILL-C_V1-fr.txt (French) for details. The CeCILL is a free
11 !GLT_LIC software license, explicitly compatible with the GNU GPL
12 !GLT_LIC (see http://www.gnu.org/licenses/license-list.en.html#CeCILL)
13 !GLT_LIC
14 !GLT_LIC The CeCILL-C licence agreement grants users the right to modify and re-use the
15 !GLT_LIC software governed by this free software license. The exercising of this right
16 !GLT_LIC is conditional upon the obligation to make available to the community the
17 !GLT_LIC modifications made to the source code of the software so as to contribute to
18 !GLT_LIC its evolution.
19 !GLT_LIC
20 !GLT_LIC In consideration of access to the source code and the rights to copy, modify
21 !GLT_LIC and redistribute granted by the license, users are provided only with a limited
22 !GLT_LIC warranty and the software's author, the holder of the economic rights, and the
23 !GLT_LIC successive licensors only have limited liability. In this respect, the risks
24 !GLT_LIC associated with loading, using, modifying and/or developing or reproducing the
25 !GLT_LIC software by the user are brought to the user's attention, given its Free
26 !GLT_LIC Software status, which may make it complicated to use, with the result that its
27 !GLT_LIC use is reserved for developers and experienced professionals having in-depth
28 !GLT_LIC computer knowledge. Users are therefore encouraged to load and test the
29 !GLT_LIC suitability of the software as regards their requirements in conditions enabling
30 !GLT_LIC the security of their systems and/or data to be ensured and, more generally, to
31 !GLT_LIC use and operate it in the same conditions of security.
32 !GLT_LIC
33 !GLT_LIC The GELATO sofware is cureently distibuted with the SURFEX software, available at
34 !GLT_LIC http://www.cnrm.meteo.fr/surfex. The fact that you download the software deemed that
35 !GLT_LIC you had knowledge of the CeCILL-C license and that you accept its terms.
36 !GLT_LIC Attempts to use this software in a way not complying with CeCILL-C license
37 !GLT_LIC may lead to prosecution.
38 !GLT_LIC
39 ! =======================================================================
40 ! ========================= MODULE modi_glt_getmlrf =========================
41 ! =======================================================================
42 !
43 ! This routine was created for Gelato version 3, i.e. Gelato is under the
44 ! form of a routine inserted in the OPA 8 code.
45 ! It allows Gelato to get the needed forcing from the main routine input
46 ! mixed layer fields.
47 !
48 ! Author D. Salas y Melia, 10/99
49 !
50 !
51 ! --------------------- BEGIN MODULE modi_glt_getmlrf -----------------------
52 
53 !THXS_SFX!MODULE modi_glt_getmlrf
54 !THXS_SFX!INTERFACE
55 !THXS_SFX!
56 !THXS_SFX!SUBROUTINE glt_getmlrf( tpoce_all,tpml )
57 !THXS_SFX! USE modd_types_glt
58 !THXS_SFX! USE modd_glt_param
59 !THXS_SFX! TYPE(t_mxl), DIMENSION(nx,ny), INTENT(in) :: &
60 !THXS_SFX! tpoce_all
61 !THXS_SFX! TYPE(t_mxl), DIMENSION(nx,ny), INTENT(out) :: &
62 !THXS_SFX! tpml
63 !THXS_SFX!END SUBROUTINE glt_getmlrf
64 !THXS_SFX!
65 !THXS_SFX!END INTERFACE
66 !THXS_SFX!END MODULE modi_glt_getmlrf
67 
68 ! ---------------------- END MODULE modi_glt_getmlrf ------------------------
69 
70 
71 
72 ! -----------------------------------------------------------------------
73 ! ----------------------- SUBROUTINE glt_getmlrf ----------------------------
74 
75 SUBROUTINE glt_getmlrf( tpoce_all,tpml )
76  USE modd_types_glt
78  USE modd_glt_param
81 #if ! defined in_surfex
82  USE mode_gltools_bound
83 #endif
85 !
86  IMPLICIT NONE
87 !
88  TYPE(t_mxl), DIMENSION(nx,ny), INTENT(in) :: &
89  tpoce_all
90  TYPE(t_mxl), DIMENSION(nx,ny), INTENT(out) :: &
91  tpml
92 !
93 !.. Recreate ocean type variable (see definition in dmod_types.f90)
94 !
95  tpml(:,:)%qoc = tpoce_all(:,:)%qoc
96  tpml(:,:)%sml = tpoce_all(:,:)%sml
97  tpml(:,:)%ssh = tpoce_all(:,:)%ssh
98  tpml(:,:)%tml = tpoce_all(:,:)%tml - t0deg ! in C
99  tpml(:,:)%mlf = glt_swfrzt2d( tpoce_all(:,:)%sml )
100  tpml(:,:)%qml = tpoce_all(:,:)%qml
101  tpml(:,:)%hco = cpsw * tpml(:,:)%tml
102 !
103 ! .. Special treatment for vectors... Just in case !
104 !
105  tpml(:,:)%uml = tpoce_all(:,:)%uml
106  tpml(:,:)%vml = tpoce_all(:,:)%vml
107 #if ! defined in_surfex
108  CALL gltools_bound( 'U','vector',tpml(:,:)%uml )
109  CALL gltools_bound( 'V','vector',tpml(:,:)%vml )
110 #endif
111 !
112 END SUBROUTINE glt_getmlrf
113 
114 ! --------------------- END SUBROUTINE glt_getmlrf --------------------------
115 ! -----------------------------------------------------------------------
subroutine glt_getmlrf(tpoce_all, tpml)