/[lmdze]/trunk/phylmd/Interface_surf
ViewVC logotype

Log of /trunk/phylmd/Interface_surf

View Directory Listing Directory Listing


Sticky Revision:

Revision 344 - Directory Listing
Modified Tue Nov 12 15:18:14 2019 UTC (4 years, 6 months ago) by guez
Replace pi / 180 by `deg_to_rad`

In procedure etat0, rename variable tsoil to ftsoil, which is the
corresponding name in the gcm program.

In `laplacien_gam`, replace call to scopy by array assignment.

Replace pi / 180 by `deg_to_rad` in `start_init_phys`.

Encapsulate diagcld1 and orolift in modules.

Avoid duplicated computation in `interfsurf_hq`.

Promote internal function fz of procedure soil to function of module
`soil_m`.  Use `new_unit` in procedure soil.


Revision 343 - Directory Listing
Modified Mon Oct 28 08:14:26 2019 UTC (4 years, 6 months ago) by guez
Add output variables rld and rldcs

Add output variables rld and rldcs (following LMDZ).

In procedure cdrag, rename variables zdu2, ztsolv, ztvd, zri to du2,
tsolv, tvd, ri. Replace `exp(log(psol))` by psol.

In procedure `pbl_surface`, rename u, v to `u_seri`, `v_seri`.


Revision 342 - Directory Listing
Modified Mon Oct 21 13:52:44 2019 UTC (4 years, 6 months ago) by guez
Bug fixes in `CMakeLists.txt`


Revision 341 - Directory Listing
Modified Mon Oct 21 06:11:44 2019 UTC (4 years, 6 months ago) by guez
Remove intermediate variables in `pbl_surface`

Remove file `diagcld2.f90`, no longer used since revision 340.

In procedure cdrag, rename zcdn to cdn. In procedure `interfsurf_hq`,
rename `temp_air` to t1lay: this is the corresponding name in
`calcul_fluxs`, is consistent with the other names `[uvq]1lay` and is
more precise.

In procedure `pbl_surface`, rename t and q to `t_seri` and `q_seri`,
which are the names in procedure physiq. Remove needless intermediate
variables qair1, tairsol, psfce, patm and zgeo1. Remove useless
initialization of yrugos. Remove a useless assignment `i = ni(j)`.


Revision 332 - Directory Listing
Modified Tue Aug 13 09:19:22 2019 UTC (4 years, 9 months ago) by guez
Declare variable nent in procedures `cv_driver`, `cv30_mixing` and
`cv30_yield` with shape `(ncum, 2:nl - 1)`.


Revision 331 - Directory Listing
Modified Wed Jul 31 17:10:31 2019 UTC (4 years, 9 months ago) by guez
Use same variable name across procedures: falbe.

In procedure albsno, no need for `MAX(0., snow_fall)`: snow_fall is
necessarily >= 0. No need to constrain update of agesno to be >= 0:
the result of the computation is necessarily >= 0 since agesno >= 0
and dtphys <= 86400.


Revision 330 - Directory Listing
Modified Wed Jul 31 14:55:23 2019 UTC (4 years, 9 months ago) by guez
Bug fix in `CMakeLists.txt`: default value of jjm.

Use the same variable name across procedures for column density of
snow at the surface: fsnow.

Remove useless intermediary variable bils in procedure physiq.

In procedure interfsurf_hq, no need to force zfra between 0 and 1: the
result of the computation is already between 0 and 1 since snow is
necessarily greater than or equal to 0.


Revision 329 - Directory Listing
Modified Thu Jun 13 17:29:13 2019 UTC (4 years, 11 months ago) by guez
Add `CMakeLists.txt` files.

Revision 328 - Directory Listing
Modified Thu Jun 13 14:40:06 2019 UTC (4 years, 11 months ago) by guez
Change all `.f` suffixes to `.f90`. (The opposite was done in revision
82.)  Because of change of philosopy in GNUmakefile: we already had a
rewritten rule for `.f`, so it does not make the makefile longer to
replace it by a rule for `.f90`. And it spares us options of
makedepf90 and of the compiler. Also we prepare the way for a simpler
`CMakeLists.txt`.


Revision 327 - Directory Listing
Modified Thu Jun 13 13:59:19 2019 UTC (4 years, 11 months ago) by guez
Move the update of ftsol by `d_ts` inside `pbl_surface` (following
LMDZ). This makes the procedure physiq lighter. And it is clearer now
that the update of ftsol does come from `pbl_surface`.


