/[lmdze]/trunk/Sources
ViewVC logotype

Log of /trunk/Sources

View Directory Listing Directory Listing


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

Revision 243 - Directory Listing
Modified Tue Nov 14 14:38:36 2017 UTC (6 years, 5 months ago) by guez
Multiply by ypct in the computation of average value rather than
modifying surface-specific quantity. This way, the surface-specific
quantity keeps the same meaning throughout the procedure.


Revision 242 - Directory Listing
Modified Mon Nov 13 12:12:41 2017 UTC (6 years, 5 months ago) by guez
In procedure clmain, do not compute ycoefh(:, 1) since this is a
duplicate of cdragh. Thus, in procedure physiq, use cdragh as actual
argument to phytrac.


Revision 241 - Directory Listing
Modified Mon Nov 13 11:51:04 2017 UTC (6 years, 5 months ago) by guez
In procedure phytrac, separate dummy argument coefh(klon, klev) into
coefh(klon, 2:klev) and cdragh(klon).


Revision 240 - Directory Listing
Modified Mon Nov 13 11:29:18 2017 UTC (6 years, 5 months ago) by guez
ycoef[mh]0(:, 1) is never used.


Revision 239 - Directory Listing
Modified Fri Nov 10 15:16:48 2017 UTC (6 years, 5 months ago) by guez
In procedure coefkzmin, dummy argument km is equal to dummy argument
kn. Remove it.

Bug fix in clmain. If iflag_pbl /= 1 and ok_kzmin then
ycoef[mh]0(:knon, 1) are not defined and used for computation of
ycdrag[mh](:knon). Remove the lines (following LMDZ).


Revision 238 - Directory Listing
Modified Thu Nov 9 14:11:39 2017 UTC (6 years, 5 months ago) by guez
In procedure clmain, remove local variable ykmq, not used (not used in
LMDZ either). Remove its computation in yamada4.

In procedure yamada4, remove dummy argument cd, not used.


Revision 237 - Directory Listing
Modified Thu Nov 9 13:26:00 2017 UTC (6 years, 5 months ago) by guez
In procedure clmain, separate coefh(klon, klev) into coefh(klon,
2:klev) and ycdragh(klon), coefm(klon, klev) into coefm(klon,
2:klev) and ycdragm(klon).


Revision 236 - Directory Listing
Modified Thu Nov 9 12:47:25 2017 UTC (6 years, 5 months ago) by guez
In procedure clqh, tq_cdrag from local variable to dummy argument, and
recieve only eddy diffusion coefficient in dummy argument coef.


Revision 235 - Directory Listing
Modified Thu Nov 9 12:37:48 2017 UTC (6 years, 5 months ago) by guez
Change only eddy diffusion coefficient, not drag in coefkz2.


Revision 234 - Directory Listing
Modified Tue Nov 7 12:20:42 2017 UTC (6 years, 5 months ago) by guez
Almost nothing.

Revision 233 - Directory Listing
Modified Tue Nov 7 10:52:46 2017 UTC (6 years, 5 months ago) by guez
Use separate variables for eddy diffusion coefficient and drag
coefficient in procedure coefkz (following LMDZ). coefkzmin only
computes eddy diffusion coefficient, not drag coefficient.


Revision 232 - Directory Listing
Modified Tue Nov 7 10:23:25 2017 UTC (6 years, 5 months ago) by guez
Use separate variables for eddy diffusion and drag coefficient in
cltracrn (following LMDZ).


Revision 231 - Directory Listing
Modified Mon Nov 6 18:00:54 2017 UTC (6 years, 5 months ago) by guez
Use separate variables for eddy diffusion and drag coefficient in
clvent (following LMDZ).


Revision 230 - Directory Listing
Modified Mon Nov 6 17:47:03 2017 UTC (6 years, 5 months ago) by guez
We use only coef(:, 2:) in cltrac.


Revision 229 - Directory Listing
Modified Mon Nov 6 17:20:45 2017 UTC (6 years, 5 months ago) by guez
Use iflag_pbl from module conf_phys in yamada4 instead of getting it
as argument.

In clvent, simplifications using the fact that zx_alf2 = 0 and zx_alf1
= 1 (discarding the possibility to change this).

In physiq, no need for temporary variables z[uv]strph: compute actual
arguments of aaam_bud directly.


Revision 228 - Directory Listing
Modified Fri Nov 3 12:38:47 2017 UTC (6 years, 5 months ago) by guez
Bug fix in dynetat0: phisinit to phis.

gcm explodes (stops in hgardfou) in less than one day with iflag_pbl =
7 (Mellor and Yamada 2.0 Fournier) and 11 (corresponding to iflag_pbl
= 31 in LMDZ, call to vdif_kcay). So remove those choices. Not much
used in LMDZ either. Remaining useful choices are iflag = 0, 1, 6, 8,
9.

Remove procedure yamada, which was not used.


Revision 227 - Directory Listing
Modified Thu Nov 2 15:47:03 2017 UTC (6 years, 5 months ago) by guez
Rename phisinit to phis in restart.nc: clearer, same name as Fortran variable.

In aaam_bud, use rlat and rlon from phyetat0_m instead of having these
module variables associated to actual arguments in physiq.

In clmain, too many wind variables make the procedure hard to
understand. Use yu(:knon, 1) and yv(:knon, 1) instead of u1lay(:knon)
and v1lay(:knon). Note that when yu(:knon, 1) and yv(:knon, 1) are
used as actual arguments, they are probably copied to new arrays since
the elements are not contiguous. Rename yu10m to wind10m because this
is the norm of wind vector, not its zonal component. Rename yustar to
ustar. Rename uzon and vmer to u1 and v1 since these are wind
components at first layer and u1 and v1 are the names of corresponding
dummy arguments in stdlevvar.

In clmain, rename yzlev to zlev.

In clmain, screenc, stdlevvar and coefcdrag, remove the code
corresponding to zxli true (not used in LMDZ either).

Subroutine ustarhb becomes a function. Simplifications using the fact
that zx_alf2 = 0 and zx_alf1 = 1 (discarding the possibility to change
this).

In procedure vdif_kcay, remove unused dummy argument plev. Remove
useless computations of sss and sssq.

In clouds_gno, exp(100.) would overflow in single precision. Set
maximum to exp(80.) instead.

In physiq, use u(:, 1) and v(:, 1) as arguments to phytrac instead of
creating ad hoc variables yu1 and yv1.

