Parent Directory | Revision Log
Sticky Revision: |
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.
New philosophy on compiler options. Removed source code for thermcep = f. (Not used in LMDZ either.)
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.
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.
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.
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.
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.
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.
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).
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.
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.
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).
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.
Sources inside, compilation outside.
Removed arguments day0, anne0 of procedures initdynav and inithist. Use directly day_ref, annee_ref instead. Moved variables annee_ref, day_ref of module temps to module dynetat0_m. Deleted variables dayref and anneeref of module conf_gcm_m and removed them from namelist conf_gcm_nml. These variables were troubling intermediary on the way to annee_ref and day_ref. Gave as default values to annee_ref and day_ref the default values of dayref and anneeref. Moved the test on raz_date from main unit gcm to procedure dynetat0. Created namelist dynetat0_nml. Read annee_ref and day_ref from standard input in dynetat0 and redefine them from "start.nc" if not raz_date. Rationale: 1 - Choose the best programming from the point of view of program gcm only, forgetting program ce0l. 2 - The normal case is to define annee_ref and day_ref from "start.nc" so put them in module dynetat0_m rather than in conf_gcm_m. 3 - Try to always read the same namelists in the same order regardless of choices in previous namelists. Downsides: 1 -We now need the file "dynetat0.f" for the program ce0l, because dynetat0_m is used by dynredem0. 2 - We need to define annee_ref and day_ref from procedure etat0. Removed useless variable day_end of module temps.
Extracted procedures that were in module calendar into separate files.
Changed all ".f90" suffixes to ".f".
Moved everything out of libf.
Cleaning.
Changed name of module "comvert" to "disvert_m". Changed constant 1. to 0.3 in vertical sampling "strato".
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".
Split "ini_hist.f90" into single-procedure files. In "calfis" and "physiq", removed dummy argument "nq" since "nq" must be equal to "nqmx". In "calfis", renamed dummy argument "pq" to "q", same name as actual argument in "leapfrog". Renamed local variable "zqfi" to "qx", same name as dummy argument in "physiq". Removed arguments "itop_con" and "ibas_con" of "phytrac", which were not used.
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.
ViewVC Help | |
Powered by ViewVC 1.1.21 |