--- trunk/dyn3d/etat0.f 2014/09/11 15:09:15 107 +++ trunk/Sources/dyn3d/etat0.f 2015/05/22 23:13:19 138 @@ -21,18 +21,17 @@ use comconst, only: cpp, kappa, iniconst use comgeom, only: rlatu, rlonv, rlonu, rlatv, aire_2d, apoln, apols, & cu_2d, cv_2d, inigeom - use conf_gcm_m, only: dayref, anneeref use dimens_m, only: iim, jjm, llm, nqmx use dimphy, only: zmasq use dimsoil, only: nsoilmx use disvert_m, only: ap, bp, preff, pa, disvert + use dynetat0_m, only: day_ref, annee_ref use dynredem0_m, only: dynredem0 use dynredem1_m, only: dynredem1 use exner_hyb_m, only: exner_hyb use geopot_m, only: geopot use grid_atob, only: grille_m use grid_change, only: init_dyn_phy, dyn_phy - use histclo_m, only: histclo use indicesol, only: is_oce, is_sic, is_ter, is_lic, epsfra use iniadvtrac_m, only: iniadvtrac use inifilr_m, only: inifilr @@ -42,27 +41,24 @@ nf95_inq_varid, nf95_open use nr_util, only: pi, assert use paramet_m, only: ip1jm, ip1jmp1 + use phyetat0_m, only: rlat, rlon use phyredem_m, only: phyredem use q_sat_m, only: q_sat use regr_lat_time_coefoz_m, only: regr_lat_time_coefoz use regr_pr_o3_m, only: regr_pr_o3 - use serre, only: alphax use startdyn, only: start_init_dyn USE start_init_orog_m, only: start_init_orog, mask use start_init_phys_m, only: start_init_phys use start_inter_3d_m, only: start_inter_3d - use temps, only: itau_phy, annee_ref, day_ref + use temps, only: itau_phy use test_disvert_m, only: test_disvert + use unit_nml_m, only: unit_nml REAL, intent(out):: phis(:, :) ! (iim + 1, jjm + 1) ! surface geopotential, in m2 s-2 ! Local: - REAL latfi(klon), lonfi(klon) - ! (latitude and longitude of a point of the scalar grid identified - ! by a simple index, in degrees) - REAL, dimension(iim + 1, jjm + 1, llm):: ucov, t3d, teta REAL vcov(iim + 1, jjm, llm) @@ -123,10 +119,16 @@ ! ("p3d(i, j, l)" is at longitude "rlonv(i)", latitude "rlatu(j)", ! for interface "l") + namelist /etat0_nml/ day_ref, annee_ref + !--------------------------------- print *, "Call sequence information: etat0" + print *, "Enter namelist 'etat0_nml'." + read(unit=*, nml=etat0_nml) + write(unit_nml, nml=etat0_nml) + CALL iniconst ! Construct a grid: @@ -137,15 +139,15 @@ CALL inigeom CALL inifilr - latfi(1) = 90. - latfi(2:klon-1) = pack(spread(rlatu(2:jjm), 1, iim), .true.) * 180. / pi + rlat(1) = 90. + rlat(2:klon-1) = pack(spread(rlatu(2:jjm), 1, iim), .true.) * 180. / pi ! (with conversion to degrees) - latfi(klon) = - 90. + rlat(klon) = - 90. - lonfi(1) = 0. - lonfi(2:klon-1) = pack(spread(rlonv(:iim), 2, jjm - 1), .true.) * 180. / pi + rlon(1) = 0. + rlon(2:klon-1) = pack(spread(rlonv(:iim), 2, jjm - 1), .true.) * 180. / pi ! (with conversion to degrees) - lonfi(klon) = 0. + rlon(klon) = 0. call start_init_orog(phis, zmea_2d, zstd_2d, zsig_2d, zgam_2d, zthe_2d, & zpic_2d, zval_2d) ! also compute "mask" @@ -296,8 +298,6 @@ ! Calcul interm\'ediaire : CALL massdair(p3d, masse) - print *, 'ALPHAX = ', alphax - forall (l = 1:llm) masse(:, 1, l) = SUM(aire_2d(:iim, 1) * masse(:iim, 1, l)) / apoln masse(:, jjm + 1, l) = & @@ -307,13 +307,11 @@ ! Initialisation pour traceurs: call iniadvtrac itau_phy = 0 - day_ref = dayref - annee_ref = anneeref CALL geopot(teta, pk , pks, phis, phi) CALL caldyn0(ucov, vcov, teta, ps, masse, pk, phis, phi, w, pbaru, & pbarv) - CALL dynredem0("start.nc", dayref, phis) + CALL dynredem0("start.nc", day_ref, phis) CALL dynredem1("start.nc", vcov, ucov, teta, q, masse, ps, itau=0) ! Initialisations : @@ -350,12 +348,11 @@ sig1 = 0. w01 = 0. - call phyredem("startphy.nc", latfi, lonfi, pctsrf, tsoil(:, 1, :), tsoil, & + call phyredem("startphy.nc", pctsrf, tsoil(:, 1, :), tsoil, & tsoil(:, 1, is_oce), seaice, qsolsrf, pack(qsol_2d, dyn_phy), snsrf, & albe, alblw, evap, rain_fall, snow_fall, solsw, sollw, fder, radsol, & frugs, agesno, zmea, zstd, zsig, zgam, zthe, zpic, zval, t_ancien, & q_ancien, rnebcon, ratqs, clwcon, run_off_lic_0, sig1, w01) - CALL histclo END SUBROUTINE etat0