In stdlevvar, rename dummy argument u_10m to wind10m, following the
corresponding modification in clmain. Simplifications using the fact
that ok_pred = 0 and ok_corr = 1 (discarding the possibility to change
this).


Revision 226 - Directory Listing
Modified Mon Oct 16 13:04:05 2017 UTC (6 years, 6 months ago) by guez
In clmain, u1lay and v1lay do not depend on the subsurface. So output
values of zu1 and zv1 are simply u(:, 1) and v(:, 1). Just remove the
corresponding computations from clmain and define yu1 and yv1 in physiq.


Revision 225 - Directory Listing
Modified Mon Oct 16 12:35:41 2017 UTC (6 years, 6 months ago) by guez
LMDZE is now in Fortran 2003 (use of allocatable arguments).

gradsdef was not used.

Change names: [uv]10m to [uv]10m_srf in clmain, y[uv]1 to
[uv]1lay. Remove useless complication: zx_alf[12]. Do not modify
[uv]1lay after initial definition from [uv].

Add [uv]10m_srf to output.

Change names in physiq: [uv]10m to [uv]10m_srf, z[uv]10m to [uv]10m,
corresponding to NetCDF output names.

Remove unused complication couchelimite and useless variable inirnpb
in phytrac.


Revision 224 - Directory Listing
Modified Fri Apr 28 13:40:59 2017 UTC (7 years ago) by guez
offline allows to save variables for another run with offline
transport, but there is no provision for this other run with offline
transport in LMDZE. The procedures read_pstoke and read_pstoke0 in
LMDZ are never called. So removed the possibility offline = T.


Revision 223 - Directory Listing
Modified Fri Apr 28 13:22:36 2017 UTC (7 years ago) by guez
In clmain, local variable yfder was computed but not used. I think it
was useful for coupling only. Variable fder_print of pbl_surface in
LMDZ, which is output by LMDZ, corresponds to variable fder of physiq
in LMDZ and LMDZE.


Revision 222 - Directory Listing
Modified Tue Apr 25 15:31:48 2017 UTC (7 years ago) by guez
In interfsurf_hq, changed names of variables : tsurf becomes ts (name of
actual argument), tsurf_temp  can then become simply tsurf.


Revision 221 - Directory Listing
Modified Thu Apr 20 14:44:47 2017 UTC (7 years ago) by guez
clcdrag is no longer used in LMDZ. Replaced by cdrag in LMDZ. In cdrag
in LMDZ, zxli is a symbolic constant, false. So removed case zxli true
in LMDZE.

read_sst is called zero (if no ocean point on the whole planet) time or
once per call of physiq. If mod(itap - 1, lmt_pas) == 0 then we have
advanced in time of lmt_pas and deja_lu is necessarily false.

qsat[sl] and dqsat[sl] were never called.

Added output of qsurf in histins, following LMDZ.

Last dummy argument dtime of phystokenc is always the same as first
dummy argument pdtphys, removed dtime.

Removed make rules for nag_xref95, since it does not exist any longer.


Revision 220 - Directory Listing
Modified Tue Apr 4 14:52:21 2017 UTC (7 years ago) by guez
Removed unused aerosol variables. In procedure sw, ptopswai and
psolswai were always 0.


Revision 219 - Directory Listing
Modified Thu Mar 30 15:59:45 2017 UTC (7 years, 1 month ago) by guez
In swclr, for ok_ade true, set ppizaz to 1-1d-10, instead of 1, as for
ok_ade false. So flag_aer is no longer needed.


Revision 218 - Directory Listing
Modified Thu Mar 30 15:37:51 2017 UTC (7 years, 1 month ago) by guez
Simplifications in swclr, following from initialization of ptauaz,
ppizaz and pcgaz to 0.


Revision 217 - Directory Listing
Modified Thu Mar 30 14:25:18 2017 UTC (7 years, 1 month ago) by guez
run_off_lic downgraded from variable of module interface_surf to local
variable of fonte_neige.

Code could not work with ok_aie set to true, so removed this
possibility. tauae, piz_ae, cg_ae, topswai, solswai were then
0. cldtaupi was the same as cldtaupd.

In sw and procedures called by sw, flag_aer did not need to be double
precision, changed it to logical.

Downgraded re and fl from arguments of newmicro to local
variables. Added output of re and fl (following LMDZ).


Revision 216 - Directory Listing
Modified Tue Mar 28 15:36:53 2017 UTC (7 years, 1 month ago) by guez
One less multiplication.

Revision 215 - Directory Listing
Modified Tue Mar 28 12:46:28 2017 UTC (7 years, 1 month ago) by guez
size(snow) is now knon in interfsurf_hq.

Renamed snow to fsnow in clmain, same name as corresponding actual
argument. We can then rename ysnow to simply snow in clmain, same name
as corresponding dummy argument of clqh. No need to initialize local
snow to 0 since it is only used with indices 1:knon and already
initialized from fsnow for each type of surface. If there is no point
for a given type of surface, fsnow should be reset to 0 for this
type. We need to give a valid value to fsnow in this case even if it
will be multiplied by pctsrf = 0 in physiq.

In physiq, no need for intermediate zxsnow for output.

Removed unused arguments tsurf, p1lay, beta, coef1lay, ps, t1lay,
q1lay, u1lay, v1lay, petAcoef, peqAcoef, petBcoef, peqBcoef of
fonte_neige, with unused computations of zx_qs and zcor. (Same was
done in LMDZ.)


Revision 214 - Directory Listing
Modified Wed Mar 22 13:40:27 2017 UTC (7 years, 1 month ago) by guez
fluxlat, not yfluxlat, should be set to 0 at the beginning of
clmain. So fluxlat is defined for a given type of surface even if
there is no point of this type at the current time step.

fluxlat is defined at each time step in physiq, no need for the save
attribute.


Revision 213 - Directory Listing
Modified Mon Feb 27 15:44:55 2017 UTC (7 years, 2 months ago) by guez
Removed module conema3_m. Moved variables epmax and iflag_clw of
conema3_m to conf_phys_m, where they are defined. Removed unused
variable ok_adj_ema of conema3_m.

Added variables d_t_ec, dtsw0 and dtlw0 to histins.nc (following LMDZ).

Removed case not lessivage in phytrac. (Not used in LMDZ without INCA
either.)


Revision 212 - Directory Listing
Modified Thu Jan 12 12:31:31 2017 UTC (7 years, 3 months ago) by guez
Moved variables from module com_io_dyn to module inithist_m, where
they are defined.

