--- trunk/libf/dyn3d/etat0.f90 2008/08/07 12:29:13 18 +++ trunk/libf/dyn3d/etat0.f90 2010/04/01 09:07:28 30 @@ -19,35 +19,37 @@ ! This subroutine creates "mask". - USE ioipsl, only: flinget, flinclo, flinopen_nozoom, flininfo, histclo - - USE start_init_orog_m, only: start_init_orog, mask, phis - use start_init_phys_m, only: qsol_2d - use startdyn, only: start_inter_3d, start_init_dyn - use dimens_m, only: iim, jjm, llm, nqmx - use paramet_m, only: ip1jm, ip1jmp1 + use caldyn0_m, only: caldyn0 use comconst, only: dtvr, daysec, cpp, kappa, pi - use comdissnew, only: lstardis, nitergdiv, nitergrot, niterh, & - tetagdiv, tetagrot, tetatemp - use indicesol, only: is_oce, is_sic, is_ter, is_lic, epsfra - use comvert, only: ap, bp, preff, pa - use dimphy, only: zmasq - use conf_gcm_m, only: day_step, iphysiq, dayref, anneeref use comgeom, only: rlatu, rlonv, rlonu, rlatv, aire_2d, apoln, apols, & cu_2d, cv_2d - use serre, only: alphax + use comvert, only: ap, bp, preff, pa + use conf_gcm_m, only: day_step, iphysiq, dayref, anneeref + use dimens_m, only: iim, jjm, llm, nqmx + use dimphy, only: zmasq use dimsoil, only: nsoilmx - use temps, only: itau_dyn, itau_phy, annee_ref, day_ref, dt + use dynredem0_m, only: dynredem0 + use dynredem1_m, only: dynredem1 + use exner_hyb_m, only: exner_hyb use grid_atob, only: grille_m use grid_change, only: init_dyn_phy, dyn_phy - use q_sat_m, only: q_sat - use exner_hyb_m, only: exner_hyb + use indicesol, only: is_oce, is_sic, is_ter, is_lic, epsfra use iniadvtrac_m, only: iniadvtrac + use inidissip_m, only: inidissip + use inigeom_m, only: inigeom + USE flincom, only: flinget, flinclo, flinopen_nozoom, flininfo + use histcom, only: histclo + use paramet_m, only: ip1jm, ip1jmp1 + use phyredem_m, only: phyredem use pressure_var, only: pls, p3d - use dynredem0_m, only: dynredem0 + 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 phyredem_m, only: phyredem + use serre, only: alphax + USE start_init_orog_m, only: start_init_orog, mask, phis + use start_init_phys_m, only: qsol_2d + use startdyn, only: start_inter_3d, start_init_dyn + use temps, only: itau_phy, annee_ref, day_ref ! Variables local to the procedure: @@ -105,6 +107,7 @@ REAL pbaru(ip1jmp1, llm), pbarv(ip1jm, llm) REAL w(ip1jmp1, llm) REAL phystep + real trash !--------------------------------- @@ -147,15 +150,15 @@ PRINT *, "minval(pls(:, :, :)) = ", minval(pls(:, :, :)) print *, "maxval(pls(:, :, :)) = ", maxval(pls(:, :, :)) - uvent(:, :, :) = start_inter_3d('U', rlonv, rlatv, pls) + call start_inter_3d('U', rlonv, rlatv, pls, uvent) forall (l = 1: llm) uvent(:iim, :, l) = uvent(:iim, :, l) * cu_2d(:iim, :) uvent(iim+1, :, :) = uvent(1, :, :) - vvent(:, :, :) = start_inter_3d('V', rlonu, rlatu(:jjm), pls(:, :jjm, :)) + call start_inter_3d('V', rlonu, rlatu(:jjm), pls(:, :jjm, :), vvent) forall (l = 1: llm) vvent(:iim, :, l) = vvent(:iim, :, l) * cv_2d(:iim, :) vvent(iim + 1, :, :) = vvent(1, :, :) - t3d(:, :, :) = start_inter_3d('TEMP', rlonu, rlatv, pls) + call start_inter_3d('TEMP', rlonu, rlatv, pls, t3d) PRINT *, 'minval(t3d(:, :, :)) = ', minval(t3d(:, :, :)) print *, "maxval(t3d(:, :, :)) = ", maxval(t3d(:, :, :)) @@ -174,7 +177,8 @@ IF (MINVAL(qsat) == MAXVAL(qsat)) stop '"qsat" should not be constant' ! Water vapor: - q3d(:, :, :, 1) = 0.01 * start_inter_3d('R', rlonu, rlatv, pls) * qsat + call start_inter_3d('R', rlonu, rlatv, pls, q3d(:, :, :, 1)) + q3d(:, :, :, 1) = 0.01 * q3d(:, :, :, 1) * qsat WHERE (q3d(:, :, :, 1) < 0.) q3d(:, :, :, 1) = 1E-10 DO l = 1, llm q3d(:, 1, l, 1) = SUM(aire_2d(:, 1) * q3d(:, 1, l, 1)) / apoln @@ -218,7 +222,7 @@ ALLOCATE(dlat_lic(jml_lic)) ALLOCATE(fraclic(iml_lic, jml_lic)) CALL flinopen_nozoom("landiceref.nc", iml_lic, jml_lic, & - llm_tmp, lon_lic, lat_lic, lev, ttm_tmp, itaul, date, dt, & + llm_tmp, lon_lic, lat_lic, lev, ttm_tmp, itaul, date, trash, & fid) CALL flinget(fid, 'landice', iml_lic, jml_lic, llm_tmp, ttm_tmp & , 1, 1, fraclic) @@ -288,22 +292,18 @@ ! Initialisation pour traceurs: call iniadvtrac - ! Ecriture: - CALL inidissip(lstardis, nitergdiv, nitergrot, niterh, tetagdiv, & - tetagrot, tetatemp) - itau_dyn = 0 + CALL inidissip itau_phy = 0 day_ref = dayref annee_ref = anneeref - CALL geopot(ip1jmp1, tpot, pk , pks, phis , phi) - CALL caldyn0(0, uvent, vvent, tpot, psol, masse, pk, phis, phi, w, & - pbaru, pbarv, 0) + CALL geopot(ip1jmp1, tpot, pk , pks, phis, phi) + CALL caldyn0(uvent, vvent, tpot, psol, masse, pk, phis, phi, w, pbaru, & + pbarv) CALL dynredem0("start.nc", dayref, phis) - CALL dynredem1("start.nc", 0., vvent, uvent, tpot, q3d, masse, psol) + CALL dynredem1("start.nc", vvent, uvent, tpot, q3d, masse, psol, itau=0) ! Ecriture état initial physique: - print *, 'dtvr = ', dtvr print *, "iphysiq = ", iphysiq phystep = dtvr * REAL(iphysiq) print *, 'phystep = ', phystep