/[lmdze]/trunk/dyn3d/fxhyp.f
ViewVC logotype

Log of /trunk/dyn3d/fxhyp.f

Parent Directory Parent Directory | Revision Log Revision Log


Sticky Revision:
(Current path doesn't exist after revision 276)

Revision 265 - (view) (annotate) - [select for diffs]
Modified Tue Mar 20 09:35:59 2018 UTC (6 years, 1 month ago) by guez
File length: 5434 byte(s)
Diff to previous 254
Rename module dimens_m to dimensions.

Revision 254 - (view) (annotate) - [select for diffs]
Modified Mon Feb 5 10:39:38 2018 UTC (6 years, 2 months ago) by guez
File length: 5432 byte(s)
Diff to previous 167
Move Sources/* to root directory.

Revision 167 - (view) (annotate) - [select for diffs]
Modified Mon Aug 24 16:30:33 2015 UTC (8 years, 8 months ago) by guez
Original Path: trunk/Sources/dyn3d/fxhyp.f
File length: 5432 byte(s)
Diff to previous 156
Added program test_inifilr.

Encapsulated ppm3d into a module and added implicit none. Removed
unused argument dum.

Encountered a problem in procedure invert_zoom_x. With grossismx=2.9,
DZOOMX=0.3, taux=5, for xuv = -0.25, for i = 1, rtsafe fails because
fval is about 1e-16 instead of 0 at xval = pi. So distinguished the
cases abs_y = 0 or pi. Needed then to add argument beta to
invert_zoom_x.

Moved the output of eignvalues of differentiation matrix from inifilr
to inifgn, where they are computed.

Simpler definition of j1 in inifilr.


Revision 156 - (view) (annotate) - [select for diffs]
Modified Thu Jul 16 17:39:10 2015 UTC (8 years, 9 months ago) by guez
Original Path: trunk/Sources/dyn3d/fxhyp.f
File length: 5380 byte(s)
Diff to previous 151
In procedure cltracrn, no need for local variable zx_trs, use directly
local_trs.

In (re)startphy.nc, agglomerate variables for different surface types
into a single variable with an added dimension.

In phyredem, bring together all definitions, do not use redef.


Revision 151 - (view) (annotate) - [select for diffs]
Modified Tue Jun 23 15:14:20 2015 UTC (8 years, 10 months ago) by guez
Original Path: trunk/Sources/dyn3d/fxhyp.f
File length: 5004 byte(s)
Diff to previous 148
In procedure inifilr, only a part of the arrays modfrstu and modfrstv
were defined. Split these into 4 arrays that are fully defined and
used: modfrst[ns][uv].

Clarified the logic for the computation of jfilt[ns][uv]. Changed the
initial value of the search so that the initial values for northern
hemisphere and southern hemisphere cannot be the same.

Clarified the logic for the computation of modfrst[ns][uv]: removed
the cycle and exit instructions.


Revision 148 - (view) (annotate) - [select for diffs]
Modified Wed Jun 17 16:40:24 2015 UTC (8 years, 10 months ago) by guez
Original Path: trunk/Sources/dyn3d/fxhyp.f
File length: 5004 byte(s)
Diff to previous 147
Renamed variables in fxhyp and invert_zoom_x to be closer to external
documentation. Changed from double precision to real in invert_zoom_x:
I do not see the need for double precision and double precision is
annoying because I want to use rtsafe without overloading it in
Numer_Rec_95.

Results are changed at the numerical noise level.


Revision 147 - (view) (annotate) - [select for diffs]
Modified Wed Jun 17 14:20:14 2015 UTC (8 years, 10 months ago) by guez
Original Path: trunk/Sources/dyn3d/fxhyp.f
File length: 5050 byte(s)
Diff to previous 146
In procedure fxhyp, instead of computing twice the integral of F,
store it the first time: ffdx becomes an array and we do not need xxpr
any longer. The storage is the same, there is less computation.

In procedure grid_noro, instead of storing the non-smoothed orography
in a temporary array zmea0, compute zphi earlier.


Revision 146 - (view) (annotate) - [select for diffs]
Modified Tue Jun 16 17:27:33 2015 UTC (8 years, 10 months ago) by guez
Original Path: trunk/Sources/dyn3d/fxhyp.f
File length: 5113 byte(s)
Diff to previous 145
We use the fact that \tilde X is an odd function in invert_zoom_x so
we only need arrays for the domain \tilde x \in [0, \pi].


Revision 145 - (view) (annotate) - [select for diffs]
Modified Tue Jun 16 15:23:29 2015 UTC (8 years, 10 months ago) by guez
Original Path: trunk/Sources/dyn3d/fxhyp.f
File length: 5476 byte(s)
Diff to previous 144
Renamed bibio to misc.

In procedure fxhyp, use the fact that xf is an odd function of xtild.

In procedure invert_zoom_x, replace linear search in xf by
bisection. Also, use result from previous loop iteration as initial
guess. Variable "it" cannot be equal to 2 * nmax after search.

Unused arguments: hm of cv3_feed; ph, qnk, tv,tvp of cv3_mixing; ppsol
of lw; rconst, temp of vdif_kcay; rconst, plev, temp, ustar, l_mix of
yamada.


Revision 144 - (view) (annotate) - [select for diffs]
Modified Wed Jun 10 16:46:46 2015 UTC (8 years, 10 months ago) by guez
Original Path: trunk/Sources/dyn3d/fxhyp.f
File length: 5491 byte(s)
Diff to previous 139
In procedure fxhyp, the convoluted computation of tanh(fa/fb) occurred
three times. Extracted it into a function. Also, the computation of
xmoy and fxm was repeated. So stored the values in arrays instead.

In procedure fxhyp, in the computation of fhyp, there were tests
xtild(i) == 0. and xtild(i) == pi_d. No use to do these tests at each
iteration. We now they are true for i == nmax and i == 2 * nmax,
respectively, and we know they are false for other values of
"i". Similarly, in the computations of ffdx and xxpr, there were the
tests xmoy == 0. and xmoy == pi_d, these could not be true.

Moved files from bibio to dyn3d, following LMDZ.


Revision 139 - (view) (annotate) - [select for diffs]
Modified Tue May 26 17:46:03 2015 UTC (8 years, 11 months ago) by guez
Original Path: trunk/Sources/dyn3d/fxhyp.f
File length: 6843 byte(s)
Diff to previous 134
dynetat0 read rlonu, rlatu, rlonv, rlatv, cu_2d, cv_2d, aire_2d from
"start.nc" and then these variables were overwritten by
inigeom. Corrected this. Now, inigeom does not compute rlonu, rlatu,
rlonv and rlatv. Moreover, cu_2d, cv_2d, aire_2d are not written to
"restart.nc". Since xprimu, xprimv, xprimm025, xprimp025, rlatu1,
rlatu2, yprimu1, yprimu2 are computed at the same time as rlonu,
rlatu, rlonv, rlatv, and since it would not be convenient to separate
those computations, we decide to write xprimu, xprimv, xprimm025,
xprimp025, rlatu1, rlatu2, yprimu1, yprimu2 into "restart.nc", read
them from "start.nc" and not compute them in inigeom. So, in summary,
"start.nc" contains all the coordinates and their derivatives, and
inigeom only computes the 2D-variables.

Technical details:

Moved variables rlatu, rlonv, rlonu, rlatv, xprimu, xprimv from module
comgeom to module dynetat0_m. Upgraded local variables rlatu1,
yprimu1, rlatu2, yprimu2, xprimm025, xprimp025 of procedure inigeom to
variables of module dynetat0_m.

Removed unused local variable yprimu of procedure inigeom and
corresponding argument yyprimu of fyhyp.

Moved variables clat, clon, grossismx, grossismy, dzoomx, dzoomy,
taux, tauy from module serre to module dynetat0_m (since they are read
from "start.nc"). The default values are now defined in read_serre
instead of in the declarations. Changed name of module serre to
read_serre_m, no more module variable here.

The calls to fxhyp and fyhyp are moved from inigeom to etat0.

Side effects in programs other than gcm: etat0 and read_serre write
variables of module dynetat0; the programs test_fxyp and
test_inter_barxy need more source files.

Removed unused arguments len and nd of cv3_tracer. Removed unused
argument PPSOL of LWU.

Bug fix in test_inter_barxy: forgotten call to read_serre.


Revision 134 - (view) (annotate) - [select for diffs]
Modified Wed Apr 29 15:47:56 2015 UTC (9 years ago) by guez
Original Path: trunk/Sources/dyn3d/fxhyp.f
File length: 6838 byte(s)
Diff to previous 132
Sources inside, compilation outside.

Revision 132 - (view) (annotate) - [select for diffs]
Modified Fri Mar 20 16:31:06 2015 UTC (9 years, 1 month ago) by guez
File length: 6838 byte(s)
Diff to previous 131
Removed procedure jacobi, which was a copy of the file from Numerical
Recipes in Fortran 77. Refer to the Numer_Rec_95 library instead.

There was a strange line in procedure coordij: j cannot be equal to 0
after the loop on j.


Revision 131 - (view) (annotate) - [select for diffs]
Modified Fri Feb 27 16:44:07 2015 UTC (9 years, 2 months ago) by guez
File length: 6823 byte(s)
Diff to previous 128
Renamed procedure fxhyp_loop_ik to invert_zoom_x.

Bug fix. clat is now in rad so there should be no conversion in
fyhyp. (This bug had an effect only if clat was /= 0.)

No need for heavyside to be double precision.

Removed variable tnom of module iniadvtrac_m. Was redundant with tname.


Revision 128 - (view) (annotate) - [select for diffs]
Modified Thu Feb 12 16:23:33 2015 UTC (9 years, 2 months ago) by guez
File length: 6823 byte(s)
Diff to previous 127
The variable temps of file restart.nc is always 0. So we remove the
possibility that it can be something else. So removed argument time_0
of caldyn, dynetat0, leapfrog.


Revision 127 - (view) (annotate) - [select for diffs]
Modified Tue Feb 10 17:58:56 2015 UTC (9 years, 2 months ago) by guez
File length: 6766 byte(s)
Diff to previous 126
clon and clat from module serre are now in rad instead of
degrees. They are only used in rad, so we do only one conversion when
we read them.


Revision 126 - (view) (annotate) - [select for diffs]
Modified Fri Feb 6 18:33:15 2015 UTC (9 years, 2 months ago) by guez
File length: 6846 byte(s)
Diff to previous 124
Extracted the case grossismx == 1 from procedure fxhyp_loop_ik up into
procedure fxhyp. Since we have to do the test somewhere, better to do
it up there. The logic gets much clearer. Also, a lot of computations
are not needed in the case grossismx == 1. We could then remove
arguments ik and decalx of fxhyp_loop_ik.


Revision 124 - (view) (annotate) - [select for diffs]
Modified Thu Feb 5 15:19:37 2015 UTC (9 years, 2 months ago) by guez
File length: 6297 byte(s)
Diff to previous 123
Moved some processing from fxhyp_loop_ik to fxhyp. Now fxhyp_loop_ik
does not necessarily give longitudes near [-pi, pi]. In fxhyp, we look
in rlonm025 whether we need to move the array toward [-pi, pi]. If so,
we apply the same move to all grids: rlonm025, rlonv, rlonp025, rlonu
and the corresponding derivatives. The move itself is done by the new
procedure principal_cshift. This revision makes the logic
clearer. (For example, we do not have a saved variable is2 in
fxhyp_loop_ik any longer and we remove a test on ik in fxhyp_loop_ik.)

Fixed a bad error message in fxhyp_loop_ik: talked about rlonu when
xvrai is not always rlonu.


Revision 123 - (view) (annotate) - [select for diffs]
Modified Thu Feb 5 12:41:08 2015 UTC (9 years, 2 months ago) by guez
File length: 5327 byte(s)
Diff to previous 122
Added some test programs.

In fxhyp_loop_ik, changed precision from 1e-3 to 1e-6. Reset initial
value of xo1 to first guess of xi instead of final value of xi for
previous i (better logic).


Revision 122 - (view) (annotate) - [select for diffs]
Modified Tue Feb 3 19:30:48 2015 UTC (9 years, 3 months ago) by guez
File length: 5328 byte(s)
Diff to previous 121
In procedure fxhyp_loop_ik, when testing whether xvrai is between -pi
and pi, changed back the boundaries from -pi - 1d-5 to - pi_d - 0.1
and from pi + 1d-5 to pi_d + 0.1. Fixed the logic: for ik = 1, we
rearrange longitudes between -pi and pi, if necessary. For other
values of ik, we apply the same rearrangement.

In module serre, change the default values of dzoomx and dzoomy to
0.2, because dzoomx must be > 0 when grossismx > 1.

With this revision, we recover the results of revision 120 and we
remove the bug that appeared with clon = 20.


Revision 121 - (view) (annotate) - [select for diffs]
Modified Wed Jan 28 16:10:02 2015 UTC (9 years, 3 months ago) by guez
File length: 5374 byte(s)
Diff to previous 120
In procedure fxhyp, extracted the body of the loop on ik into a new
procedure:  fxhyp_loop_ik.

dzoomx and dzoomy must now be fractions of the entire range, they
cannot be ranges in degrees or rad.

In fxhyp, force Xf(2 * nmax) = pi_d instead of possibly doing it in
fxhyp_loop_ik.

In fxhyp_loop_ik, when testing whether xvrai is between -pi and pi,
changed the boundaries from -pi - 0.1 to - pi_d - 1d-5 and from pi +
0.1 to pi_d + 1d-5. This reveals a misconception of the
code. Therefore, this version does not work.


Revision 120 - (view) (annotate) - [select for diffs]
Modified Tue Jan 13 14:56:15 2015 UTC (9 years, 3 months ago) by guez
File length: 10371 byte(s)
Diff to previous 119
In procedure fxhyp, removed the possibility to set scal180 to
false. The useful lower bound of fhyp and xxpr is not 0. It does not
make sense to give the save attribute to is2 since fxhyp is only
called one per run. Bug fix: is2 could be used without being
defined. The bug did not appear because is2 had the save attribute so
it was initialized at 0.


Revision 119 - (view) (annotate) - [select for diffs]
Modified Wed Jan 7 14:34:57 2015 UTC (9 years, 3 months ago) by guez
File length: 10799 byte(s)
Diff to previous 112
Removed procedure fxyhyper. Useless intermediary between inigeom and
fxhyp, fyhyp. Removed argument yprimv of fyhyp, not used in
inigeom. Downgraded rlonm025 and rlonp025 from arguments to local
variables of fxhyp, not used in inigeom. Downgraded arguments
champmin, champmax of fxhyp and fyhyp to local variables: print them
in fxhyp and fyhyp instead of fxyhyper.

Removed arguments xzoomdeg, grossism, dzooma, tau of fxhyp. Use
directly module variables clon, grossismx, dzoomx, taux instead.

Removed arguments yzoomdeg, grossism, dzooma, tau of fyhyp. Use
directly module variables clat, grossismy, dzoomy, tauy instead.

In procedure yamada4, l0 does not need the save attribute. It is
defined at each call.


Revision 112 - (view) (annotate) - [select for diffs]
Modified Thu Sep 18 13:36:51 2014 UTC (9 years, 7 months ago) by guez
File length: 10489 byte(s)
Diff to previous 105
Removed 8 first arguments of fxyhyper, use variables of module serre
instead.

Moved reading of variables of module serre from procedure conf_gcm to
new procedure read_serre.

In guide, added conditions to avoid useless calls to tau2alpha and
writefield. Bugfix: offline corresponds to alpha = 1. Open only one
NetCDF file to read number of vertical levels.

In tau2alpha, added conditions to avoid useless computations of dxdyu
and dxdyv. gamma is not needed for a regular grid.


Revision 105 - (view) (annotate) - [select for diffs]
Modified Thu Sep 4 10:40:24 2014 UTC (9 years, 8 months ago) by guez
File length: 10488 byte(s)
Diff to previous 91
Removed intermediate variables in calcul_fluxs.

Revision 91 - (view) (annotate) - [select for diffs]
Modified Wed Mar 26 17:18:58 2014 UTC (10 years, 1 month ago) by guez
File length: 10520 byte(s)
Diff to previous 82
Removed unused variables lock_startdate and time_stamp of module
calendar.

Noticed that physiq does not change the surface pressure. So removed
arguments ps and dpfi of subroutine addfi. dpfi was always 0. The
computation of ps in addfi included some averaging at the poles. In
principle, this does not change ps but in practice it does because of
finite numerical precision. So the results of the simulation are
changed. Removed arguments ps and dpfi of calfis. Removed argument
d_ps of physiq.

du at the poles is not computed by dudv1, so declare only the
corresponding latitudes in dudv1. caldyn passes only a section of the
array dudyn as argument.

Removed variable niadv of module iniadvtrac_m.

Declared arguments of exner_hyb as assumed-shape arrays and made all
other horizontal sizes in exner_hyb dynamic. This allows the external
program test_disvert to use exner_hyb at a single horizontal position.


Revision 82 - (view) (annotate) - [select for diffs]
Modified Wed Mar 5 14:57:53 2014 UTC (10 years, 2 months ago) by guez
File length: 11516 byte(s)
Copied from: trunk/dyn3d/fxhyp.f90 revision 80
Diff to previous 78
Changed all ".f90" suffixes to ".f".

Revision 78 - (view) (annotate) - [select for diffs]
Modified Wed Feb 5 17:51:07 2014 UTC (10 years, 2 months ago) by guez
Original Path: trunk/dyn3d/fxhyp.f90
File length: 11516 byte(s)
Copied from: trunk/dyn3d/fxhyp.f revision 77
Diff to previous 76
Moved procedure inigeom into module comgeom.

In disvert, renamed s_sampling to vert_sampling, following
LMDZ. Removed choice strato1. In case read, read ap and bp instead of
s (following LMDZ).

Added argument phis to start_init_orog and start_init_dyn, and removed
variable phis of module start_init_orog_m. In etat0 and
start_init_orog, renamed relief to zmea_2d. In start_init_dyn, renamed
psol to ps.

In start_init_orog, renamed relief_hi to relief. No need to set
phis(iim + 1, :) = phis(1, :), already done in grid_noro.

Documentation for massbar out of SVN, in massbar.txt. Documentation
was duplicated in massdair, but not relevant in massdair.

In conflx, no need to initialize pen_[ud] and pde_[ud]. In flxasc,
used intermediary variable fact (following LMDZ).

In grid_noro, added local variable zmea0 for zmea not smoothed and
computed zphi from zmea instead of zmea0 (following LMDZ). This
changes the results of ce0l.

Removed arguments pen_u and pde_d of phytrac and nflxtr, which were
not used.


Revision 76 - (view) (annotate) - [select for diffs]
Modified Fri Nov 15 18:45:49 2013 UTC (10 years, 5 months ago) by guez
File length: 12115 byte(s)
Diff to previous 71
Moved everything out of libf.

Revision 71 - (view) (annotate) - [select for diffs]
Modified Mon Jul 8 18:12:18 2013 UTC (10 years, 9 months ago) by guez
Original Path: trunk/libf/dyn3d/fxhyp.f
File length: 12115 byte(s)
Diff to previous 3
No reason to call inidissip in ce0l.

In inidissip, set random seed to 1 beacuse PGI compiler does not
accept all zeros.

dq was computed needlessly in caladvtrac. Arguments masse and dq of
calfis not used.

Replaced real*8 by double precision.

Pass arrays with inverted order of vertical levels to conflx instead
of creating local variables for this inside conflx.


Revision 3 - (view) (annotate) - [select for diffs]
Added Wed Feb 27 13:16:39 2008 UTC (16 years, 2 months ago) by guez
Original Path: trunk/libf/dyn3d/fxhyp.f
File length: 12015 byte(s)
Initial import

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

  ViewVC Help
Powered by ViewVC 1.1.21