Split grid_atob.f into grille_m.f and dist_sphe.f. Extracted ASCCI art
to documentation. In grille_m, use automatic arrays instead of maximum
size. In grille_m, instead of printing data for every problematic
point, print a single diagnostic message.

Removed variables top_height, overlap, lev_histhf, lev_histday,
lev_histmth, type_run, ok_isccp, ok_regdyn, lonmin_ins, lonmax_ins,
latmin_ins, latmax_ins of module clesphys, not used.

Removed variable itap of module histwrite_phy_m, not used. There is a
variable itap in module time_phylmdz.

Added output of tro3.

In physiq, no need to compute wo at every time-step, since we only use
it in radlwsw.


Revision 211 - Directory Listing
Modified Tue Dec 13 17:23:09 2016 UTC (7 years, 4 months ago) by guez
Removed option online = f in conf_guide (following LMDZ).

Moved computation of alpha_[uvtq] from guide to conf_guide. The aim
(for clarity) is to remove from guide things which should only be done
once. Had then to move computation of dxdyu, dxdyv from init_tau2alpha
to conf_guide to avoid circular dependency (use of guide_u, guide_v in
init_tau2alpha).


Revision 210 - Directory Listing
Modified Tue Dec 13 16:02:23 2016 UTC (7 years, 4 months ago) by guez
Replaced explicit Euler integration of nudged fields by exact
integration (following LMDZ revision 2134).


Revision 209 - Directory Listing
Modified Wed Dec 7 17:37:21 2016 UTC (7 years, 4 months ago) by guez
The program did not work with cycle_diurne set to false. mu0 in
physiq, which is supposed to be a cosine, was set to -999.999. So prmu
in swu had a value of the order of 1e3. So zrmum1 in sw2s had a value
of the order of 1e3. So zrayl in sw2s had a value of the order of
1e15. So ztray and ptauaz in swclr also had a large value. So zcorae
at line 138 in swclr had a large negative value, which resulted in
overflow at line 138.

This assignment of -999.999 to mu0 dates from somewhere between
revisions 348 and 524 of LMDZ. It was corrected in revision 1068 of
LMDZ with a call to angle which was present in revision 348. However,
procedure angle was removed from LMDZE in revision 22 because it was
not used. Hesitated to bring back angle but, finally, just removed the
option of having no diurnal cycle.


Revision 208 - Directory Listing
Modified Wed Dec 7 16:44:53 2016 UTC (7 years, 4 months ago) by guez
Module academic was not used.

Useful values for iflag_phys were only 0 and 1 so changed type to logical.

Definition of fmagic was duplicated in procedures alboc and alboc_cd
so moved it up to interfsurf_hq and also moved multiplication by
fmagic (following LMDZ).


Revision 207 - Directory Listing
Modified Thu Sep 1 10:30:53 2016 UTC (7 years, 8 months ago) by guez
New philosophy on compiler options.

Removed source code for thermcep = f. (Not used in LMDZ either.)


Revision 206 - Directory Listing
Modified Tue Aug 30 12:52:46 2016 UTC (7 years, 8 months ago) by guez
Removed dimension klev of flux_[tquv] and y_flux_[tquv] in
clmain. Removed dimension klev of flux_[tquv] in physiq. Removed
dimension klev of flux_[tq] in hbtm. Removed dimension klev of
flux_[tq] in clqh and computations for layers other than the surface
layer. Removed dimension klev of flux_v in clvent and computations for
layers other than the surface layer. Values for layers other than the
surface layer were not used nor output (not even in LMDZ).

Removed argument dnwd0 of concvl. Simply write - mp in physiq
(following LMDZ).

Removed useless intermediary variables zxflux[tquv] in physiq.


Revision 205 - Directory Listing
Modified Tue Jun 21 15:16:03 2016 UTC (7 years, 10 months ago) by guez
dnwd0 is just - mp. Compute it simply in concvl.

da, phi and mp were set to 0 in physiq before the call to
concvl. Clearer to set da1, phi1 and mp1 to 0 in cv_driver so they are
intent out.

qcheck was debugging, printed to standard output and was called
several times per time step of physics.

zxtsol was a duplicate of ztsol.


Revision 204 - Directory Listing
Modified Wed Jun 8 15:27:32 2016 UTC (7 years, 10 months ago) by guez
Removed calls to diagphy and diagetpq. Those were debugging
procedures, which printed to standard output and were called several
times per time step of physics.


Revision 203 - Directory Listing
Modified Wed Jun 8 15:10:12 2016 UTC (7 years, 10 months ago) by guez
if_ebil in physiq can be modified by reading physiq_nml so tests on
if_ebil should be after reading physiq_nml.


Revision 202 - Directory Listing
Modified Wed Jun 8 12:23:41 2016 UTC (7 years, 10 months ago) by guez
Promoted lmt_pas from local variable of physiq to variable of module
conf_gcm_m.

Removed variable run_off of module interface_surf. Was not
used. Called run_off_ter in LMDZ, but not used nor printed there
either.

Simplified logic in interfoce_lim. The way it was convoluted with
interfsurf_hq and clmain was quite a mess. Extracted reading of SST
into a separate procedure: read_sst. We do not need SST and pctsrf_new
at the same time: SST is not needed for sea-ice surface. I did not
like this programming: going through the procedure repeatedly for
different purposes and testing inside whether there was something to
do or it was already done. Reading is now only controlled by itap and
lmt_pas, instead of debut, jour, jour_lu and deja_lu. Now we do not
copy from pct_tmp to pctsrf_new every time step.

Simplified processing of pctsrf in clmain and below. It was quite
troubling: pctsrf_new was intent out in interfoce_lim but only defined
for ocean and sea-ice. Also the idea of having arrays for all
surfaces, pcsrf and pctsrf_new, in interfsurf_hq, which is called for
a particular surface, was troubling. pctsrf_new for all surfaces was
intent out in intefsurf_hq, but not defined for all surfaces at each
call. Removed argument pctsrf_new of clmain: was a duplicate of pctsrf
on output, and not used in physiq. Replaced pctsrf_new in clmain by
pctsrf_new_oce and pctsrf_new_sic, which were the only ones modified.


Revision 201 - Directory Listing
Modified Mon Jun 6 17:42:15 2016 UTC (7 years, 10 months ago) by guez
Removed intermediary objects of cv_thermo_m, access suphec_m
directly. Procedure cv_thermo disappeared, all objects are named
constants.

In cv_driver and below, limited extents of arrays to what is needed.

lv, cpn and th in cv30_compress were set at level nl + 1 but lv1, cpn1
and th1 are not defined at this level. This did not lead to an error
because values at nl + 1 were not used.