Revision 326 - Directory Listing
Modified Mon Jun 10 00:29:10 2019 UTC (4 years, 11 months ago) by guez
GNUmakefile does not depend on `settings.mk`.

Rename argument precip1 of `cv_driver` to rain, matching the name of the
corresponding actual argument in concvl.

Add Netcdf variable pmflxr to history file, following LMDZ.

In procedure phyetat0, no need for intermediary variable fractint.


Revision 324 - Directory Listing
Modified Wed Feb 6 15:58:03 2019 UTC (5 years, 3 months ago) by guez
Rename variable zmasq of module phyetat0_m to masque, which was
already its name in "restartphy.nc". Rename variable fraclic of
procedure etat0 to landice, which was already its name in
"landiceref.nc". Style guide: we try to have the same names for
identical data objects across the program.

In procedure interfsurf_hq, in case is_sic, define tsurf instead of
tsurf_new, avoiding a copy from tsurf_new to tsurf.


Revision 312 - Directory Listing
Modified Fri Dec 7 14:17:11 2018 UTC (5 years, 5 months ago) by guez
In procedure interfsur_lim, deja_lu_sur is redundant with jour_lu_sur.


Revision 311 - Directory Listing
Modified Mon Dec 3 17:52:21 2018 UTC (5 years, 5 months ago) by guez
Move file cv_thermo.f to directory CV30_routines since it is only used
there. Rename module cv_thermo_m to cv_thermo.

Named constants instead of variables in module suphec_m.

Rename dummy argument spechum of procedure interfsurf_hq to q1lay
(same as corresponding dummy argument in calcul_fluxs).


Revision 310 - Directory Listing
Modified Thu Sep 27 16:29:06 2018 UTC (5 years, 7 months ago) by guez
Read and write the whole pctsrf array in (re)startphy.nc, instead of
splitting it into FTER, FLIC, FOCE, FSIC.


Revision 309 - Directory Listing
Modified Thu Sep 27 14:58:10 2018 UTC (5 years, 7 months ago) by guez
Remove variable pourc_* in histins.nc, redundant with fract_*.

In procedure physiq, change the meaning of variable "sens" to avoid
changing the sign several times needlessly. Also the meaning of
variable "sens" in physiq is now the same than the meaning of netCDF
variable "sens". Also the convention for "sens" is now the same than
for radsol, zxfluxlat, and flux_t.


Revision 308 - Directory Listing
Modified Tue Sep 18 15:14:40 2018 UTC (5 years, 7 months ago) by guez
In procedure calcul_fluxs, rename coef1lay to cdragh (following
LMDZ). Use named constant min_wind_speed (following LMDZ).

Change name of NetCDF variable soll to CF standard rls.


Revision 307 - Directory Listing
Modified Tue Sep 11 12:52:28 2018 UTC (5 years, 8 months ago) by guez
Move computation of albsol, fsollw and fsolsw from physiq to pbl_surface
(following LMDZ).


Revision 305 - Directory Listing
Modified Tue Sep 11 11:08:38 2018 UTC (5 years, 8 months ago) by guez
We want to keep the same variable names throughout procedures. In
pbl_surface, rain_fall and snow_fall were passed to clqh and became
precip_rain and precip_snow. Which name should we choose?
Precipitation normally refers to water in all phases. Rainfall and
snowfall seem to be more common names to distinguish liquid water and
snow. Cf. CF standard names. So change everywhere precip_rain to
rain_fall and precip_snow to snow_fall.


Revision 304 - Directory Listing
Modified Thu Sep 6 15:51:09 2018 UTC (5 years, 8 months ago) by guez
Variable fevap of physiq is not used. Remove it from physiq and from
the restart file. Remove the corresponding argument evap of
pbl_surface.

Use directly yqsurf instead of qairsol in pbl_surface.


Revision 303 - Directory Listing
Modified Thu Sep 6 14:25:07 2018 UTC (5 years, 8 months ago) by guez
In procedure coef_diff_turb, zlev(:, klev + 1) was defined and then
overwritten inside yamada4. Replaced the definition of zlev(:, klev +
1) in coef_diff_turb by the definition in yamada4. So zlev is now
"intent in" in yamada4.

Bug fix in pbl_surface. yq2 is only defined if iflag_pbl >= 6.


Revision 302 - Directory Listing
Modified Thu Sep 6 13:19:51 2018 UTC (5 years, 8 months ago) by guez
In procedure physiq, rename dsens and devap to dflux_t and dflux_q so
they correspond to arguments with the same name in pbl_surface. (In
LMDZ, dsens and devap are not used in physiq, the computation of fder
is done inside pbl_surface.)


