ROMS
Loading...
Searching...
No Matches
ana_dqdsst.h
Go to the documentation of this file.
1!!
2 SUBROUTINE ana_dqdsst (ng, tile, model)
3!
4!! git $Id$
5!!======================================================================
6!! Copyright (c) 2002-2025 The ROMS Group !
7!! Licensed under a MIT/X style license !
8!! See License_ROMS.md !
9!=======================================================================
10! !
11! This subroutine sets surface net heat flux sensitivity dQdSTT to !
12! SST using analytical expressions. The forcing dQdSTT is usually !
13! computed in units of (Watts/m2/degC). It needs to be scaled to !
14! (m/s/degC) by dividing by rho0*Cp. This field is used when the !
15! surface heat flux correction is activated: !
16! !
17! Q_model ~ Q + dQdSST * (T_model - SST) !
18! !
19!=======================================================================
20!
21 USE mod_param
22 USE mod_forces
23 USE mod_grid
24 USE mod_ncparam
25!
26! Imported variable declarations.
27!
28 integer, intent(in) :: ng, tile, model
29!
30! Local variable declarations.
31!
32 character (len=*), parameter :: MyFile = &
33 & __FILE__
34!
35#include "tile.h"
36!
37 CALL ana_dqdsst_tile (ng, tile, model, &
38 & lbi, ubi, lbj, ubj, &
39 & imins, imaxs, jmins, jmaxs, &
40 & grid(ng) % Hz, &
41 & forces(ng) % dqdt)
42!
43! Set analytical header file name used.
44!
45#ifdef DISTRIBUTE
46 IF (lanafile) THEN
47#else
48 IF (lanafile.and.(tile.eq.0)) THEN
49#endif
50 ananame(38)=myfile
51 END IF
52!
53 RETURN
54 END SUBROUTINE ana_dqdsst
55!
56!***********************************************************************
57 SUBROUTINE ana_dqdsst_tile (ng, tile, model, &
58 & LBi, UBi, LBj, UBj, &
59 & IminS, ImaxS, JminS, JmaxS, &
60 & Hz, dqdt)
61!***********************************************************************
62!
63 USE mod_param
64 USE mod_grid
65 USE mod_scalars
66!
68#ifdef DISTRIBUTE
70#endif
71!
72! Imported variable declarations.
73!
74 integer, intent(in) :: ng, tile, model
75 integer, intent(in) :: LBi, UBi, LBj, UBj
76 integer, intent(in) :: IminS, ImaxS, JminS, JmaxS
77!
78#ifdef ASSUMED_SHAPE
79 real(r8), intent(in) :: Hz(LBi:,LBj:,:)
80 real(r8), intent(out) :: dqdt(LBi:,LBj:)
81#else
82 real(r8), intent(in) :: Hz(LBi:UBi,LBj:UBj,1:N(ng))
83 real(r8), intent(out) :: dqdt(LBi:UBi,LBj:UBj)
84#endif
85!
86! Local variable declarations.
87!
88 integer :: i, j
89!
90 real(r8) :: fac
91
92#include "set_bounds.h"
93!
94!-----------------------------------------------------------------------
95! Set surface heat flux sensitivity to SST (m/s/degC).
96!-----------------------------------------------------------------------
97!
98#ifdef MY_APPLICATION
99 fac=day2sec/30.0_r8 ! 30 day relaxation scale 1/s/decC
100 DO j=jstrt,jendt
101 DO i=istrt,iendt
102 dqdt(i,j)=fac*hz(i,j,n(ng))
103 END DO
104 END DO
105#else
106 DO j=jstrt,jendt
107 DO i=istrt,iendt
108 dqdt(i,j)=???
109 END DO
110 END DO
111#endif
112!
113! Exchange boundary data.
114!
115 IF (ewperiodic(ng).or.nsperiodic(ng)) THEN
116 CALL exchange_r2d_tile (ng, tile, &
117 & lbi, ubi, lbj, ubj, &
118 & dqdt)
119 END IF
120
121#ifdef DISTRIBUTE
122 CALL mp_exchange2d (ng, tile, model, 1, &
123 & lbi, ubi, lbj, ubj, &
124 & nghostpoints, &
125 & ewperiodic(ng), nsperiodic(ng), &
126 & dqdt)
127#endif
128!
129 RETURN
130 END SUBROUTINE ana_dqdsst_tile
subroutine ana_dqdsst(ng, tile, model)
Definition ana_dqdsst.h:3
subroutine ana_dqdsst_tile(ng, tile, model, lbi, ubi, lbj, ubj, imins, imaxs, jmins, jmaxs, hz, dqdt)
Definition ana_dqdsst.h:61
subroutine exchange_r2d_tile(ng, tile, lbi, ubi, lbj, ubj, a)
type(t_forces), dimension(:), allocatable forces
Definition mod_forces.F:554
type(t_grid), dimension(:), allocatable grid
Definition mod_grid.F:365
logical lanafile
character(len=256), dimension(39) ananame
integer nghostpoints
Definition mod_param.F:710
real(dp), parameter day2sec
logical, dimension(:), allocatable ewperiodic
logical, dimension(:), allocatable nsperiodic
subroutine mp_exchange2d(ng, tile, model, nvar, lbi, ubi, lbj, ubj, nghost, ew_periodic, ns_periodic, a, b, c, d)