Removed test on ok_sync in phystokenc because it is not read at run
time. Printing min and max of output NetCDF variables is heavy and
archaic.

Used histwrite_phy in phytrac.


Revision 200 - Directory Listing
Modified Thu Jun 2 15:40:30 2016 UTC (7 years, 10 months ago) by guez
Changes results.

Revision 199 - Directory Listing
Modified Tue May 31 16:22:42 2016 UTC (7 years, 11 months ago) by guez
Changes results.

Revision 198 - Directory Listing
Modified Tue May 31 16:17:35 2016 UTC (7 years, 11 months ago) by guez
Removed variables nk1 and nk in cv_driver and below. These arrays were
just equal to the constant minorig. (This is also the case in LMDZ.)

In cv_thermo, removed some variables which were copies of variables of
suphec_m. Changed some variables to named constants.


Revision 197 - Directory Listing
Modified Tue May 24 12:25:29 2016 UTC (7 years, 11 months ago) by guez
Clarified the computation of sigt in cv30_unsat. Replacing pr2 by 1 -
pr1 changes the results.


Revision 196 - Directory Listing
Modified Mon May 23 13:50:39 2016 UTC (7 years, 11 months ago) by guez
Removed argument icbmax of cv30_feed, not used in cv_driver (not used
in LMDZ either).

Clearer to have iflag1 = 0 in cv30_feed than in cv_driver. Clearer to
have iflag1 = 42 in cv30_uncompress than in cv_driver.

Removed argument iflag of cv30_compress. Since there is iflag1 = 42 in
cv30_uncompress, iflag1 that comes out of cv_driver is disconnected
from iflag1 computed by cv30_feed and cv30_trigger.

Removed some references to convect3 and convect4 in comments. This
program derives from the convect3 version, we do not need to know
about other versions.

Bug fix in cv30_undilute1: icbs1 was not made >= 2.


Revision 195 - Directory Listing
Modified Wed May 18 17:56:44 2016 UTC (7 years, 11 months ago) by guez
In cv30_feed, iflag1 is 0 on entry so we can simplify the test for
iflag1 = 7.

In cv30_feed, for the computation of icb, replaced sequential search
(with a useless end of loop on k) by a call to locate.

In CV30 routines, replaced len, nloc, nd, na by klon or
klev. Philosophy: no more generality than actually necessary.

Converted as many variables as possible to named constants in
cv30_param_m and downgraded pbcrit, ptcrit, dtovsh, dpbase, dttrig,
tau, delta to local objects in procedures. spfac, betad and omtrain
are useless and removed.

Instead of filling the array sigp with the constant spfac in
cv30_undilute2, just made sigp a constant in cv30_unsat.

In cv_driver, define as allocatable variables that are only
used on the range (ncum, nl).


Revision 194 - Directory Listing
Modified Thu May 12 14:35:35 2016 UTC (7 years, 11 months ago) by guez
Clarified computation of wdtrain in procedure cv30_unsat: sum
intrinsic instead of loop. Changes results.


Revision 193 - Directory Listing
Modified Thu May 12 13:22:19 2016 UTC (7 years, 11 months ago) by guez
In procedure cv30_unsat, in downdraft_loop, there was a test on
any(inb >= i .and. lwork). It was useless to do this test at each
iteration since, if it becomes true for a given value of i, it is
necessarily true for all subsequent (lower) values of i. So instead,
we compute imax before the loop.

In procedure cv30_unsat, no need to initialize wdtrain to 0 because it
is computed inside the loop at all positions where it will be useful.


Revision 192 - Directory Listing
Modified Thu May 12 13:00:07 2016 UTC (7 years, 11 months ago) by guez
Removed the possibility to read aerosol fields. This was not
operational. It required fields already regridded in the three
dimensions. It seems quite weird to me not to have online vertical
regridding, since the surface pressure varies. There was the
possibility of adding vertical regridding. But development is not in
the spirit of LMDZE. Furthermore, the treatment of aerosols that was
in LMDZE is completely obsolete in LMDZ. We could try importing the
up-to-date treatment of aerosols of LMDZ, but that carries LMDZE quite
far: there is the problem of the calendar and the problem of updated
radiative transfer required for updated aerosols.


Revision 191 - Directory Listing
Modified Mon May 9 19:56:28 2016 UTC (7 years, 11 months ago) by guez
Extracted the call to read_comdissnew out of conf_gcm.

Made ok_instan a variable of module clesphys, itau_phy a variable of
module phyetat0_m, nid_ins a variable of module ini_histins_m, itap a
variable of new module time_phylmdz, so that histwrite_phy can be
called from any procedure without the need to cascade those variables
into that procedure. Made itau_w a variable of module time_phylmdz so
that it is computed only once per time step of physics.

Extracted variables of module clesphys which were in namelist
conf_phys_nml into their own namelist, clesphys_nml, and created
procedure read_clesphys reading clesphys_nml, to avoid side effect.

No need for double precision in procedure getso4fromfile. Assume there
is a single variable for the whole year in the NetCDF file instead of
one variable per month.

Created generic procedure histwrite_phy and removed procedure
write_histins, following LMDZ. histwrite_phy has only two arguments,
can be called from anywhere, and should manage the logic of writing or
not writing into various history files with various operations. So the
test on ok_instan goes inside histwrite_phy.

Test for raz_date in phyetat0 instead of physiq to avoid side effect.

Created procedure increment_itap to avoid side effect.

Removed unnecessary differences between procedures readsulfate and
readsulfate_pi.


Revision 190 - Directory Listing
Modified Thu Apr 14 15:15:56 2016 UTC (8 years ago) by guez
Created module cv_thermo_m around procedure cv_thermo. Moved variables
from module cvthermo to module cv_thermo_m, where they are defined.

In ini_histins and initphysto, using part of rlon and rlat from
phyetat0_m is pretending that we do not know about the dynamical grid,
while the way we extract zx_lon(:, 1) and zx_lat(1, :) depends on
ordering inside rlon and rlat. So we might as well simplify and
clarify by using directly rlonv and rlatu.

Removed intermediary variables in write_histins and phystokenc.


Revision 189 - Directory Listing
Modified Tue Mar 29 15:20:23 2016 UTC (8 years, 1 month ago) by guez
There was a function gr_phy_write_3d in dyn3d and a function
gr_phy_write_2d in module grid_change. Moved them into a new module
gr_phy_write_m under a generic interface gr_phy_write. Replaced calls
to gr_fi_ecrit by calls to gr_phy_write.