Revision 301 - Directory Listing
Modified Thu Aug 2 17:23:07 2018 UTC (5 years, 9 months ago) by guez
Move the call to conf_interface up to physiq, so there is no need to
test first call inside pbl_surface for this.

run_off_lic in fonte_neige was computed but not used. Pass it up to
pbl_surface so we can output it (following LMDZ).

Simplify the logic in interfsur_lim so we do not need debut.

Remove the tests on the order of surface types in interfsurf_hq. Just
add comments in indicesol.


Revision 300 - Directory Listing
Modified Thu Aug 2 15:55:01 2018 UTC (5 years, 9 months ago) by guez
The calls to calcul_fluxs were always done with an array argument
dif_grnd set to a scalar (and that is also the case in LMDZ). So just
use a scalar argument.

In procedure fonte_neige, the value of run_off_lic from previous call
was actually not used. So we can remove the save attribute and make it
an automatic array.


Revision 299 - Directory Listing
Modified Thu Aug 2 14:27:11 2018 UTC (5 years, 9 months ago) by guez
Use directly dtphys from module comconst when possible instead of
having it trickle down through procedure arguments.


Revision 298 - Directory Listing
Modified Thu Jul 26 16:45:51 2018 UTC (5 years, 9 months ago) by guez
Use directly dtphys from module comconst when possible instead of
having it trickle down through procedure arguments.


Revision 297 - Directory Listing
Modified Thu Jul 26 16:02:11 2018 UTC (5 years, 9 months ago) by guez
Rename module interface_surf to conf_interface_m.

Move the computation of pkf out of procedure climb_hq_down into clqh.


Revision 296 - Directory Listing
Modified Thu Jul 26 13:50:13 2018 UTC (5 years, 9 months ago) by guez
Create procedure climb_hq_up from part of procedure clqh (following LMDZ).


Revision 295 - Directory Listing
Modified Thu Jul 26 13:23:28 2018 UTC (5 years, 9 months ago) by guez
Create procedure climb_hq_down from part of procedure clqh (following LMDZ).


Revision 294 - Directory Listing
Modified Thu Jul 26 13:11:22 2018 UTC (5 years, 9 months ago) by guez
Remove variables grille_u and grille_v of file grilles_gcm.nc, which
were not given any value.

In procedure clqh, we only need to define gamt if iflag_pbl == 1.


Revision 293 - Directory Listing
Modified Wed Jul 25 16:16:53 2018 UTC (5 years, 9 months ago) by guez
Rename procedure read_sst to limit_read_sst, to be closer to LMDZ.


Revision 292 - Directory Listing
Modified Wed Jul 25 14:25:28 2018 UTC (5 years, 9 months ago) by guez
In procedure cdrag test zri >= 0 rather than zri > 0 and invert the
order of the if construction (following LMDZ).


Revision 291 - Directory Listing
Modified Wed Jul 25 14:15:44 2018 UTC (5 years, 9 months ago) by guez
Use named constant f_ri_cd_min in procedure cdrag (following LMDZ).
Remove some intermediary variables.


Revision 290 - Directory Listing
Modified Tue Jul 24 16:57:36 2018 UTC (5 years, 9 months ago) by guez
Polish.

Revision 289 - Directory Listing
Modified Tue Jul 24 16:40:15 2018 UTC (5 years, 9 months ago) by guez
No need to call coefkz or coefkzmin in procedure coef_diff_turb if
iflag_pbl >= 6.


Revision 288 - Directory Listing
Modified Tue Jul 24 16:27:12 2018 UTC (5 years, 9 months ago) by guez
Remove tests on richum, tvirtu and opt_ec in procedure coefkz (not
used in LMDZ either).

Change the meaning of variable ecrit_ins of module clesphys from
number of seconds (integer, weird), which was modified in physiq to
make a multiple of the time step of physics, to number of physics time
steps.


Revision 287 - Directory Listing
Modified Tue Jul 24 15:26:36 2018 UTC (5 years, 9 months ago) by guez
Move files containing procedures called by pbl_surface to directory Interface_surf.

Revision 286 - Directory Listing
Modified Tue Jul 24 15:22:48 2018 UTC (5 years, 9 months ago) by guez
Move files containing pbl_surface and procedures called by pbl_surface to directory Interface_surf.

Revision 283 - Directory Listing
Modified Fri Jul 20 17:08:44 2018 UTC (5 years, 9 months ago) by guez
Polish.

Revision 282 - Directory Listing
Modified Fri Jul 20 16:46:48 2018 UTC (5 years, 9 months ago) by guez
Polish

