Parent Directory | Revision Log
Sticky Revision: |
Added program test_inifilr. Encapsulated ppm3d into a module and added implicit none. Removed unused argument dum. Encountered a problem in procedure invert_zoom_x. With grossismx=2.9, DZOOMX=0.3, taux=5, for xuv = -0.25, for i = 1, rtsafe fails because fval is about 1e-16 instead of 0 at xval = pi. So distinguished the cases abs_y = 0 or pi. Needed then to add argument beta to invert_zoom_x. Moved the output of eignvalues of differentiation matrix from inifilr to inifgn, where they are computed. Simpler definition of j1 in inifilr.
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.
In procedure inifilr, only a part of the arrays modfrstu and modfrstv were defined. Split these into 4 arrays that are fully defined and used: modfrst[ns][uv]. Clarified the logic for the computation of jfilt[ns][uv]. Changed the initial value of the search so that the initial values for northern hemisphere and southern hemisphere cannot be the same. Clarified the logic for the computation of modfrst[ns][uv]: removed the cycle and exit instructions.
Renamed variables in fxhyp and invert_zoom_x to be closer to external documentation. Changed from double precision to real in invert_zoom_x: I do not see the need for double precision and double precision is annoying because I want to use rtsafe without overloading it in Numer_Rec_95. Results are changed at the numerical noise level.
In procedure fxhyp, instead of computing twice the integral of F, store it the first time: ffdx becomes an array and we do not need xxpr any longer. The storage is the same, there is less computation. In procedure grid_noro, instead of storing the non-smoothed orography in a temporary array zmea0, compute zphi earlier.
We use the fact that \tilde X is an odd function in invert_zoom_x so we only need arrays for the domain \tilde x \in [0, \pi].
Renamed bibio to misc. In procedure fxhyp, use the fact that xf is an odd function of xtild. In procedure invert_zoom_x, replace linear search in xf by bisection. Also, use result from previous loop iteration as initial guess. Variable "it" cannot be equal to 2 * nmax after search. Unused arguments: hm of cv3_feed; ph, qnk, tv,tvp of cv3_mixing; ppsol of lw; rconst, temp of vdif_kcay; rconst, plev, temp, ustar, l_mix of yamada.
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.
Sources inside, compilation outside.
Removed procedure jacobi, which was a copy of the file from Numerical Recipes in Fortran 77. Refer to the Numer_Rec_95 library instead. There was a strange line in procedure coordij: j cannot be equal to 0 after the loop on j.
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.
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.
clon and clat from module serre are now in rad instead of degrees. They are only used in rad, so we do only one conversion when we read them.
Extracted the case grossismx == 1 from procedure fxhyp_loop_ik up into procedure fxhyp. Since we have to do the test somewhere, better to do it up there. The logic gets much clearer. Also, a lot of computations are not needed in the case grossismx == 1. We could then remove arguments ik and decalx of fxhyp_loop_ik.
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).
In procedure fxhyp_loop_ik, when testing whether xvrai is between -pi and pi, changed back the boundaries from -pi - 1d-5 to - pi_d - 0.1 and from pi + 1d-5 to pi_d + 0.1. Fixed the logic: for ik = 1, we rearrange longitudes between -pi and pi, if necessary. For other values of ik, we apply the same rearrangement. In module serre, change the default values of dzoomx and dzoomy to 0.2, because dzoomx must be > 0 when grossismx > 1. With this revision, we recover the results of revision 120 and we remove the bug that appeared with clon = 20.
In procedure fxhyp, extracted the body of the loop on ik into a new procedure: fxhyp_loop_ik. dzoomx and dzoomy must now be fractions of the entire range, they cannot be ranges in degrees or rad. In fxhyp, force Xf(2 * nmax) = pi_d instead of possibly doing it in fxhyp_loop_ik. In fxhyp_loop_ik, when testing whether xvrai is between -pi and pi, changed the boundaries from -pi - 0.1 to - pi_d - 1d-5 and from pi + 0.1 to pi_d + 1d-5. This reveals a misconception of the code. Therefore, this version does not work.
In procedure fxhyp, removed the possibility to set scal180 to false. The useful lower bound of fhyp and xxpr is not 0. It does not make sense to give the save attribute to is2 since fxhyp is only called one per run. Bug fix: is2 could be used without being defined. The bug did not appear because is2 had the save attribute so it was initialized at 0.
Removed procedure fxyhyper. Useless intermediary between inigeom and fxhyp, fyhyp. Removed argument yprimv of fyhyp, not used in inigeom. Downgraded rlonm025 and rlonp025 from arguments to local variables of fxhyp, not used in inigeom. Downgraded arguments champmin, champmax of fxhyp and fyhyp to local variables: print them in fxhyp and fyhyp instead of fxyhyper. Removed arguments xzoomdeg, grossism, dzooma, tau of fxhyp. Use directly module variables clon, grossismx, dzoomx, taux instead. Removed arguments yzoomdeg, grossism, dzooma, tau of fyhyp. Use directly module variables clat, grossismy, dzoomy, tauy instead. In procedure yamada4, l0 does not need the save attribute. It is defined at each call.
Removed 8 first arguments of fxyhyper, use variables of module serre instead. Moved reading of variables of module serre from procedure conf_gcm to new procedure read_serre. In guide, added conditions to avoid useless calls to tau2alpha and writefield. Bugfix: offline corresponds to alpha = 1. Open only one NetCDF file to read number of vertical levels. In tau2alpha, added conditions to avoid useless computations of dxdyu and dxdyv. gamma is not needed for a regular grid.
Removed intermediate variables in calcul_fluxs.
Removed unused variables lock_startdate and time_stamp of module calendar. Noticed that physiq does not change the surface pressure. So removed arguments ps and dpfi of subroutine addfi. dpfi was always 0. The computation of ps in addfi included some averaging at the poles. In principle, this does not change ps but in practice it does because of finite numerical precision. So the results of the simulation are changed. Removed arguments ps and dpfi of calfis. Removed argument d_ps of physiq. du at the poles is not computed by dudv1, so declare only the corresponding latitudes in dudv1. caldyn passes only a section of the array dudyn as argument. Removed variable niadv of module iniadvtrac_m. Declared arguments of exner_hyb as assumed-shape arrays and made all other horizontal sizes in exner_hyb dynamic. This allows the external program test_disvert to use exner_hyb at a single horizontal position.
Changed all ".f90" suffixes to ".f".
Moved procedure inigeom into module comgeom. In disvert, renamed s_sampling to vert_sampling, following LMDZ. Removed choice strato1. In case read, read ap and bp instead of s (following LMDZ). Added argument phis to start_init_orog and start_init_dyn, and removed variable phis of module start_init_orog_m. In etat0 and start_init_orog, renamed relief to zmea_2d. In start_init_dyn, renamed psol to ps. In start_init_orog, renamed relief_hi to relief. No need to set phis(iim + 1, :) = phis(1, :), already done in grid_noro. Documentation for massbar out of SVN, in massbar.txt. Documentation was duplicated in massdair, but not relevant in massdair. In conflx, no need to initialize pen_[ud] and pde_[ud]. In flxasc, used intermediary variable fact (following LMDZ). In grid_noro, added local variable zmea0 for zmea not smoothed and computed zphi from zmea instead of zmea0 (following LMDZ). This changes the results of ce0l. Removed arguments pen_u and pde_d of phytrac and nflxtr, which were not used.
Moved everything out of libf.
No reason to call inidissip in ce0l. In inidissip, set random seed to 1 beacuse PGI compiler does not accept all zeros. dq was computed needlessly in caladvtrac. Arguments masse and dq of calfis not used. Replaced real*8 by double precision. Pass arrays with inverted order of vertical levels to conflx instead of creating local variables for this inside conflx.
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 |