Removed arguments len, nloc and nd of cv30_compress.

Removed arguments wd and wd1 of cv30_uncompress, wd of cv30_yield, wd
of concvl, wd1 of cv_driver. Was just filled with 0. Removed option
ok_gust in physiq, never used.

In cv30_unsat, cv30_yield and cv_driver, we only need to define b to
level nl - 1.


Revision 188 - Directory Listing
Modified Tue Mar 22 16:31:39 2016 UTC (8 years, 1 month ago) by guez
Removed argument ncum of cv30_unsat, arguments nloc, ncum, nd, na of cv30_yield.


Revision 187 - Directory Listing
Modified Mon Mar 21 18:01:02 2016 UTC (8 years, 1 month ago) by guez
Made variable nl of module cv30_param_m a parameter. There was no
coding allowing it to change.

Removed arguments nloc and nd of cv30_undilute2, arguments nloc, nd
and na of cv30_unsat. Just use klon and klev directly (going for
clarity).

Removed the option cvflag_grav = f. This was a lot of redundant code,
probably obsolete, and cvflag_grav was initialized to true with no
provision for changing it (as in LMDZ).

In cv30_unsat, downdraft_loop started at i = nl + 1, but for i >= nl,
i > inb, so num1 = 0.


Revision 186 - Directory Listing
Modified Mon Mar 21 15:36:26 2016 UTC (8 years, 1 month ago) by guez
Removed variables nlm and nlp of module cv30_param_m. We do not
believe much in the benefit of these intermediary variables so we go
for clarity.

Removed variable noff of module cv30_param_m. Never used anywhere
else. Just set the value of nl explicitly in cv30_param.

Removed argument nd of cv30_param. Only called with nd = klev.

Replaced calls to zilch by array assignments. There was a strange
double call to zilch with the same arguments in cv30_mixing.

Removed procedure cv_flag. Just set the value of variable cvflag_grav
of module cvflag at declaration.


Revision 185 - Directory Listing
Modified Wed Mar 16 15:04:46 2016 UTC (8 years, 1 month ago) by guez
CV3 to CV30 (following LMDZ) (continued).

Revision 184 - Directory Listing
Modified Wed Mar 16 14:50:46 2016 UTC (8 years, 1 month ago) by guez
CV3 to CV30 (following LMDZ).

Revision 183 - Directory Listing
Modified Wed Mar 16 14:42:58 2016 UTC (8 years, 1 month ago) by guez
Removed argument snow_con of concvl. Just set snow_con to 0 in physiq
instead of in concvl.

Removed unused argument cbmf1 of cv_driver.

Added computation and output of ptop (following LMDZ).


Revision 182 - Directory Listing
Modified Wed Mar 16 11:11:27 2016 UTC (8 years, 1 month ago) by guez
Replaced integer variable iflag_con of module clesphys2 by logical
variable conv_emanuel.


Revision 181 - Directory Listing
Modified Tue Mar 15 17:51:30 2016 UTC (8 years, 1 month ago) by guez
Removed the option iflag_con == 4. This seems to be a coding of the
Emanuel scheme equivalent to and older than the coding for iflag_con
== 3.


Revision 180 - Directory Listing
Modified Tue Mar 15 17:07:47 2016 UTC (8 years, 1 month ago) by guez
In procedure concvl, renamed arguments snow to snow_con and ktop to
itop_con (names of corresponding actual arguments in physiq). Removed
useless argument pmflxs. Removed the alternative between iflag_con ==
3 or 4, the same computations were done in both cases.


Revision 179 - Directory Listing
Modified Fri Mar 11 18:58:19 2016 UTC (8 years, 1 month ago) by guez
Replaced call to regr1_step_av by call to regr1_conserv.

Revision 178 - Directory Listing
Modified Fri Mar 11 18:47:26 2016 UTC (8 years, 1 month ago) by guez
Moved variables date0, deltat, datasz_max, ncvar_ids, point, buff_pos,
buffer, regular from module histcom_var to modules where they are
defined.

Removed procedure ioipslmpp, useless for a sequential program.

Added argument datasz_max to histwrite_real (to avoid circular
dependency with histwrite).

Removed useless variables and computations everywhere.

Changed real litteral constants from default kind to double precision
in lwb, lwu, lwvn, sw1s, swtt, swtt1, swu.

Removed unused arguments: paer of sw, sw1s, sw2s, swclr; pcldsw of
sw1s, sw2s; pdsig, prayl of swr; co2_ppm of clmain, clqh; tsol of
transp_lay; nsrf of screenp; kcrit and kknu of gwstress; pstd of
orosetup.

Added output of relative humidity.


Revision 177 - Directory Listing
Modified Wed Feb 24 18:44:07 2016 UTC (8 years, 2 months ago) by guez
Removed the option to use PPM3D advection schemes. This looks really
bugged. In particular, in ppm3d:
     do i=1,IMR*JMR
	CRY(i,2) = DTDY*V(i,1,k)
     end do
while cry is declared as:
real CRY(IMR,JNP)
and:
jmr = jnp - 1

Also removed options for Slopes and Prather advection schemes. This
does not look functional. It seems it needs tracers inside tracers.

Also removed allowed values 1 and 2 for iadv in iniadvtrac. These are
not implemented in advtrac.

With the removal of PPM3D, there is no longer any need to distinguish
between hadv and vadv in iniadvtrac.


Revision 176 - Directory Listing
Modified Tue Feb 23 17:00:39 2016 UTC (8 years, 2 months ago) by guez
1e-60 was underflowing in simple precision.

Revision 175 - Directory Listing
Modified Fri Feb 5 16:02:34 2016 UTC (8 years, 2 months ago) by guez
Added argument itau_phy to ini_histins, phyetat0, phytrac and
phyredem0. Removed variable itau_phy of module temps. Avoiding side
effect in etat0 and phyetat0. The procedures ini_histins, phyetat0,
phytrac and phyredem0 are all called by physiq so there is no
cascading variable penalty.

In procedure inifilr, made the condition on colat0 weaker to allow for
rounding error.

Removed arguments flux_o, flux_g and t_slab of clmain, flux_o and
flux_g of clqh and interfsurf_hq, tslab and seaice of phyetat0 and
phyredem. NetCDF variables TSLAB and SEAICE no longer in
restartphy.nc. All these variables were related to the not-implemented
slab ocean. seaice and tslab were just set to 0 in phyetat0 and never
used nor changed. flux_o and flux_g were computed in clmain but never
used in physiq.