Revision 281 - Directory Listing
Modified Fri Jul 20 16:28:36 2018 UTC (5 years, 9 months ago) by guez
Polish

Revision 280 - Directory Listing
Modified Fri Jul 20 15:47:57 2018 UTC (5 years, 9 months ago) by guez
Remove gamq (counter-gradient for water vapor) in procedure clqh, was
always 0 (does not appear either any longer in LMDZ).


Revision 279 - Directory Listing
Modified Fri Jul 20 14:30:23 2018 UTC (5 years, 9 months ago) by guez
fqcalving was saved in physiq and had intent inout in pbl_surface. So
we could set fqcalving to 0 only once per run. The point is fqcalving
must be defined everywhere for the computation of the average over all
surfaces, even values that get multiplied by pctsrf = 0. I find it
clearer to set fqcalving to 0 at every call of pbl_surface. This is
more expensive but allows to give intent out to fqcalving in
pbl_surface and remove the save attribute in physiq.

Add zxfqcalving output netCDF variable (following LMDZ).


Revision 269 - Directory Listing
Modified Thu May 3 17:14:14 2018 UTC (6 years ago) by guez
Bug fix: dif_grnd for case is_sic in procedure
interfsurf_hq. (Following LMDZ. In LMDZ, the bug was fixed in revision
686.)


Revision 268 - Directory Listing
Modified Thu May 3 16:46:29 2018 UTC (6 years ago) by guez
Remove procedure calbeta. Was only useful for the case is_ter. Just
inline it in this case.


Revision 267 - Directory Listing
Modified Thu May 3 16:14:08 2018 UTC (6 years ago) by guez
Rename procedure clmain to pbl_surface (following LMDZ).

Remove choice soil_model = f. This choice made the algorithm unclear
in interfsurf_hq. Also soil_model = f is never used in LMDZ. radsol
was intent inout in clqh because of its possible modification in
interfsurf_hq, but the corresponding actual argument yrads is not used
in pbl_surface. The modification of radsol in interfsurf_hq was a bad
idea. Now we can more clearly make radsol an intent in argument of
clqh and interfsurf_hq.


Revision 266 - Directory Listing
Modified Thu Apr 19 17:54:55 2018 UTC (6 years ago) by guez
Define macros of the preprocessor CPP_IIM, CPP_JJM, CPP_LLM so we can
control the resolution from the compilation command, and automate
compilation for several resolutions.

In module yoethf_m, transform variables into named constants. So we do
not need procedure yoethf any longer.

Bug fix in program test_inter_barxy, missing calls to fyhyp and fxhyp,
and definition of rlatu.

Remove variable iecri of module conf_gcm_m. The files dyn_hist*.nc are
written every time step. We are simplifying the output system, pending
replacement by a whole new system.

Modify possible value of vert_sampling from "param" to
"strato_custom", following LMDZ. Default values of corresponding
namelist variables are now the values used for LMDZ CMIP6.


