ROMS
Loading...
Searching...
No Matches
ana_tair.h
Go to the documentation of this file.
1!!
2 SUBROUTINE ana_tair (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 routine sets surface air temperature (degC) using an !
12! analytical expression. !
13! !
14!=======================================================================
15!
16 USE mod_param
17 USE mod_forces
18 USE mod_ncparam
19!
20! Imported variable declarations.
21!
22 integer, intent(in) :: ng, tile, model
23!
24! Local variable declarations.
25!
26 character (len=*), parameter :: MyFile = &
27 & __FILE__
28!
29#include "tile.h"
30!
31 CALL ana_tair_tile (ng, tile, model, &
32 & lbi, ubi, lbj, ubj, &
33 & imins, imaxs, jmins, jmaxs, &
34 & forces(ng) % Tair)
35!
36! Set analytical header file name used.
37!
38#ifdef DISTRIBUTE
39 IF (lanafile) THEN
40#else
41 IF (lanafile.and.(tile.eq.0)) THEN
42#endif
43 ananame(32)=myfile
44 END IF
45!
46 RETURN
47 END SUBROUTINE ana_tair
48!
49!***********************************************************************
50 SUBROUTINE ana_tair_tile (ng, tile, model, &
51 & LBi, UBi, LBj, UBj, &
52 & IminS, ImaxS, JminS, JmaxS, &
53 & Tair)
54!***********************************************************************
55!
56 USE mod_param
57 USE mod_scalars
58!
60#ifdef DISTRIBUTE
62#endif
63!
64! Imported variable declarations.
65!
66 integer, intent(in) :: ng, tile, model
67 integer, intent(in) :: LBi, UBi, LBj, UBj
68 integer, intent(in) :: IminS, ImaxS, JminS, JmaxS
69!
70#ifdef ASSUMED_SHAPE
71 real(r8), intent(out) :: Tair(LBi:,LBj:)
72#else
73 real(r8), intent(out) :: Tair(LBi:UBi,LBj:UBj)
74#endif
75!
76! Local variable declarations.
77!
78 integer :: i, j
79
80#include "set_bounds.h"
81!
82!-----------------------------------------------------------------------
83! Set analytical surface air temperature (degC).
84!-----------------------------------------------------------------------
85!
86#if defined BENCHMARK
87 DO j=jstrt,jendt
88 DO i=istrt,iendt
89 tair(i,j)=4.0_r8
90 END DO
91 END DO
92#elif defined BL_TEST
93 DO j=jstrt,jendt
94 DO i=istrt,iendt
95 tair(i,j)=23.567_r8
96 END DO
97 END DO
98#else
99 ana_tair.h: no values provided for tair.
100#endif
101!
102! Exchange boundary data.
103!
104 IF (ewperiodic(ng).or.nsperiodic(ng)) THEN
105 CALL exchange_r2d_tile (ng, tile, &
106 & lbi, ubi, lbj, ubj, &
107 & tair)
108 END IF
109
110#ifdef DISTRIBUTE
111 CALL mp_exchange2d (ng, tile, model, 1, &
112 & lbi, ubi, lbj, ubj, &
113 & nghostpoints, &
114 & ewperiodic(ng), nsperiodic(ng), &
115 & tair)
116#endif
117!
118 RETURN
119 END SUBROUTINE ana_tair_tile
subroutine ana_tair_tile(ng, tile, model, lbi, ubi, lbj, ubj, imins, imaxs, jmins, jmaxs, tair)
Definition ana_tair.h:54
subroutine ana_tair(ng, tile, model)
Definition ana_tair.h:3
subroutine exchange_r2d_tile(ng, tile, lbi, ubi, lbj, ubj, a)
type(t_forces), dimension(:), allocatable forces
Definition mod_forces.F:554
logical lanafile
character(len=256), dimension(39) ananame
integer nghostpoints
Definition mod_param.F:710
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)