Removed argument swnet of clqh. Was used only to compute a local
variable, swdown, which was not used.


Revision 174 - Directory Listing
Modified Wed Nov 25 20:14:19 2015 UTC (8 years, 5 months ago) by guez
Simplifications in procedure albsno. Since veget(:, 2:) was 0,
iterations 2 to nvm of the loop computing alb_neig_grid were useless.

Useless initializations of alb_neige in procedure interfsurf_hq:
alb_neig is always computed by albsno just before being used. Useless
computation of local variable zfra in the land ice case.


Revision 173 - Directory Listing
Modified Tue Oct 6 15:57:02 2015 UTC (8 years, 6 months ago) by guez
correctbid did nothing. (Not used either in LMDZ since revision 1170.)

Avoid aliasing in arguments of nat2gcm: use a single set of arguments
with intent inout. Argument q of nat2gcm was not used.

pres2lev now accepts po in any monotonic order. So the input files for
nudging can now have the pressure coordinate in any order. Also, we
read the latitude coordinate from the input files for nudging and we
invert order if necessary so the input files for nudging can now have
the latitude coordinate in any order.

In pre2lev, no need for lmomx: use automatic arrays.

Removed variable ncep of module conf_guide_m. Instead, we find out
what the pressure coordinate is with find_coord.



Revision 172 - Directory Listing
Modified Wed Sep 30 15:59:14 2015 UTC (8 years, 7 months ago) by guez
Just indented correctbid and nat2gcm.

The procedure read_reanalyse just reads the next time slab every time
it is called. No use keeping track of the time index in the calling
procedure, guide. It is simpler to do it in read_reanalyse. Also
simpler to read the number of vertical levels in read_reanalyse than
in guide, since we have already in read_reanalyse the input of
pressure levels. We then have to make the arrays containing reanalyses
static allocatable instead of automatic. Also only read pressure
levels at the first call of read_reanalyse instead of at every call.

masserea2 not used in guide. Remove it down the chain in
read_reanalyse and reanalyse2nat.


Revision 171 - Directory Listing
Modified Tue Sep 29 19:48:59 2015 UTC (8 years, 7 months ago) by guez
Removed argument ierr of abort_gcm. It was always 1 and not used.

Just encapsulated pres2lev into a module.

Removed test on run_off in procedure calcul_fluxs. Useless. The test
is always done just before in interfsurf_hq.

Removed named constants rea and repsm in module suphec: never used.


Revision 170 - Directory Listing
Modified Mon Sep 14 17:25:15 2015 UTC (8 years, 7 months ago) by guez
Eignvectors computed by procedure jacobi are already normalized. No
need to call acc.


Revision 169 - Directory Listing
Modified Mon Sep 14 17:13:16 2015 UTC (8 years, 7 months ago) by guez
In inifilr_hemisph, colat0 is necessarily >= 1. / rlamda(iim) (see
notes) so we simplify the definition of jfilt. No need to keep modfrst
values at other latitudes than the current one, and we can have one
loop on latitudes instead of two.

Just encapsulated transp into a module.


Revision 168 - Directory Listing
Modified Wed Sep 9 10:41:47 2015 UTC (8 years, 7 months ago) by guez
In order to be able to choose finer resolutions, set large memory
model in compiler options and use dynamic libraries.

Variables rlatd, rlond, cuphy and cvphy of module comgeomphy were
never used. (In LMDZ, they are used only for Orchid.)

There is a bug in PGI Fortran 13.10 that does not accept the
combination of forall, pack and spread in regr_pr_av and
regr_pr_int. In order to circumvent this bug, created the function
gr_dyn_phy.

In program test_inifilr, use a single latitude coordinate for north
and south.


Revision 167 - Directory Listing
Modified Mon Aug 24 16:30:33 2015 UTC (8 years, 8 months ago) by guez
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 166 - Directory Listing
Modified Wed Jul 29 14:32:55 2015 UTC (8 years, 9 months ago) by guez
Split ppm3d.f into files containing a single procedure.

Factorized computations of filtering matrices into a procedure
inifilr_hemisph. Had then to change the matrices from allocatable to
pointer and from customized lower bound to lower bound 1. The change
in lower bounds does not matter because the matrices are only used as
a whole as actual arguments.

Also, in infilr, instead of finding jfilt[ns][uv] from approximately
jjm /2, start at index j1 that corresponds to the equator. This is not
the same if there is a zoom in latitude.

Also, the test (rlamda(modfrst[ns][uv](j)) * cos(rlat[uv](j)) < 1) in
the loops on filtered latitudes is not useful now that we start from
j1: it is necessarily true. See notes.

Just encapsulated lwvn into a module and removed unused argument ktraer.


Revision 165 - Directory Listing
Modified Wed Jul 29 09:52:33 2015 UTC (8 years, 9 months ago) by guez
In procedure inifilr, no use keeping values of coefil for all
latitudes. Just reuse a one-dimensional array. We can do this by
moving computation of coefil in the loops for computation of filtering
matrices. We avoid a redundant computation of coefil by putting the
computation of direct and inverse matrices inside a same loop on
latitudes.

Instead of writing to output file only modfrst, also write associated
latitudes and whether a mode to filter was found.

If a mode was not found (rlamda(modfrst(j)) * cos(rlat(j)) >= 1.) then
the filtering matrix at this latitude is null. So we move this test at
the highest level inside the loop on filtered latitudes. Note that, by
doing so, we do not need to initialize coefil at 0 any longer.


Revision 164 - Directory Listing
Modified Tue Jul 28 14:53:31 2015 UTC (8 years, 9 months ago) by guez
In procedure inifilr, coefilu2 and coefilv2 were not used. coefilu and
coefilv were defined and used only at filtered latitudes so split them
into north and south arrays. Values in eignvl are necessarily
negative. Simplified the computation of eignft.


Revision 163 - Directory Listing
Modified Fri Jul 24 18:14:04 2015 UTC (8 years, 9 months ago) by guez
In etat0, do not use masse computed by caldyn0, use masse averaged at
the poles which is computed higher in etat0 (following LMDZ). Changes
restart.nc.