Revision 254 - Directory Listing
Modified Mon Feb 5 10:39:38 2018 UTC (6 years, 3 months ago) by guez
Move Sources/* to root directory.

Revision 230 - Directory Listing
Modified Mon Nov 6 17:47:03 2017 UTC (6 years, 6 months ago) by guez
Original Path: trunk/Sources/phylmd/Interface_surf
We use only coef(:, 2:) in cltrac.


Revision 225 - Directory Listing
Modified Mon Oct 16 12:35:41 2017 UTC (6 years, 7 months ago) by guez
Original Path: trunk/Sources/phylmd/Interface_surf
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 223 - Directory Listing
Modified Fri Apr 28 13:22:36 2017 UTC (7 years ago) by guez
Original Path: trunk/Sources/phylmd/Interface_surf
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
Original Path: trunk/Sources/phylmd/Interface_surf
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
Original Path: trunk/Sources/phylmd/Interface_surf
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 217 - Directory Listing
Modified Thu Mar 30 14:25:18 2017 UTC (7 years, 1 month ago) by guez
Original Path: trunk/Sources/phylmd/Interface_surf
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
Original Path: trunk/Sources/phylmd/Interface_surf
One less multiplication.

Revision 215 - Directory Listing
Modified Tue Mar 28 12:46:28 2017 UTC (7 years, 1 month ago) by guez
Original Path: trunk/Sources/phylmd/Interface_surf
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
Original Path: trunk/Sources/phylmd/Interface_surf
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 209 - Directory Listing
Modified Wed Dec 7 17:37:21 2016 UTC (7 years, 5 months ago) by guez
Original Path: trunk/Sources/phylmd/Interface_surf
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, 5 months ago) by guez
Original Path: trunk/Sources/phylmd/Interface_surf
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
Original Path: trunk/Sources/phylmd/Interface_surf
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
Original Path: trunk/Sources/phylmd/Interface_surf
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 202 - Directory Listing
Modified Wed Jun 8 12:23:41 2016 UTC (7 years, 11 months ago) by guez
Original Path: trunk/Sources/phylmd/Interface_surf
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 191 - Directory Listing
Modified Mon May 9 19:56:28 2016 UTC (8 years ago) by guez
Original Path: trunk/Sources/phylmd/Interface_surf
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 188 - Directory Listing
Modified Tue Mar 22 16:31:39 2016 UTC (8 years, 1 month ago) by guez
Original Path: trunk/Sources/phylmd/Interface_surf
Removed argument ncum of cv30_unsat, arguments nloc, ncum, nd, na of cv30_yield.


Revision 178 - Directory Listing
Modified Fri Mar 11 18:47:26 2016 UTC (8 years, 2 months ago) by guez
Original Path: trunk/Sources/phylmd/Interface_surf
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 175 - Directory Listing
Modified Fri Feb 5 16:02:34 2016 UTC (8 years, 3 months ago) by guez
Original Path: trunk/Sources/phylmd/Interface_surf
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
Original Path: trunk/Sources/phylmd/Interface_surf
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 171 - Directory Listing
Modified Tue Sep 29 19:48:59 2015 UTC (8 years, 7 months ago) by guez
Original Path: trunk/Sources/phylmd/Interface_surf
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 157 - Directory Listing
Modified Mon Jul 20 16:01:49 2015 UTC (8 years, 9 months ago) by guez
Original Path: trunk/Sources/phylmd/Interface_surf
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, 10 months ago) by guez
Original Path: trunk/Sources/phylmd/Interface_surf
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, 10 months ago) by guez
Original Path: trunk/Sources/phylmd/Interface_surf
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, 10 months ago) by guez
Original Path: trunk/Sources/phylmd/Interface_surf
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 150 - Directory Listing
Modified Thu Jun 18 13:49:26 2015 UTC (8 years, 10 months ago) by guez
Original Path: trunk/Sources/phylmd/Interface_surf
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 134 - Directory Listing
Modified Wed Apr 29 15:47:56 2015 UTC (9 years ago) by guez
Original Path: trunk/Sources/phylmd/Interface_surf
Sources inside, compilation outside.

Revision 130 - Directory Listing
Modified Tue Feb 24 15:43:51 2015 UTC (9 years, 2 months ago) by guez
The information in argument rdayvrai of calfis was redundant with the
information in argument time. Furthermore, in the physics part of gcm,
we need separately the day number (an integer) and the time of
day. So, replaced real argument rdayvrai of calfis containing elapsed
time by integer argument dayvrai containing day number. Corresponding
change in leapfrog. In procedure physiq, replaced real argument
rdayvrai by integer argument dayvrai. In procedures readsulfate and
readsulfate_preind, replaced real argument r_day by arguments dayvrai
and time.

In procedure alboc, replaced real argument rjour by integer argument
jour. alboc was always called by interfsurf_hq with actual argument
real(jour), and the meaning of the dummy argument in alboc seems to be
that it should be an integer.

In procedure leapfrog, local variable time could not be > 1. Removed
test.

In physiq, replaced nint(rdayvrai) by dayvrai. This changes the
results since julien now changes at 0 h instead of 12 h. This follows
LMDZ, where the argument of ozonecm is days_elapsed+1.


Revision 125 - Directory Listing
Modified Fri Feb 6 15:00:28 2015 UTC (9 years, 3 months ago) by guez
Created procedure read_yomcst.

Deleted some intermediary variables in procedure orbit.


Revision 118 - Directory Listing
Modified Thu Dec 18 17:30:24 2014 UTC (9 years, 4 months ago) by guez
In file grilles_gcm.nc, renamed variable phis to orog, deleted
variable presnivs.

Removed variable bug_ozone from module clesphys.

In procedure ozonecm, moved computation of sint and cost out of the
loops on horizontal position and vertical level. Inverted the order of
the two loops. We can then move all computations from slat to aprim
out of the loop on vertical levels. Created variable slat2, following
LMDZ. Moved the limitation of column-density of ozone in cell at 1e-12
from radlwsw to ozonecm, following LMDZ.

Removed unused arguments u, albsol, rh, cldfra, rneb, diafra, cldliq,
pmflxr, pmflxs, prfl, psfl of phytrac.

In procedure yamada4, for all the arrays, replaced the dimension klon
by ngrid. At the end of the procedure, for the computation of kmn,kn,
kq and q2, changed the upper limit of the loop index from klon to ngrid.

In radlwsw, for the calculation of pozon, removed the factor
paprs(iof+i, 1)/101325, as in LMDZ. In procedure sw, removed the
factor 101325.0/PPSOL(JL), as in LMDZ.


Revision 117 - Directory Listing
Modified Thu Dec 4 16:48:53 2014 UTC (9 years, 5 months ago) by guez
Split "albedo.f" into "alboc.f" and "alboc_cd.f".


Revision 116 - Directory Listing
Modified Thu Dec 4 16:35:03 2014 UTC (9 years, 5 months ago) by guez
In test_disvert, write output files before testing order of pressure
values, so we have more information if there is a problem.


Revision 108 - Directory Listing
Modified Tue Sep 16 14:00:41 2014 UTC (9 years, 8 months ago) by guez
Imported writefield from LMDZ. Close at the end of gcm the files which
were created by writefiled (not done in LMDZ).

Removed procedures for the output of Grads files. Removed calls to
dump2d. In guide, replaced calls to wrgrads by calls to writefield.

In vlspltqs, removed redundant programming of saturation
pressure. Call foeew from module FCTTRE instead.

Bug fix in interpre: size of w exceeding size of correponding actual
argument wg in advtrac.

In leapfrog, call guide until the end of the run, instead of six hours
before the end.

Bug fix in readsulfate_preind: type of arguments.


Revision 106 - Directory Listing
Modified Tue Sep 9 12:54:30 2014 UTC (9 years, 8 months ago) by guez
Removed arguments klon, knon of interfoce_lim. Removed argument knon
of interfsur_lim.


Revision 105 - Directory Listing
Modified Thu Sep 4 10:40:24 2014 UTC (9 years, 8 months ago) by guez
Removed intermediate variables in calcul_fluxs.

Revision 104 - Directory Listing
Modified Thu Sep 4 10:05:52 2014 UTC (9 years, 8 months ago) by guez
Removed procedure sortvarc0. Called sortvarc with an additional
argument resetvarc instead. (Following LMDZ.) Moved current time
computations and some printing statements from sortvarc to
caldyn. Could then remove arguments itau and time_0 of sortvarc, and
could remove "use dynetat0". Better to keep "dynetat0.f" as a gcm-only
file.

Moved some variables from module ener to module sortvarc.

Split file "mathelp.f" into single-procedure files.

Removed unused argument nadv of adaptdt. Removed dimension arguments
of bernoui.

Removed unused argument nisurf of interfoce_lim. Changed the size of
argument lmt_sst of interfoce_lim from klon to knon. Removed case when
newlmt is false.

dynredem1 is called only once in each run, either ce0l or gcm. So
variable nb in call to nf95_put_var was always 1. Removed variable nb.

Removed dimension arguments of calcul_fluxs. Removed unused arguments
precip_rain, precip_snow, snow of calcul_fluxs. Changed the size of
all the arrays in calcul_fluxs from klon to knon.

Removed dimension arguments of fonte_neige. Changed the size of all
the arrays in fonte_neige from klon to knon.

Changed the size of arguments tsurf and tsurf_new of interfsurf_hq
from klon to knon. Changed the size of argument ptsrf of soil from
klon to knon.


Revision 103 - Directory Listing
Modified Fri Aug 29 13:00:05 2014 UTC (9 years, 8 months ago) by guez
Renamed module cvparam to cv_param. Deleted procedure
cv_param. Changed variables of module cv_param into parameters.

In procedures cv_driver, cv_uncompress and cv3_uncompress, removed
some arguments giving dimensions and used module variables klon and
klev instead.

In procedures gradiv2, laplacien_gam and laplacien, changed
declarations of local variables because klevel is not always klev.

Removed code for nudging surface pressure.

Removed arguments pim and pjm of tau2alpha. Added assignment of false
to variable first.

Replaced real argument del of procedures foeew and FOEDE by logical
argument.


Revision 102 - Directory Listing
Modified Tue Jul 15 13:43:24 2014 UTC (9 years, 10 months ago) by guez
Removed unused file "condsurf.f" (only useful for ocean slab).

day_step must be a multiple of 4 * iperiod if ok_guide.

Changed type of variable online of module conf_guide_m from integer to
logical. Value -1 was not useful, equivalent to not ok_guide.

Removed argument masse of procedure guide. masse is kept consistent
with ps throughout the run. masse need only be computed again just
after ps has been modified. In prodecure guide, replaced use of
remanent variable first by test on itau. Replaced test on variable
"test" by test on integer values.

In leapfrog, for the call to guide, replaced test on real values by
test on integer values.

Bug fix in tau2alpha: computation of dxdyv (following LMDZ revision 1040).

In procedure wrgrads, replaced badly chosen argument name "if" by i_f.


Revision 101 - Directory Listing
Modified Mon Jul 7 17:45:21 2014 UTC (9 years, 10 months ago) by guez
Removed unused files "interfoce_slab.f" and "gath2cpl.f". Removed
unused variables coastalflow and riverflow of module
interface_surf. Removed unused arguments cal, radsol, dif_grnd,
fluxlat, fluxsens, dflux_s, dflux_l of procedure fonte_neige. Removed
unused arguments tslab, seaice of procedure interfsurf_hq and
clqh. Removed unused arguments seaice of procedure clmain.

In interfsurf_hq, used variable soil_model of module clesphys2 instead
of cascading it as an argument from physiq.

In phyetat0, stop if masque not found.

Variable TS instead of "TS[0-9][0-9]" in "(re)startphy.nc", with
additional dimension nbsrf.


Revision 100 - Directory Listing
Modified Wed Jul 2 19:07:58 2014 UTC (9 years, 10 months ago) by guez
Removed unused variable tmp_rlic of module interface_surf.

Removed useless call to gath2cpl in procedure interfsurf_hq. Removed
then uncalled procedure gath2cpl.


Revision 99 - Directory Listing
Modified Wed Jul 2 18:39:15 2014 UTC (9 years, 10 months ago) by guez
Created procedure test_disvert (following LMDZ). Added procedures
hybrid and funcd in module disvert_m. Upgraded compute_ab from
internal procedure of disvert to module procedure. Added variables y,
ya in module disvert_m. Upgraded s from local variable of procedure
disvert to module variable.

Renamed allowed value of variable vert_sampling in procedure disvert
from "read" to "read_hybrid". Added possibility to read pressure
values, value "read_pressure". Replaced vertical distribution for
value "param" by the distribution "strato_correct" from LMDZ (but kept
the value "param"). In case "tropo", replaced 1 by dsigmin (following
LMDZ). In case "strato", replaced 0.3 by dsigmin (following LMDZ).

Changed computation of bp in procedure compute_ab.

Removed debugindex case in clmain. Removed useless argument rlon of
procedure clmain. Removed useless variables ytaux, ytauy of procedure
clmain.

Removed intermediary variables tsol, qsol, tsolsrf, tslab in procedure
etat0.

Removed variable ok_veget:. coupling with the model Orchid is not
possible. Removed variable ocean: modeling an ocean slab is not
possible.

Removed useless variables tmp_rriv and tmp_rcoa from module
interface_surf.

Moved initialization of variables da, mp, phi in procedure physiq to
to inside the test iflag_con >= 3.


Revision 98 - Directory Listing
Modified Tue May 13 17:23:16 2014 UTC (10 years ago) by guez
Split inter_barxy.f : one procedure per module, one module per
file. Grouped the files into a directory.

Split orbite.f.

Value of raz_date read from the namelist is taken into account
(resetting the step counter) even if annee_ref == anneeref and day_ref
== dayref. raz_date is no longer modified by gcm main unit. (Following
LMDZ.)

Removed argument klon of interfsur_lim. Renamed arguments lmt_alb,
lmt_rug to alb_new, z0_new (same name as corresponding actual
arguments in interfsurf_hq).

Removed argument klon of interfsurf_hq.

Removed arguments qs and d_qs of diagetpq. Were always
zero. Downgraded arguments d_qw, d_ql of diagetpq to local variables,
they were not used in physiq. Removed all computations for solid water
in diagetpq, was just zero.


Downgraded arguments fs_bound, fq_bound of diagphy to local variables,
they were not used in physiq. Encapsulated in a test on iprt all
computations in diagphy.

Removed parameter nbtr of module dimphy. Replaced it everywhere in the
program by nqmx - 2.

Removed parameter rnpb of procedure physiq. Kept the true case in
physiq and phytrac. Could not work with false case anyway.

Removed arguments klon, llm, airephy of qcheck. Removed argument ftsol
of initrrnpb, was not used.


Revision 82 - Directory Listing
Modified Wed Mar 5 14:57:53 2014 UTC (10 years, 2 months ago) by guez
Changed all ".f90" suffixes to ".f".

Revision 76 - Directory Listing
Modified Fri Nov 15 18:45:49 2013 UTC (10 years, 6 months ago) by guez
Moved everything out of libf.

Revision 72 - Directory Listing
Modified Tue Jul 23 13:00:07 2013 UTC (10 years, 9 months ago) by guez
Original Path: trunk/libf/phylmd/Interface_surf
NaN to signalling NaN in gfortran_debug.mk.

Removed unused procedures in getincom and getincom2. In procedure
conf_interface, replaced call to getincom by new namelist. Moved
procedure conf_interface into module interface_surf.

Added variables sig1 and w01 to startphy.nc and restartphy.nc, for
procedure cv_driver. Renamed (ema_)?work1 and (ema_)?work2 to sig1 and
w01 in concvl and physiq.

Deleted unused arguments of clmain, clqh and intersurf_hq, among which
(y)?sollwdown. Following LMDZ, in physiq, read sollw instead of
sollwdown from startphy.nc, write sollw instead of sollwdown to
restartphy.nc.

In procedure sw, initialized zfs[ud][pn]a[di], for runs where ok_ade
and ok_aie are false. (Following LMDZ.)

Added dimension klev to startphy.nc and restartphy.nc, and deleted
dimension horizon_vertical. Made t_ancien and q_ancien two-dimensional
NetCDF variables. Bug fix: in phyetat0, define ratqs, clwcon and
rnebcon for vertical levels >=2.

Bug fix: set mfg, p[de]n_[ud] to 0. when iflag_con >= 3. (Following LMDZ.)


Revision 62 - Directory Listing
Modified Thu Jul 26 14:37:37 2012 UTC (11 years, 9 months ago) by guez
Original Path: trunk/libf/phylmd/Interface_surf
Changed handling of compiler in compilation system.

Removed the prefix letters "y", "p", "t" or "z" in some names of variables.

Replaced calls to NetCDF by calls to NetCDF95.

Extracted "ioget_calendar" procedures from "calendar.f90" into a
separate file.

Extracted to a separate file, "mathop2.f90", procedures that were not
part of the generic interface "mathop" in "mathop.f90".

Removed computation of "dq" in "bilan_dyn", which was not used.

In "iniadvtrac", removed schemes 20 Slopes and 30 Prather. Was not
compatible with declarations of array sizes.

In "clcdrag", "ustarhb", "vdif_kcay", "yamada4" and "coefkz", changed
the size of some arrays from "klon" to "knon".

Removed possible call to "conema3" in "physiq".

Removed unused argument "cd" in "yamada".


Revision 61 - Directory Listing
Modified Fri Apr 20 14:58:43 2012 UTC (12 years ago) by guez
Original Path: trunk/libf/phylmd/Interface_surf
No more included file in LMDZE, not even "netcdf.inc".

Created a variable containing the list of common source files in
GNUmakefile. So we now also see clearly files that are specific to
each program.

Split module "histcom". Assembled resulting files in directory
"Histcom".

Removed aliasing in calls to "laplacien".


Revision 54 - Directory Listing
Added Tue Dec 6 15:07:04 2011 UTC (12 years, 5 months ago) by guez
Original Path: trunk/libf/phylmd/Interface_surf
Removed Numerical Recipes procedure "ran1". Replaced calls to "ran1"
in "inidissip" by calls to intrinsic procedures.

Split file "interface_surf.f90" into a file with a module containing
only variables, "interface_surf", and single-procedure files. Gathered
files into directory "Interface_surf".

Added argument "cdivu" to "gradiv" and "gradiv2", "cdivh" to
"divgrad2" and "divgrad", and "crot" to "nxgraro2" and
"nxgrarot". "dissip" now uses variables "cdivu", "cdivh" and "crot"
from module "inidissip_m", so it can pass them to "gradiv2",
etc. Thanks to this modification, we avoid a circular dependency
betwwen "inidissip.f90" and "gradiv2.f90", etc. The value -1. used by
"gradiv2", for instance, during computation of eigenvalues is not the
value "cdivu" computed by "inidissip".

Extracted procedure "start_inter_3d" from module "startdyn", to its
own module.

In "inidissip", unrolled loop on "ii". I find it clearer now.

Moved variables "matriceun", "matriceus", "matricevn", "matricevs",
"matrinvn" and "matrinvs" from module "parafilt" to module
"inifilr_m". Moved variables "jfiltnu", "jfiltnv", "jfiltsu",
"jfiltsv" from module "coefils" to module "inifilr_m".


  ViewVC Help
Powered by ViewVC 1.1.21