--- trunk/dyn3d/etat0.f 2018/12/10 15:54:30 313 +++ trunk/dyn3d/etat0.f90 2019/07/31 14:55:23 330 @@ -25,14 +25,14 @@ use grille_m_m, only: grille_m use grid_change, only: init_dyn_phy, dyn_phy use indicesol, only: is_oce, is_sic, is_ter, is_lic, epsfra, nbsrf - use iniadvtrac_m, only: iniadvtrac + use infotrac_init_m, only: infotrac_init use inifilr_m, only: inifilr use massdair_m, only: massdair use netcdf, only: nf90_nowrite use netcdf95, only: nf95_close, nf95_get_var, nf95_gw_var, nf95_put_var, & nf95_inq_varid, nf95_open use nr_util, only: pi, assert - use phyetat0_m, only: zmasq, phyetat0_new + use phyetat0_m, only: masque, phyetat0_new use phyredem0_m, only: phyredem0, ncid_restartphy use phyredem_m, only: phyredem use q_sat_m, only: q_sat @@ -62,7 +62,7 @@ ! and pressure level "pls(i, j, l)".) real qsat(iim + 1, jjm + 1, llm) ! mass fraction of saturating water vapor - REAL qsolsrf(klon, nbsrf), snsrf(klon, nbsrf) + REAL qsolsrf(klon, nbsrf), fsnow(klon, nbsrf) REAL albe(klon, nbsrf) REAL tsoil(klon, nsoilmx, nbsrf) REAL null_array(klon) @@ -84,7 +84,7 @@ INTEGER iml_lic, jml_lic INTEGER ncid, varid REAL, ALLOCATABLE:: dlon_lic(:), dlat_lic(:) - REAL, ALLOCATABLE:: fraclic(:, :) ! fraction land ice + REAL, ALLOCATABLE:: landice(:, :) ! fraction land ice REAL flic_tmp(iim + 1, jjm + 1) ! fraction land ice temporary INTEGER l, ji @@ -207,8 +207,8 @@ jml_lic = size(dlat_lic) call nf95_inq_varid(ncid, 'landice', varid) - ALLOCATE(fraclic(iml_lic, jml_lic)) - call nf95_get_var(ncid, varid, fraclic) + ALLOCATE(landice(iml_lic, jml_lic)) + call nf95_get_var(ncid, varid, landice) call nf95_close(ncid) @@ -225,7 +225,7 @@ dlat_lic = dlat_lic * pi/ 180. ENDIF - flic_tmp(:iim, :) = grille_m(dlon_lic, dlat_lic, fraclic, rlonv(:iim), & + flic_tmp(:iim, :) = grille_m(dlon_lic, dlat_lic, landice, rlonv(:iim), & rlatu) flic_tmp(iim + 1, :) = flic_tmp(1, :) @@ -235,24 +235,24 @@ ! Ad\'equation avec le maque terre/mer : WHERE (pctsrf(:, is_lic) < EPSFRA) pctsrf(:, is_lic) = 0. - WHERE (zmasq < EPSFRA) pctsrf(:, is_lic) = 0. - where (zmasq <= EPSFRA) pctsrf(:, is_ter) = zmasq - where (zmasq > EPSFRA) - where (pctsrf(:, is_lic) >= zmasq) - pctsrf(:, is_lic) = zmasq + WHERE (masque < EPSFRA) pctsrf(:, is_lic) = 0. + where (masque <= EPSFRA) pctsrf(:, is_ter) = masque + where (masque > EPSFRA) + where (pctsrf(:, is_lic) >= masque) + pctsrf(:, is_lic) = masque pctsrf(:, is_ter) = 0. elsewhere - pctsrf(:, is_ter) = zmasq - pctsrf(:, is_lic) + pctsrf(:, is_ter) = masque - pctsrf(:, is_lic) where (pctsrf(:, is_ter) < EPSFRA) pctsrf(:, is_ter) = 0. - pctsrf(:, is_lic) = zmasq + pctsrf(:, is_lic) = masque end where end where end where ! Sous-surface oc\'ean et glace de mer (pour d\'emarrer on met glace ! de mer \`a 0) : - pctsrf(:, is_oce) = 1. - zmasq + pctsrf(:, is_oce) = 1. - masque WHERE (pctsrf(:, is_oce) < EPSFRA) pctsrf(:, is_oce) = 0. ! V\'erification que la somme des sous-surfaces vaut 1 : @@ -270,14 +270,14 @@ SUM(aire_2d(:iim, jjm + 1) * masse(:iim, jjm + 1, l)) / apols END forall - call iniadvtrac + call infotrac_init CALL geopot(teta, pk , pks, phis, phi) CALL caldyn0(ucov, vcov, teta, ps, pk, phis, phi) CALL dynredem0(day_ref, phis) CALL dynredem1(vcov, ucov, teta, q, masse, ps, itau = 0) ! Initialisations : - snsrf = 0. + fsnow = 0. albe(:, is_ter) = 0.08 albe(:, is_lic) = 0.6 albe(:, is_oce) = 0.5 @@ -307,7 +307,7 @@ call nf95_put_var(ncid_restartphy, varid, null_array) call phyredem(pctsrf, tsoil(:, 1, :), tsoil, qsolsrf, & - pack(qsol_2d, dyn_phy), snsrf, albe, null_array, null_array, solsw, & + pack(qsol_2d, dyn_phy), fsnow, albe, null_array, null_array, solsw, & sollw, null_array, null_array, frugs, agesno, zmea, zstd, zsig, zgam, & zthe, zpic, zval, t_ancien, q_ancien, rnebcon, ratqs, clwcon, & null_array, sig1, w01)