Parent Directory | Revision Log
Sticky Revision: |
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.)
New philosophy on compiler options. Removed source code for thermcep = f. (Not used in LMDZ either.)
if_ebil in physiq can be modified by reading physiq_nml so tests on if_ebil should be after reading physiq_nml.
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.
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.
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.
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.
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.
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.
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.
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.
Sources inside, compilation outside.
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.
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.
Changed all ".f90" suffixes to ".f".
Moved everything out of libf.
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.)
Deleted files cvparam3.f90 and nuagecom.f90. Moved variables from module cvparam3 to module cv3_param_m. Moved variables rad_chau1 and rad_chau2 from module nuagecom to module conf_phys_m. Read clesphys2_nml from conf_phys instead of gcm. Removed argument iflag_con from several procedures. Access module variable instead.
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".
Bug fix: was reading only scalars in "phyetat0".
LMDZE now uses library Jumble. Removed all calls to "flinget". Replaced calls to "flinget", "flininfo", "flinopen_nozoom" by calls to NetCDF95 and Jumble. Split file "cv_driver.f" into "cv_driver.f90", "cv_flag.f90" and "cv_thermo.f90". Bug fix: "QANCIEN" was read twice in "phyeytat0". In "physiq", initialization of "d_t", "d_u", "d_v" was useless.
"start_init_phys" is now called directly by "etat0" instead of through "start_init_dyn". "qsol_2d" is no longer a variable of module "start_init_phys_m", it is an argument of "start_init_phys". "start_init_dyn" now receives "tsol_2d" from "etat0". Split file "vlspltqs.f" into "vlspltqs.f90", "vlxqs.f90" and ""vlyqs.f90". In "start_init_orog", replaced calls to "flin*" by calls to NetCDF95.
Superficial modifications
-- Minor modification of input/output: Added variable "Sigma_O3_Royer" to "histday.nc". "ecrit_day" is not modified in "physiq". Removed variables "pyu1", "pyv1", "ftsol1", "ftsol2", "ftsol3", "ftsol4", "psrf1", "psrf2", "psrf3", "psrf4" "mfu", "mfd", "en_u", "en_d", "de_d", "de_u", "coefh" from "histrac.nc". Variable "raz_date" of module "conf_gcm_m" has logical type instead of integer type. -- Should not change any result at run time: Modified calls to "IOIPSL_Lionel" procedures because the interfaces of these procedures have been simplified. Changed name of variable in module "start_init_orog_m": "masque" to "mask". Created a module containing procedure "phyredem". Removed arguments "punjours", "pdayref" and "ptimestep" of procedure "iniphysiq". Renamed procedure "gr_phy_write" to "gr_phy_write_2d". Created procedure "gr_phy_write_3d". Removed procedures "ini_undefstd", "moy_undefSTD", "calcul_STDlev", "calcul_divers".
-- Minor change of behaviour: "etat0" does not compute "rugsrel" nor "radpas". Deleted arguments "radpas" and "rugsrel" of "phyredem". Deleted argument "rugsrel" of "phyetat0". "startphy.nc" does not contain the variable "RUGSREL". In "physiq", "rugoro" is set to 0 if not "ok_orodr". The whole program "etat0_lim" does not use "clesphys2". -- Minor modification of input/output: Created subroutine "read_clesphys2". Variables of "clesphys2" are read in "read_clesphys2" instead of "conf_gcm". "printflag" does not print variables of "clesphys2". -- Should not change any result at run time: References to module "numer_rec" instead of individual modules of "Numer_rec_Lionel". Deleted argument "clesphy0" of "calfis", "physiq", "conf_gcm", "leapfrog", "phyetat0". Deleted variable "clesphy0" in "gcm". "phyetat0" does not modify variables of "clesphys2". The program unit "gcm" does not modify "itau_phy". Added some "intent" attributes. "regr11_lint" does not call "polint".
-- Minor modification of input/output: Created procedure "read_logic". Variables of module "logic" are read by "read_logic" instead of "conf_gcm". Variable "offline" of module "conf_gcm" is read from namelist instead of "*.def". Deleted arguments "dtime", "co2_ppm_etat0", "solaire_etat0", "tabcntr0" and local variables "radpas", "tab_cntrl" of "phyetat0". "phyetat0" does not read "controle" in "startphy.nc" any longer. "phyetat0" now reads global attribute "itau_phy" from "startphy.nc". "phyredem" does not create variable "controle" in "startphy.nc" any longer. "phyredem" now writes global attribute "itau_phy" of "startphy.nc". Deleted argument "tabcntr0" of "printflag". Removed diagnostic messages written by "printflag" for comparison of the variable "controle" of "startphy.nc" and the variables read from "*.def" or namelist input. -- Removing unwanted functionality: Removed variable "lunout" from module "iniprint", replaced everywhere by standard output. Removed case "ocean == 'couple'" in "clmain", "interfsurf_hq" and "physiq". Removed procedure "interfoce_cpl". -- Should not change anything at run time: Automated creation of graphs in documentation. More documentation on input files. Converted Fortran files to free format: "phyredem.f90", "printflag.f90". Split module "clesphy" into "clesphys" and "clesphys2". Removed variables "conser", "leapf", "forward", "apphys", "apdiss" and "statcl" from module "logic". Added arguments "conser" to "advect", "leapf" to "integrd". Added local variables "forward", "leapf", "apphys", "conser", "apdiss" in "leapfrog". Added intent attributes. Deleted arguments "dtime" of "phyredem", "pdtime" of "flxdtdq", "sh" of "phytrac", "dt" of "yamada". Deleted local variables "dtime", "co2_ppm_etat0", "solaire_etat0", "length", "tabcntr0" in "physiq". Replaced all references to "dtime" by references to "pdtphys".
Initial import
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.
ViewVC Help | |
Powered by ViewVC 1.1.21 |