Parent Directory | Revision Log
Sticky Revision: |
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.
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.
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.
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.
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 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.
The variable temps of file restart.nc is always 0. So we remove the possibility that it can be something else. So removed argument time_0 of caldyn, dynetat0, leapfrog.
In test_disvert, write output files before testing order of pressure values, so we have more information if there is a problem.
Moved the call to read_serre out of conf_gcm so that it can be called only in the program ce0l, not in gcm. In gcm, variables of module serre are read from start file. Added reading of dzoomx, dzoomy, taux, tauy from start file, in dynetat0. Those variables were written by dynredem0 but not read. Removed possibility fxyhypb = false, because the geometric part of the program is such a mess. Could then remove variables transx, transy, alphax, alphay, pxo, pyo of module serre. Bug fix in tau2alpha: missing save attributes. The first call to tau2alpha needs to compute dxdyu and dxdyv regardless of value of argument type, because they will be needed for subsequent calls to tau2alpha with various values of argument type.
Extracted procedures that were in module calendar into separate files.
In procedure conf_guide, replaced calls to getpar by reading a namelist. Removed file getparam.f, now unused. So getin of IOIPSL is now unused too. Removed files getincom.f, getincom2.f, cmpblank.f, find_sig.f, gensig.f and nocomma.f. Moved variables lat_min_guide and lat_max_guide from module tau2alpha_m to module conf_guide_m. Removed variables nivsig and nivsigs of module disvert_m. Instead, in initdynav and initfluxsto, directly wrote arithmetic sequence for verical axis, pending a better vertical axis. Removed variables nivsig and nivsigs of "(re)?.start.nc". In procedure exner_hyb, replaced p(:, :, 1) by equivalent ps.
Changed all ".f90" suffixes to ".f".
Moved everything out of libf.
Changed name of module "comvert" to "disvert_m". Changed constant 1. to 0.3 in vertical sampling "strato".
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".
Write used namelists to file "" instead of standard output. Avoid aliasing in "inidissip" in calls to "divgrad2", "divgrad", "gradiv2", "gradiv", "nxgraro2" and "nxgrarot". Add a degenerate dimension to arrays so they have rank 3, like the dummy arguments in "divgrad2", "divgrad", "gradiv2", "gradiv", "nxgraro2" and "nxgrarot". Extract the initialization part from "bilan_dyn" and make a separate procedure, "init_dynzon", from it. Move variables from modules "iniprint" and "logic" to module "conf_gcm_m". Promote internal procedures of "fxy" to private procedures of module "fxy_m". Extracted documentation from "inigeom". Removed useless "save" attributes. Removed useless intermediate variables. Extracted processing of poles from loop on latitudes. Write coordinates to file "longitude_latitude.txt" instead of standard output. Do not use ozone tracer for radiative transfer.
"pi" comes from "nr_util". Removed subroutine "initialize" in module "comconst". Copied the content of "fxy_sin.h" into "fxysinus", instead of getting it from an "include" line. Removed file "fxy_sin.h". "ps" has rank 2 in "gcm" and "dynetat0". Assumed-shape for argument "q" of "integrd".
Imported Source files of the external library "IOIPSL_Lionel" into "libf/IOIPSL". Split "cray.f90" into "scopy.f90" and "ssum.f90". Rewrote "leapfrog" in order to have a clearer algorithmic structure.
"dyn3d" and "filtrez" do not contain any included file so make rules have been updated. "comdissip.f90" was useless, removed it. "dynredem0" wrote undefined value in "controle(31)", that was overwritten by "dynredem1". Now "dynredem0" just writes 0 to "controle(31)". Removed arguments of "inidissip". "inidissip" now accesses the variables by use association. In program "etat0_lim", "itaufin" is not defined so "dynredem1" wrote undefined value to "controle(31)". Added argument "itau" of "dynredem1" to correct that. "itaufin" does not need to be a module variable (of "temps"), made it a local variable of "leapfrog". Removed calls to "diagedyn" from "leapfrog".
Split "orografi.f": one file for each procedure. Put the created files in new directory "Orography". Removed argument "vcov" of procedure "sortvarc". Removed arguments "itau" and "time" of procedure "caldyn0". Removed arguments "itau", "time" and "vcov" of procedure "sortvarc0". Removed argument "time" of procedure "dynredem1". Removed NetCDF variable "temps" in files "start.nc" and "restart.nc", because its value is always 0. Removed argument "nq" of procedures "iniadvtrac" and "leapfrog". The number of "tracers read in "traceur.def" must now be equal to "nqmx", or "nqmx" must equal 4 if there is no file "traceur.def". Replaced variable "nq" by constant "nqmx" in "leapfrog". NetCDF variable for ozone field in "coefoz.nc" must now be called "tro3" instead of "r". Fixed bug in "zenang".
Superficial modifications
In module "regr_pr", rewrote scanning of horizontal positions as a single set of loops, using a mask. Added some "intent" attributes. In "dynredem0", replaced calls to Fortran 77 interface of NetCDF by calls to NetCDF95. Removed calls to "nf_redef", regrouped all writing operations. In "dynredem1", replaced some calls to Fortran 77 interface of NetCDF by calls to Fortran 90 interface. Renamed variable "nqmax" to "nq_phys". In "physiq", if "nq >= 5" then "wo" is computed from the parameterization of "Cariolle".
-- 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".
Added NetCDF directory "/home/guez/include" in "g95.mk" and "nag_tools.mk". Added some "intent" attributes in "PVtheta", "advtrac", "caladvtrac", "calfis", "diagedyn", "dissip", "vlspltqs", "aeropt", "ajsec", "calltherm", "clmain", "cltrac", "cltracrn", "concvl", "conema3", "conflx", "fisrtilp", "newmicro", "nuage", "diagcld1", "diagcld2", "drag_noro", "lift_noro", "SUGWD", "physiq", "phytrac", "radlwsw", "thermcell". Removed the case "ierr == 0" in "abort_gcm"; moved call to "histclo" and messages for end of run from "abort_gcm" to "gcm"; replaced call to "abort_gcm" in "leapfrog" by exit from outer loop. In "calfis": removed argument "pp" and variable "unskap"; changed "pksurcp" from scalar to rank 2; use "pressure_var"; rewrote computation of "zplev", "zplay", "ztfi", "pcvgt" using "dyn_phy"; added computation of "pls". Removed unused variable in "dynredem0". In "exner_hyb": changed "dellta" from scalar to rank 1; replaced call to "ssum" by call to "sum"; removed variables "xpn" and "xps"; replaced some loops by array expressions. In "leapfrog": use "pressure_var"; deleted variables "p", "longcles". Converted common blocks "YOECUMF", "YOEGWD" to modules. Removed argument "pplay" in "cvltr", "diagetpq", "nflxtr". Created module "raddimlw" from include file "raddimlw.h". Corrected call to "new_unit" in "test_disvert".
This revision is not in working order. Pending some moving of files. Important changes. In the program "etat0_lim": ozone coefficients from Mobidic are regridded in time instead of pressure ; consequences in "etat0". In the program "gcm", ozone coefficients from Mobidic are read once per day only for the current day and regridded in pressure ; consequences in "o3_chem_m", "regr_pr_coefoz", "phytrac" and "regr_pr_comb_coefoz_m". NetCDF95 is a library and does not export NetCDF. New variables "nag_gl_options", "nag_fcalls_options" and "nag_cross_options" in "nag_tools.mk". "check_coefoz.jnl" rewritten entirely for new version of "coefoz_LMDZ.nc". Target "obj_etat0_lim" moved from "GNUmakefile" to "nag_rules.mk". Added some "intent" attributes in "calfis", "clmain", "clqh", "cltrac", "cltracrn", "cvltr", "ini_undefSTD", "moy_undefSTD", "nflxtr", "phystokenc", "phytrac", "readsulfate", "readsulfate_preind" and "undefSTD". In "dynetat0", "dynredem0" and "gcm", "phis" has rank 2 instead of 1. "phis" has assumed shape in "dynredem0". Added module containing "dynredem0". Changed some calls with NetCDF Fortran 77 interface to calls with NetCDF95 interface. Replaced calls to "ssum" by calls to "sum" in "inigeom". In "make.sh", new option "-c" to change compiler. In "aaam_bud", argument "rjour" deleted. In "physiq": renamed some variables; deleted variable "xjour". In "phytrac": renamed some variables; new argument "lmt_pas".
Created module from included file parafilt. Converted caldyn0 to free format. Added a rule to create cross-references with NAG. Added optional attribute in iniadvtrac. Suppressed argument nq in dynredem0 and dynredem1, using nqmx instead. Replaced some NetCDF calls by netcdf95 calls in dynredem0. Added intent attribute in dynredem0 and dynredem1. Annotated use statements with only clause, in dynredem1. Suppressed variable nq and argument of iniadvtrac in etat0. Added test on nqmx in etat0.
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 |