ROMS
Loading...
Searching...
No Matches
ad_post_initial.F
Go to the documentation of this file.
1
#include "cppdefs.h"
2
MODULE
ad_post_initial_mod
3
#ifdef ADJOINT
4
!
5
!git $Id$
6
!svn $Id$
7
!================================================== Hernan G. Arango ===
8
! Copyright (c) 2002-2025 The ROMS Group !
9
! Licensed under a MIT/X style license !
10
! See License_ROMS.md !
11
!=======================================================================
12
! !
13
! On the last timestep, it computes the adjoint of initial depths and !
14
! level thicknesses from the initial free-surface field. Additionally,!
15
! it initializes the adjoint state variables for all time levels and !
16
! and applies lateral boundary conditions. !
17
! !
18
!=======================================================================
19
!
20
USE
mod_param
21
USE
mod_parallel
22
# ifdef NESTING
23
USE
mod_scalars
24
# endif
25
!
26
USE
ini_fields_mod
,
ONLY
:
set_zeta_timeavg
27
# ifdef SOLVE3D
28
USE
set_depth_mod
,
ONLY
:
set_depth
29
# endif
30
USE
ad_ini_fields_mod
,
ONLY
:
ad_ini_fields
,
ad_ini_zeta
31
# ifdef SOLVE3D
32
USE
ad_set_depth_mod
,
ONLY
:
ad_set_depth
33
# endif
34
!
35
implicit none
36
!
37
PUBLIC
::
ad_post_initial
38
PRIVATE
39
!
40
CONTAINS
41
!
42
!***********************************************************************
43
SUBROUTINE
ad_post_initial
(ng, model)
44
!***********************************************************************
45
!
46
! Imported variable declarations.
47
!
48
integer
,
intent(in)
:: ng, model
49
!
50
! Local variable declarations.
51
!
52
integer
:: tile
53
54
# ifdef NESTING
55
!
56
!-----------------------------------------------------------------------
57
! Extract donor grid initial data at contact points and store it in
58
! REFINED structure so it can be used for the space-time interpolation.
59
!-----------------------------------------------------------------------
60
!
61
IF
(
refinedgrid
(ng))
THEN
62
CALL
ad_nesting (ng, model, ngetd)
63
END IF
64
# endif
65
!
66
!-----------------------------------------------------------------------
67
! Initialize other state variables.
68
!-----------------------------------------------------------------------
69
!
70
DO
tile=
last_tile
(ng),
first_tile
(ng),-1
71
CALL
ad_ini_fields
(ng, tile, model)
72
END DO
73
!$OMP BARRIER
74
!
75
!-----------------------------------------------------------------------
76
! Initialize free-surface and compute initial level thicknesses and
77
! depths. Here we need nonlinear 'Zt_avg1' and 'Hz' to compute initial
78
! 'ad_ubar' and 'ad_vbar'.
79
!-----------------------------------------------------------------------
80
!
81
DO
tile=
first_tile
(ng),
last_tile
(ng),+1
82
CALL
set_zeta_timeavg
(ng, tile,
inlm
)
83
CALL
set_depth
(ng, tile,
inlm
)
84
CALL
ad_set_depth
(ng, tile, model)
85
CALL
ad_ini_zeta
(ng, tile, model)
86
END DO
87
!$OMP BARRIER
88
!
89
RETURN
90
END SUBROUTINE
ad_post_initial
91
#endif
92
END MODULE
ad_post_initial_mod
ad_ini_fields_mod
Definition
ad_ini_fields.F:2
ad_ini_fields_mod::ad_ini_fields
subroutine, public ad_ini_fields(ng, tile, model)
Definition
ad_ini_fields.F:67
ad_ini_fields_mod::ad_ini_zeta
subroutine, public ad_ini_zeta(ng, tile, model)
Definition
ad_ini_fields.F:971
ad_post_initial_mod
Definition
ad_post_initial.F:2
ad_post_initial_mod::ad_post_initial
subroutine, public ad_post_initial(ng, model)
Definition
ad_post_initial.F:44
ad_set_depth_mod
Definition
ad_set_depth.F:2
ad_set_depth_mod::ad_set_depth
subroutine, public ad_set_depth(ng, tile, model)
Definition
ad_set_depth.F:36
ini_fields_mod
Definition
ini_fields.F:2
ini_fields_mod::set_zeta_timeavg
subroutine, public set_zeta_timeavg(ng, tile, model)
Definition
ini_fields.F:986
mod_parallel
Definition
mod_parallel.F:2
mod_parallel::first_tile
integer, dimension(:), allocatable first_tile
Definition
mod_parallel.F:62
mod_parallel::last_tile
integer, dimension(:), allocatable last_tile
Definition
mod_parallel.F:63
mod_param
Definition
mod_param.F:2
mod_param::inlm
integer, parameter inlm
Definition
mod_param.F:662
mod_scalars
Definition
mod_scalars.F:2
mod_scalars::refinedgrid
logical, dimension(:), allocatable refinedgrid
Definition
mod_scalars.F:494
set_depth_mod
Definition
set_depth.F:2
set_depth_mod::set_depth
subroutine, public set_depth(ng, tile, model)
Definition
set_depth.F:34
ROMS
Adjoint
ad_post_initial.F
Generated by
1.12.0