Revision 162 - Directory Listing
Modified Fri Jul 24 16:54:30 2015 UTC (8 years, 9 months ago) by guez
Variable pls of module pressure_var was only modified by calfis but I
could not move it to module calfis_m because it was used by a
procedure called by calfis (it would have been a cyclic
dependency). In the same way, variable p3d of module pressure_var was
only modified by leapfrog but I could not move it to module
leapfrog_m. So removed module pressure_var. p3d becomes a local
variable of leapfrog and an argument of calfis. Use paprs and play in
regr_pr_int and regr_pr_av (following LMDZ). The idea in regr_pr_int
and regr_pr_av is to spread and pack before the regridding instead of
packing afterward. The cost in memory should only be a two-dimensional
temporary array created by spread. The cost in clarity is only the
transiting of paprs and pplay through regr_pr_comb_coefoz, but this is
more than compensated by removing the side effect on module variables.


Revision 161 - Directory Listing
Modified Fri Jul 24 14:27:59 2015 UTC (8 years, 9 months ago) by guez
rlon[uv] and rlat[uv] are already in start.nc.

Just encapsulated covcont in a module.

finvmaold was not used in leapfrog. Downgraded it from dummy argument
to local variable of SUBROUTINE integrd.

Simplified handling of mass in integrd: down from five 3-dimensional
arrays (masse, massem1, finvmaold, massescr and finvmasse) to three
(masse, massem1, finvmaold).


Revision 159 - Directory Listing
Modified Tue Jul 21 15:29:52 2015 UTC (8 years, 9 months ago) by guez
Write variables from phytrac to "histins.nc" instead of
"histrac.nc". The idea is to have different output files only if they
have different coordinates, and not according to content (following LMDZ).


Revision 158 - Directory Listing
Modified Tue Jul 21 14:44:45 2015 UTC (8 years, 9 months ago) by guez
Subroutine sugwd sets variables of module yoegwd. Better to put it
into module yoegwd.

Variables of module yoegwd other than NKTOPG, NSTRA can be symbolic
constants. sugwd now only sets NKTOPG, NSTRA. Simplified the
computation of NKTOPG, NSTRA by making the local variable zpm1r an
array instead of a scalar and calling ifirstloc.


Revision 157 - Directory Listing
Modified Mon Jul 20 16:01:49 2015 UTC (8 years, 9 months ago) by guez
Just encapsulated SUBROUTINE vlsplt in a module and cleaned it.

In procedure vlx, local variables dxqu and adxqu only need indices
iip2:ip1jm. Otherwise, just cleaned vlx.

Procedures dynredem0 and dynredem1 no longer have argument fichnom,
they just operate on a file named "restart.nc". The programming
guideline here is that gcm should not be more complex than it needs by
itself, other programs (ce0l etc.) just have to adapt to gcm. So ce0l
now creates files "restart.nc" and "restartphy.nc".

In order to facilitate decentralizing the writing of "restartphy.nc",
created a procedure phyredem0 out of phyredem. phyredem0 creates the
NetCDF header of "restartphy.nc" while phyredem writes the NetCDF
variables. As the global attribute itau_phy needs to be filled in
phyredem0, at the beginnig of the run, we must compute its value
instead of just using itap. So we have a dummy argument lmt_pas of
phyredem0. Also, the ncid of "startphy.nc" is upgraded from local
variable of phyetat0 to dummy argument. phyetat0 no longer closes
"startphy.nc".

Following the same decentralizing objective, the ncid of "restart.nc"
is upgraded from local variable of dynredem0 to module variable of
dynredem0_m. "restart.nc" is not closed at the end of dynredem0 nor
opened at the beginning of dynredem1.

In procedure etat0, instead of creating many vectors of size klon
which will be filled with zeroes, just create one array null_array.

In procedure phytrac, instead of writing trs(: 1) to a text file,
write it to "restartphy.nc" (following LMDZ). This is better because
now trs(: 1) is next to its coordinates. We can write to
"restartphy.nc" from phytrac directly, and not add trs(: 1) to the
long list of variables in physiq, thanks to the decentralizing of
"restartphy.nc".

In procedure phyetat0, we no longer write to standard output the
minimum and maximum values of read arrays. It is ok to check input and
abort on invalid values but just printing statistics on input seems too
much useless computation and out of place clutter.


Revision 156 - Directory Listing
Modified Thu Jul 16 17:39:10 2015 UTC (8 years, 9 months ago) by guez
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 155 - Directory Listing
Modified Wed Jul 8 17:03:45 2015 UTC (8 years, 9 months ago) by guez
Do not write any longer to startphy.nc nor read from restartphy.nc the
NetCDF variable ALBLW: it was the same than ALBE. ALBE was for the
visible and ALBLW for the near infrared. In physiq, use only variables
falbe and albsol, removed falblw and albsollw. See revision 888 of
LMDZ.

Removed unused arguments pdp of SUBROUTINE lwbv, ptave of SUBROUTINE
lwv, kuaer of SUBROUTINE lwvd, nq of SUBROUTINE initphysto.


Revision 154 - Directory Listing
Modified Tue Jul 7 17:49:23 2015 UTC (8 years, 9 months ago) by guez
Removed argument dtphys of physiq. Use it directly from comconst in
physiq instead.

Donwgraded variables eignfnu, eignfnv of module inifgn_m to dummy
arguments of SUBROUTINE inifgn. They were not used elsewhere than in
the calling procedure inifilr. Renamed argument dv of inifgn to eignval_v.

Made alboc and alboc_cd independent of the size of arguments. Now we
can call them only at indices knindex in interfsurf_hq, where we need
them. Fixed a bug in alboc_cd: rmu0 was modified, and the
corresponding actual argument in interfsurf_hq is an intent(in)
argument of interfsurf_hq.

Variables of size knon instead of klon in interfsur_lim and interfsurf_hq.

Removed argument alb_new of interfsurf_hq because it was the same than
alblw. Simplified test on cycle_diurne, following LMDZ.

Moved tests on nbapp_rad from physiq to read_clesphys2. No need for
separate counter itaprad, we can use itap. Define lmt_pas and radpas
from integer input parameters instead of real-type computed values.


Revision 153 - Directory Listing
Modified Tue Jun 23 18:26:18 2015 UTC (8 years, 10 months ago) by guez
Changes results.


Revision 152 - Directory Listing
Modified Tue Jun 23 18:18:12 2015 UTC (8 years, 10 months ago) by guez
Clarification in procedure inifgn. The cost is that we use 3 instead
of 2 local 2-dimensional arrays. eignfnv and eignfnu were used as
temporary arrays to compute input to jacobi before being used as
arguments of jacobi. The corresponding dummy argument is intent(out)
in jacobi. It is clearer to have eignfnv and eignfnu appear only as
arguments of jacobi.


