Parent Directory | Revision Log
Sticky Revision: |
Move procedures principal_cshift and invert_zoom_x each to its own module. Procedure fund and module variable abs_y go with invert_zoom_x.
Remove module temps. Move variable itau_dyn from module temps to module dynetat0_m, where it is defined. Split module dynetat0_m into dynetat0_m and dynetat0_chosen_m. The motivation is to create smaller modules. Procedures principal_cshift and invert_zoomx had to stay in dynetat0_m because of circular dependency. Now we will be able to move them away. Module variables which are chosen by the user, not computed, in program ce0l go to dynetat0_chosen_m: day_ref, annee_ref, clon, clat, grossismx, grossismy, dzoomx, dzoomy, taux, tauy. Move variable "pa" from module disvert_m to module dynetat0_chosen_m. Define "pa" in dynetat0_chosen rather than etat0. Define day_ref and annee_ref in procedure read_serre rather than etat0.
Move fxhyp and fyhyp to module dynetat0_m to avoid side effect on variables of module dynetat0_m. A downside is that we need to link heavyside, coefpoly and tanh_cautious into the gcm and test_fxhyp executables. We must move invert_zoom_x and principal_cshift to module dynetat0_m to avoid circular dependency. Move definition of rlatu(1) and rlatu(jjm + 1) inside fyhyp to avoid side effect on rlatu.
Move procedure read_serre from module read_serre_m to module dynetat0_m, to avoid side effet on variables of module dynetat0_m. Create procedure set_unit_nml to avoid side effect on variable of module unit_nml_m. Downgrade pctsrf from variable of module etat0_m to argument of etat0 and limit to avoid side effect on pctsrf. Move variable zmasq from module dimphy to module phyetat0_m to avoid side effect on zmasq.
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.
Rename module dimens_m to dimensions.
Try to clarify the logic. Remove module ener. Move variables from module ener to module dynetat0_m, where they are defined in program gcm. In sortvarc, I do not see how ptot0 could be 0, discard this possibility. Remove dummy argument resetvarc of procedure sortvarc. The difference is that sortvarc is called by caldyn or caldyn0 so just do different processing in caldyn and caldyn0 instead of inside sortvarc. No need for variables ang, etot, ptot, rmsdpdt, rmsv, stot, ztot to be at module level in module sortvarc_m, downgrade them to arguments of sortvarc. Instead of modyfying the meaning of ang, etot, ptot, rmsdpdt, rmsv, stot, ztot from absolute quantities to variations of these quantities, print the ratio in caldyn.
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.
In procedure fxhyp, the convoluted computation of tanh(fa/fb) occurred three times. Extracted it into a function. Also, the computation of xmoy and fxm was repeated. So stored the values in arrays instead. In procedure fxhyp, in the computation of fhyp, there were tests xtild(i) == 0. and xtild(i) == pi_d. No use to do these tests at each iteration. We now they are true for i == nmax and i == 2 * nmax, respectively, and we know they are false for other values of "i". Similarly, in the computations of ffdx and xxpr, there were the tests xmoy == 0. and xmoy == pi_d, these could not be true. Moved files from bibio to dyn3d, following LMDZ.
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.
Renamed procedure fxhyp_loop_ik to invert_zoom_x. Bug fix. clat is now in rad so there should be no conversion in fyhyp. (This bug had an effect only if clat was /= 0.) No need for heavyside to be double precision. Removed variable tnom of module iniadvtrac_m. Was redundant with tname.
Moved some processing from fxhyp_loop_ik to fxhyp. Now fxhyp_loop_ik does not necessarily give longitudes near [-pi, pi]. In fxhyp, we look in rlonm025 whether we need to move the array toward [-pi, pi]. If so, we apply the same move to all grids: rlonm025, rlonv, rlonp025, rlonu and the corresponding derivatives. The move itself is done by the new procedure principal_cshift. This revision makes the logic clearer. (For example, we do not have a saved variable is2 in fxhyp_loop_ik any longer and we remove a test on ik in fxhyp_loop_ik.) Fixed a bad error message in fxhyp_loop_ik: talked about rlonu when xvrai is not always rlonu.
Added some test programs. In fxhyp_loop_ik, changed precision from 1e-3 to 1e-6. Reset initial value of xo1 to first guess of xi instead of final value of xi for previous i (better logic).
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 |