forked from MetOffice/lfric_apps
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjules_seaice_diags_mod.x90
More file actions
71 lines (53 loc) · 3.07 KB
/
Copy pathjules_seaice_diags_mod.x90
File metadata and controls
71 lines (53 loc) · 3.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
!-------------------------------------------------------------------------------
! (c) Crown copyright 2021 Met Office. All rights reserved.
! The file LICENCE, distributed with this code, contains details of the terms
! under which the code may be used.
!-------------------------------------------------------------------------------
!> @brief Processes diagnostics for jules_extra_alg
module jules_seaice_diags_mod
use field_mod, only: field_type
use timing_mod, only: start_timing, stop_timing, tik, LPROF
use jules_control_init_mod, only: first_sea_ice_tile, &
n_sea_ice_tile
implicit none
private
public :: output_diags_for_jules_seaice
contains
!> @brief Output diagnostics from jules_extra_alg
!> @param[in] tile_fraction Fraction of surface tiles
!> @param[in] sea_ice_thickness Sea ice thickness
!> @param[in] sea_ice_temperature Sea ice layer temperature
!> @param[in] sea_ice_conductivity Sea ice conductivity
!> @param[in] sea_ice_pensolar Penetrating solar radiation into sea ice
!> @param[in] melt_pond_fraction Melt pond fraction
!> @param[in] melt_pond_depth Melt pond depth
subroutine output_diags_for_jules_seaice(tile_fraction, sea_ice_thickness, &
sea_ice_temperature, sea_ice_conductivity, &
sea_ice_pensolar, melt_pond_fraction, &
melt_pond_depth)
use sci_multi_extract_kernel_mod, only: multi_extract_kernel_type
implicit none
! Prognostic fields to output
type( field_type ), intent(in) :: tile_fraction, sea_ice_thickness, &
sea_ice_temperature, sea_ice_conductivity, &
sea_ice_pensolar, melt_pond_fraction, &
melt_pond_depth
! Diagnostics locally computed here from other fields
type( field_type ) :: sea_ice_fraction
integer( tik ) :: id
if ( LPROF ) call start_timing( id, 'diags.jules_seaice' )
! Prognostic fields
call sea_ice_thickness%write_field('seaice__sea_ice_thickness')
call sea_ice_temperature%write_field('seaice__sea_ice_temperature')
call sea_ice_conductivity%write_field('seaice__sea_ice_conductivity')
call sea_ice_pensolar%write_field('seaice__sea_ice_pensolar')
call melt_pond_fraction%write_field('seaice__melt_pond_fraction')
call melt_pond_depth%write_field('seaice__melt_pond_depth')
! Get sea ice fraction from tile fraction
call sea_ice_thickness%copy_field_properties(sea_ice_fraction)
call invoke(multi_extract_kernel_type(sea_ice_fraction, tile_fraction, &
first_sea_ice_tile, n_sea_ice_tile))
call sea_ice_fraction%write_field('seaice__sea_ice_fraction')
if ( LPROF ) call stop_timing( id, 'diags.jules_seaice' )
end subroutine output_diags_for_jules_seaice
end module jules_seaice_diags_mod