Revision 151 - Directory Listing
Modified Tue Jun 23 15:14:20 2015 UTC (8 years, 10 months ago) by guez
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 150 - Directory Listing
Modified Thu Jun 18 13:49:26 2015 UTC (8 years, 10 months ago) by guez
Removed unused arguments of groupe, cv3_undilute2, cv_undilute2,
interfsur_lim, drag_noro, orodrag, gwprofil

Chickened out of revision 148: back to double precision in
invert_zoom_x (and overloaded rtsafe).


Revision 149 - Directory Listing
Modified Thu Jun 18 12:23:44 2015 UTC (8 years, 10 months ago) by guez
In invert_zoom_x, call rtsafe instead of the equivalent coding that
was there. funcd needs to access a[0-4] and abs_y so we upgrade a[0-4]
from arguments of coefpoly to variables of module coefpoly_m and abs_y
from local variable of invert_zoom_x to private variable of module
invert_zoom_x_m.

Removed unused arguments t10m and q10m of hbtm.


Revision 148 - Directory Listing
Modified Wed Jun 17 16:40:24 2015 UTC (8 years, 10 months ago) by guez
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 - Directory Listing
Modified Wed Jun 17 14:20:14 2015 UTC (8 years, 10 months ago) by guez
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 - Directory Listing
Modified Tue Jun 16 17:27:33 2015 UTC (8 years, 10 months ago) by guez
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 - Directory Listing
Modified Tue Jun 16 15:23:29 2015 UTC (8 years, 10 months ago) by guez
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 - Directory Listing
Modified Wed Jun 10 16:46:46 2015 UTC (8 years, 10 months ago) by guez
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 143 - Directory Listing
Modified Tue Jun 9 14:32:46 2015 UTC (8 years, 10 months ago) by guez
Removed argument d of procedure acc. Was probably here just because
automatic arrays were unknown.

eigen_sort was eigsrt from Numerical Recipes.

In procedure inifilr, create file "eignvl.txt" instead of writing to
standard output.


Revision 142 - Directory Listing
Modified Fri Jun 5 19:31:37 2015 UTC (8 years, 10 months ago) by guez
This revision changes results.


Revision 141 - Directory Listing
Modified Fri Jun 5 19:21:08 2015 UTC (8 years, 10 months ago) by guez
Procedure filtreg_hemisph is always called with sdd2 = 1 / sdd1. It
would not make sense otherwise. I do not like that this does not
appear explicitly in filtreg_hemisph. So replaced the two arguments
sdd1 and sdd2 by a single argument sdd. The cost is computing a
division instead of multplication for every 3-dimensional
position. Besides, this changes the results.


Revision 140 - Directory Listing
Modified Fri Jun 5 18:58:06 2015 UTC (8 years, 10 months ago) by guez
Changed unit of variables lat_min_guide and lat_max_guide from module
conf_guide_m from degrees to rad. Then we do not have to convert the
whole array rlat from rad to degrees in SUBROUTINE tau2alpha.

Removed some useless computations in inigeom.

Removed module coefils. Moved variables sddv, unsddv, sddu, unsddu,
eignfnu, eignfnv of module coefils to module inifgn_m. Downgraded
variables coefilu, coefilu2, coefilv, coefilv2, modfrstu, modfrstv of
module coefils to local variables of SUBROUTINE inifilr.

Write and read a 3-dimensional variable Tsoil in restartphy.nc and
startphy.nc instead of multiple variables for the different
subs-urfaces and soil layers. This does not allow any longer to
provide only the surface value in startphy.nc and spread it to other
layers. Instead, if necessary, pre-process the file startphy.nc to
spread the surface value.


Revision 139 - Directory Listing
Modified Tue May 26 17:46:03 2015 UTC (8 years, 11 months ago) by guez
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 138 - Directory Listing
Modified Fri May 22 23:13:19 2015 UTC (8 years, 11 months ago) by guez
Moved variable nb_files from module histcom_var to module
histbeg_totreg_m.

Removed unused argument q of writehist.

No history file is created in program ce0l so there is no need to call
histclo in etat0.

In phyredem, access variables rlat and rlon directly from module
phyetat0_m instead of having them as arguments. This is clearer for
the program gcm. There are bad side effects for the program ce0l: we
have to modify the module variables rlat and rlon in procedure etat0,
and we need the additional file phyetat0.f to compile ce0l.


Revision 137 - Directory Listing
Modified Wed May 6 15:51:03 2015 UTC (8 years, 11 months ago) by guez
Removed unused argument missval in ma_fucoll_r[1-3]1, ma_fufill_r[1-3]1.

Split filtreg into two procedures: filtreg_scal and filtreg_v. I did
not like the test on the extent of the argument and there was no
common code between the two cases: jjm and jjm + 1. Also, it is
simpler now to just remove the argument "direct" from filtreg_v instead
of allowing it and then stopping the program if it is false.

Removed the computation of pkf in reanalyse2nat, was not used.

As a consequence of the split of filtreg, had to extract the
computation of pkf out of exner_hyb. This is clearer anyway because we
want to be able to call exner_hyb with any size in the first two
dimensions (as in test_disvert). But at the same time exner_hyb
required particular sizes for the computation of pkf. It was
awkward. The only computation of pkf is now in leapfrog.


Revision 136 - Directory Listing
Modified Thu Apr 30 18:35:49 2015 UTC (9 years ago) by guez
Clarified the logic in filtreg by creating a procedure
filtreg_hemisph. It was terrible with a loop on hemispheres and tests
on hemisphere inside the loop, plus maddening indirections on latitude
bounds, plus repeated code. Went from 126 lines to much clearer 74 +
32 = 106 lines.

In module inifilr_m, finally made the arrays matrice[uv][ns],
matrinv[ns] dynamic (following LMDZ). Changed the lower bound of
matriceun and matrinvn in the 3rd dimension: 2 instead of 1, the index
1 was not defined (nor used).

In module inifilr_m, changed the bounds of matriceus and matrinvs in
the 3rd dimension: jfiltsu:jjm instead of 1:jjm - jfiltsu + 1. Changed
the bounds of matricevs in the 3rd dimension: jfiltsv:jjm instead of
1:jjm - jfiltsv + 1. It is a little simpler and clearer this way in
procedure inifilr.



Revision 135 - Directory Listing
Modified Thu Apr 30 14:22:32 2015 UTC (9 years ago) by guez
Use matmul in filtreg.

Revision 134 - Directory Listing
Added Wed Apr 29 15:47:56 2015 UTC (9 years ago) by guez
Sources inside, compilation outside.

  ViewVC Help
Powered by ViewVC 1.1.21