[3080] | 1 | ! |
---|
| 2 | ! $Id: phyredem.F90 3798 2021-01-11 22:24:08Z lguez $ |
---|
| 3 | ! |
---|
[1827] | 4 | SUBROUTINE phyredem (fichnom) |
---|
[2293] | 5 | ! |
---|
| 6 | !------------------------------------------------------------------------------- |
---|
| 7 | ! Author: Z.X. Li (LMD/CNRS), 1993/08/18 |
---|
| 8 | !------------------------------------------------------------------------------- |
---|
| 9 | ! Purpose: Write restart state for physics. |
---|
| 10 | !------------------------------------------------------------------------------- |
---|
[2395] | 11 | USE dimphy, ONLY: klon, klev |
---|
[1827] | 12 | USE fonte_neige_mod, ONLY : fonte_neige_final |
---|
| 13 | USE pbl_surface_mod, ONLY : pbl_surface_final |
---|
[2499] | 14 | USE phys_state_var_mod, ONLY: radpas, zmasq, pctsrf, ftsol, falb_dir, & |
---|
[2395] | 15 | falb_dif, qsol, fevap, radsol, solsw, sollw, & |
---|
[2499] | 16 | sollwdown, rain_fall, snow_fall, z0m, z0h, & |
---|
| 17 | agesno, zmea, zstd, zsig, zgam, zthe, zpic, & |
---|
| 18 | zval, rugoro, t_ancien, q_ancien, & |
---|
| 19 | prw_ancien, prlw_ancien, prsw_ancien, & |
---|
| 20 | ql_ancien, qs_ancien, u_ancien, & |
---|
| 21 | v_ancien, clwcon, rnebcon, ratqs, pbl_tke, & |
---|
| 22 | wake_delta_pbl_tke, zmax0, f0, sig1, w01, & |
---|
[2635] | 23 | wake_deltat, wake_deltaq, wake_s, wake_dens, & |
---|
| 24 | wake_cstar, & |
---|
[2499] | 25 | wake_pe, wake_fip, fm_therm, entr_therm, & |
---|
[3080] | 26 | detr_therm, ale_bl, ale_bl_trig, alp_bl, & |
---|
| 27 | ale_wake, ale_bl_stat, & |
---|
[3798] | 28 | du_gwd_rando, du_gwd_front, u10m, v10m, & |
---|
| 29 | treedrg, solswfdiff, delta_sal, ds_ns, dt_ns, & |
---|
| 30 | delta_sst |
---|
| 31 | |
---|
[2395] | 32 | USE geometry_mod, ONLY : longitude_deg, latitude_deg |
---|
[3605] | 33 | USE iostart, ONLY: open_restartphy, close_restartphy, enddef_restartphy, put_field, put_var |
---|
[1827] | 34 | USE traclmdz_mod, ONLY : traclmdz_to_restart |
---|
[2320] | 35 | USE infotrac_phy, ONLY: type_trac, niadv, tname, nbtr, nqo |
---|
[1827] | 36 | USE carbon_cycle_mod, ONLY : carbon_cycle_cpl, co2_send |
---|
[2395] | 37 | USE indice_sol_mod, ONLY: nbsrf, is_oce, is_sic, is_ter, is_lic, epsfra |
---|
| 38 | USE surface_data, ONLY: type_ocean, version_ocean |
---|
[2656] | 39 | USE ocean_slab_mod, ONLY : nslay, tslab, seaice, tice, fsic |
---|
[2344] | 40 | USE time_phylmdz_mod, ONLY: annee_ref, day_end, itau_phy, pdtphys |
---|
[3458] | 41 | use config_ocean_skin_m, only: activate_ocean_skin |
---|
[967] | 42 | |
---|
[1827] | 43 | IMPLICIT none |
---|
[2293] | 44 | |
---|
[1827] | 45 | include "dimsoil.h" |
---|
| 46 | include "clesphys.h" |
---|
| 47 | include "thermcell.h" |
---|
| 48 | include "compbl.h" |
---|
| 49 | !====================================================================== |
---|
| 50 | CHARACTER*(*) fichnom |
---|
[967] | 51 | |
---|
[1827] | 52 | ! les variables globales ecrites dans le fichier restart |
---|
[782] | 53 | |
---|
[1827] | 54 | REAL tsoil(klon, nsoilmx, nbsrf) |
---|
| 55 | REAL qsurf(klon, nbsrf) |
---|
| 56 | REAL snow(klon, nbsrf) |
---|
| 57 | real fder(klon) |
---|
| 58 | REAL run_off_lic_0(klon) |
---|
| 59 | REAL trs(klon, nbtr) |
---|
[782] | 60 | |
---|
[1827] | 61 | INTEGER nid, nvarid, idim1, idim2, idim3 |
---|
| 62 | INTEGER ierr |
---|
| 63 | INTEGER length |
---|
| 64 | PARAMETER (length=100) |
---|
| 65 | REAL tab_cntrl(length) |
---|
[782] | 66 | |
---|
[2237] | 67 | INTEGER isoil, nsrf,isw |
---|
[2656] | 68 | CHARACTER (len=2) :: str2 |
---|
[2293] | 69 | CHARACTER (len=256) :: nam, lnam |
---|
[3605] | 70 | INTEGER :: it, iiq, pass |
---|
[524] | 71 | |
---|
[1827] | 72 | !====================================================================== |
---|
[524] | 73 | |
---|
[1827] | 74 | ! Get variables which will be written to restart file from module |
---|
| 75 | ! pbl_surface_mod |
---|
[2243] | 76 | CALL pbl_surface_final(fder, snow, qsurf, tsoil) |
---|
[1279] | 77 | |
---|
[1827] | 78 | ! Get a variable calculated in module fonte_neige_mod |
---|
| 79 | CALL fonte_neige_final(run_off_lic_0) |
---|
[1001] | 80 | |
---|
[1827] | 81 | !====================================================================== |
---|
[1001] | 82 | |
---|
[1827] | 83 | CALL open_restartphy(fichnom) |
---|
[1001] | 84 | |
---|
[3605] | 85 | |
---|
[1827] | 86 | DO ierr = 1, length |
---|
| 87 | tab_cntrl(ierr) = 0.0 |
---|
| 88 | ENDDO |
---|
[2344] | 89 | tab_cntrl(1) = pdtphys |
---|
[1827] | 90 | tab_cntrl(2) = radpas |
---|
| 91 | ! co2_ppm : current value of atmospheric CO2 |
---|
| 92 | tab_cntrl(3) = co2_ppm |
---|
| 93 | tab_cntrl(4) = solaire |
---|
| 94 | tab_cntrl(5) = iflag_con |
---|
| 95 | tab_cntrl(6) = nbapp_rad |
---|
[524] | 96 | |
---|
[3317] | 97 | IF( iflag_cycle_diurne.GE.1 ) tab_cntrl( 7 ) = iflag_cycle_diurne |
---|
[1827] | 98 | IF( soil_model ) tab_cntrl( 8 ) = 1. |
---|
| 99 | IF( new_oliq ) tab_cntrl( 9 ) = 1. |
---|
| 100 | IF( ok_orodr ) tab_cntrl(10 ) = 1. |
---|
| 101 | IF( ok_orolf ) tab_cntrl(11 ) = 1. |
---|
[524] | 102 | |
---|
[1827] | 103 | tab_cntrl(13) = day_end |
---|
| 104 | tab_cntrl(14) = annee_ref |
---|
| 105 | tab_cntrl(15) = itau_phy |
---|
| 106 | |
---|
| 107 | ! co2_ppm0 : initial value of atmospheric CO2 |
---|
| 108 | tab_cntrl(16) = co2_ppm0 |
---|
| 109 | |
---|
[3605] | 110 | DO pass=1,2 ! pass=1 netcdf definition ; pass=2 netcdf write |
---|
| 111 | |
---|
| 112 | CALL put_var(pass, "controle", "Parametres de controle", tab_cntrl) |
---|
[1827] | 113 | |
---|
[3605] | 114 | CALL put_field(pass,"longitude", & |
---|
| 115 | "Longitudes de la grille physique", longitude_deg) |
---|
[1827] | 116 | |
---|
[3605] | 117 | CALL put_field(pass,"latitude", "Latitudes de la grille physique", latitude_deg) |
---|
[1827] | 118 | |
---|
[3605] | 119 | ! PB ajout du masque terre/mer |
---|
[1827] | 120 | |
---|
[3605] | 121 | CALL put_field(pass,"masque", "masque terre mer", zmasq) |
---|
[1827] | 122 | |
---|
[3605] | 123 | ! BP ajout des fraction de chaque sous-surface |
---|
[1827] | 124 | |
---|
[3605] | 125 | ! Get last fractions from slab ocean |
---|
| 126 | IF (type_ocean == 'slab' .AND. version_ocean == "sicINT") THEN |
---|
| 127 | WHERE (1.-zmasq(:).GT.EPSFRA) |
---|
| 128 | pctsrf(:,is_oce)=(1.-fsic(:))*(1.-zmasq(:)) |
---|
| 129 | pctsrf(:,is_sic)=fsic(:)*(1.-zmasq(:)) |
---|
| 130 | END WHERE |
---|
| 131 | END IF |
---|
[2209] | 132 | |
---|
[3605] | 133 | ! 1. fraction de terre |
---|
[1827] | 134 | |
---|
[3605] | 135 | CALL put_field(pass,"FTER", "fraction de continent", pctsrf(:, is_ter)) |
---|
[1827] | 136 | |
---|
[3605] | 137 | ! 2. Fraction de glace de terre |
---|
[1827] | 138 | |
---|
[3605] | 139 | CALL put_field(pass,"FLIC", "fraction glace de terre", pctsrf(:, is_lic)) |
---|
[1827] | 140 | |
---|
[3605] | 141 | ! 3. fraction ocean |
---|
[1827] | 142 | |
---|
[3605] | 143 | CALL put_field(pass,"FOCE", "fraction ocean", pctsrf(:, is_oce)) |
---|
[1827] | 144 | |
---|
[3605] | 145 | ! 4. Fraction glace de mer |
---|
[1827] | 146 | |
---|
[3605] | 147 | CALL put_field(pass,"FSIC", "fraction glace mer", pctsrf(:, is_sic)) |
---|
[1827] | 148 | |
---|
[3605] | 149 | IF(nbsrf>99) THEN |
---|
| 150 | PRINT*, "Trop de sous-mailles"; CALL abort_physic("phyredem", "", 1) |
---|
| 151 | END IF |
---|
| 152 | IF(nsoilmx>99) THEN |
---|
| 153 | PRINT*, "Trop de sous-surfaces"; CALL abort_physic("phyredem", "", 1) |
---|
| 154 | END IF |
---|
| 155 | IF(nsw>99) THEN |
---|
| 156 | PRINT*, "Trop de bandes"; CALL abort_physic("phyredem", "", 1) |
---|
| 157 | END IF |
---|
[1827] | 158 | |
---|
[3605] | 159 | CALL put_field_srf1(pass,"TS","Temperature",ftsol(:,:)) |
---|
[2293] | 160 | |
---|
[2237] | 161 | ! ================== Albedo ======================================= |
---|
[3605] | 162 | print*,'PHYREDEM NOUVEAU' |
---|
| 163 | CALL put_field_srf2(pass,"A_dir_SW","Albedo direct",falb_dir(:,:,:)) |
---|
| 164 | CALL put_field_srf2(pass,"A_dif_SW","Albedo diffus",falb_dif(:,:,:)) |
---|
[2237] | 165 | |
---|
[3605] | 166 | CALL put_field_srf1(pass,"U10M", "u a 10m", u10m) |
---|
[2569] | 167 | |
---|
[3605] | 168 | CALL put_field_srf1(pass,"V10M", "v a 10m", v10m) |
---|
[2569] | 169 | |
---|
| 170 | |
---|
[2293] | 171 | ! ================== Tsoil ========================================= |
---|
[3605] | 172 | CALL put_field_srf2(pass,"Tsoil","Temperature",tsoil(:,:,:)) |
---|
[2952] | 173 | !FC |
---|
| 174 | ! CALL put_field_srf2("treedrg","freinage arbres",treedrg(:,:,:)) |
---|
[3605] | 175 | CALL put_field(pass,"treedrg_ter","freinage arbres",treedrg(:,:,is_ter)) |
---|
[524] | 176 | |
---|
[2952] | 177 | |
---|
[3605] | 178 | CALL put_field_srf1(pass,"QS" , "Humidite",qsurf(:,:)) |
---|
[1827] | 179 | |
---|
[3605] | 180 | CALL put_field (pass,"QSOL", "Eau dans le sol (mm)", qsol) |
---|
[1827] | 181 | |
---|
[3605] | 182 | CALL put_field_srf1(pass,"EVAP", "Evaporation", fevap(:,:)) |
---|
[1827] | 183 | |
---|
[3605] | 184 | CALL put_field_srf1(pass,"SNOW", "Neige", snow(:,:)) |
---|
[1827] | 185 | |
---|
[3605] | 186 | CALL put_field(pass,"RADS", "Rayonnement net a la surface", radsol) |
---|
[1827] | 187 | |
---|
[3605] | 188 | CALL put_field(pass,"solsw", "Rayonnement solaire a la surface", solsw) |
---|
[1827] | 189 | |
---|
[3798] | 190 | CALL put_field(pass,"solswfdiff", "Fraction du rayonnement solaire a la surface qui est diffus", solswfdiff) |
---|
| 191 | |
---|
[3605] | 192 | CALL put_field(pass,"sollw", "Rayonnement IF a la surface", sollw) |
---|
[1827] | 193 | |
---|
[3605] | 194 | CALL put_field(pass,"sollwdown", "Rayonnement down IF a la surface", sollwdown) |
---|
[2188] | 195 | |
---|
[3605] | 196 | CALL put_field(pass,"fder", "Derive de flux", fder) |
---|
[1827] | 197 | |
---|
[3605] | 198 | CALL put_field(pass,"rain_f", "precipitation liquide", rain_fall) |
---|
[1827] | 199 | |
---|
[3605] | 200 | CALL put_field(pass,"snow_f", "precipitation solide", snow_fall) |
---|
[1827] | 201 | |
---|
[3605] | 202 | CALL put_field_srf1(pass,"Z0m", "rugosite", z0m(:,:)) |
---|
[1827] | 203 | |
---|
[3605] | 204 | CALL put_field_srf1(pass,"Z0h", "rugosite", z0h(:,:)) |
---|
[1827] | 205 | |
---|
[3605] | 206 | CALL put_field_srf1(pass,"AGESNO", "Age de la neige", agesno(:,:)) |
---|
[2293] | 207 | |
---|
[3605] | 208 | CALL put_field(pass,"ZMEA", "ZMEA", zmea) |
---|
[1827] | 209 | |
---|
[3605] | 210 | CALL put_field(pass,"ZSTD", "ZSTD", zstd) |
---|
[1827] | 211 | |
---|
[3605] | 212 | CALL put_field(pass,"ZSIG", "ZSIG", zsig) |
---|
[1827] | 213 | |
---|
[3605] | 214 | CALL put_field(pass,"ZGAM", "ZGAM", zgam) |
---|
[1827] | 215 | |
---|
[3605] | 216 | CALL put_field(pass,"ZTHE", "ZTHE", zthe) |
---|
[1827] | 217 | |
---|
[3605] | 218 | CALL put_field(pass,"ZPIC", "ZPIC", zpic) |
---|
[1827] | 219 | |
---|
[3605] | 220 | CALL put_field(pass,"ZVAL", "ZVAL", zval) |
---|
[1827] | 221 | |
---|
[3605] | 222 | CALL put_field(pass,"RUGSREL", "RUGSREL", rugoro) |
---|
[1827] | 223 | |
---|
[3605] | 224 | CALL put_field(pass,"TANCIEN", "TANCIEN", t_ancien) |
---|
[1827] | 225 | |
---|
[3605] | 226 | CALL put_field(pass,"QANCIEN", "QANCIEN", q_ancien) |
---|
[1827] | 227 | |
---|
[3605] | 228 | CALL put_field(pass,"QLANCIEN", "QLANCIEN", ql_ancien) |
---|
[2497] | 229 | |
---|
[3605] | 230 | CALL put_field(pass,"QSANCIEN", "QSANCIEN", qs_ancien) |
---|
[2497] | 231 | |
---|
[3605] | 232 | CALL put_field(pass,"PRWANCIEN", "PRWANCIEN", prw_ancien) |
---|
[1827] | 233 | |
---|
[3605] | 234 | CALL put_field(pass,"PRLWANCIEN", "PRLWANCIEN", prlw_ancien) |
---|
[1827] | 235 | |
---|
[3605] | 236 | CALL put_field(pass,"PRSWANCIEN", "PRSWANCIEN", prsw_ancien) |
---|
[2499] | 237 | |
---|
[3605] | 238 | CALL put_field(pass,"UANCIEN", "UANCIEN", u_ancien) |
---|
[2499] | 239 | |
---|
[3605] | 240 | CALL put_field(pass,"VANCIEN", "VANCIEN", v_ancien) |
---|
[2499] | 241 | |
---|
[3605] | 242 | CALL put_field(pass,"CLWCON", "Eau liquide convective", clwcon) |
---|
[1827] | 243 | |
---|
[3605] | 244 | CALL put_field(pass,"RNEBCON", "Nebulosite convective", rnebcon) |
---|
[1827] | 245 | |
---|
[3605] | 246 | CALL put_field(pass,"RATQS", "Ratqs", ratqs) |
---|
[1827] | 247 | |
---|
[3605] | 248 | ! run_off_lic_0 |
---|
[1827] | 249 | |
---|
[3605] | 250 | CALL put_field(pass,"RUNOFFLIC0", "Runofflic0", run_off_lic_0) |
---|
[1827] | 251 | |
---|
[3605] | 252 | ! DEB TKE PBL ! |
---|
[1827] | 253 | |
---|
[3605] | 254 | IF (iflag_pbl>1) then |
---|
| 255 | CALL put_field_srf3(pass,"TKE", "Energ. Cineti. Turb.", & |
---|
| 256 | pbl_tke(:,:,:)) |
---|
| 257 | CALL put_field_srf3(pass,"DELTATKE", "Del TKE wk/env.", & |
---|
| 258 | wake_delta_pbl_tke(:,:,:)) |
---|
| 259 | END IF |
---|
[1619] | 260 | |
---|
[3605] | 261 | ! FIN TKE PBL ! |
---|
| 262 | !IM ajout zmax0, f0, sig1, w01 |
---|
| 263 | !IM wake_deltat, wake_deltaq, wake_s, wake_cstar, wake_pe, wake_fip |
---|
[1619] | 264 | |
---|
[3605] | 265 | CALL put_field(pass,"ZMAX0", "ZMAX0", zmax0) |
---|
[1619] | 266 | |
---|
[3605] | 267 | CALL put_field(pass,"F0", "F0", f0) |
---|
[878] | 268 | |
---|
[3605] | 269 | CALL put_field(pass,"sig1", "sig1 Emanuel", sig1) |
---|
[1001] | 270 | |
---|
[3605] | 271 | CALL put_field(pass,"w01", "w01 Emanuel", w01) |
---|
[1001] | 272 | |
---|
[3605] | 273 | ! wake_deltat |
---|
| 274 | CALL put_field(pass,"WAKE_DELTAT", "WAKE_DELTAT", wake_deltat) |
---|
[1279] | 275 | |
---|
[3605] | 276 | CALL put_field(pass,"WAKE_DELTAQ", "WAKE_DELTAQ", wake_deltaq) |
---|
[1403] | 277 | |
---|
[3605] | 278 | CALL put_field(pass,"WAKE_S", "Wake frac. area", wake_s) |
---|
[1403] | 279 | |
---|
[3605] | 280 | CALL put_field(pass,"WAKE_DENS", "Wake num. /unit area", wake_dens) |
---|
[2635] | 281 | |
---|
[3605] | 282 | CALL put_field(pass,"WAKE_CSTAR", "WAKE_CSTAR", wake_cstar) |
---|
[1403] | 283 | |
---|
[3605] | 284 | CALL put_field(pass,"WAKE_PE", "WAKE_PE", wake_pe) |
---|
[1403] | 285 | |
---|
[3605] | 286 | CALL put_field(pass,"WAKE_FIP", "WAKE_FIP", wake_fip) |
---|
[1279] | 287 | |
---|
[3605] | 288 | ! thermiques |
---|
[1827] | 289 | |
---|
[3605] | 290 | CALL put_field(pass,"FM_THERM", "FM_THERM", fm_therm) |
---|
[1827] | 291 | |
---|
[3605] | 292 | CALL put_field(pass,"ENTR_THERM", "ENTR_THERM", entr_therm) |
---|
[1827] | 293 | |
---|
[3605] | 294 | CALL put_field(pass,"DETR_THERM", "DETR_THERM", detr_therm) |
---|
[1827] | 295 | |
---|
[3605] | 296 | CALL put_field(pass,"ALE_BL", "ALE_BL", ale_bl) |
---|
[2069] | 297 | |
---|
[3605] | 298 | CALL put_field(pass,"ALE_BL_TRIG", "ALE_BL_TRIG", ale_bl_trig) |
---|
[2069] | 299 | |
---|
[3605] | 300 | CALL put_field(pass,"ALP_BL", "ALP_BL", alp_bl) |
---|
[2069] | 301 | |
---|
[3605] | 302 | CALL put_field(pass,"ALE_WAKE", "ALE_WAKE", ale_wake) |
---|
[3080] | 303 | |
---|
[3605] | 304 | CALL put_field(pass,"ALE_BL_STAT", "ALE_BL_STAT", ale_bl_stat) |
---|
[3080] | 305 | |
---|
| 306 | |
---|
[3605] | 307 | ! trs from traclmdz_mod |
---|
| 308 | IF (type_trac == 'lmdz') THEN |
---|
| 309 | CALL traclmdz_to_restart(trs) |
---|
| 310 | DO it=1, nbtr |
---|
[2265] | 311 | !! iiq=niadv(it+2) ! jyg |
---|
[3605] | 312 | iiq=niadv(it+nqo) ! jyg |
---|
| 313 | CALL put_field(pass,"trs_"//tname(iiq), "", trs(:, it)) |
---|
| 314 | END DO |
---|
| 315 | IF (carbon_cycle_cpl) THEN |
---|
| 316 | IF (.NOT. ALLOCATED(co2_send)) THEN |
---|
| 317 | ! This is the case of create_etat0_limit, ce0l |
---|
| 318 | ALLOCATE(co2_send(klon)) |
---|
| 319 | co2_send(:) = co2_ppm0 |
---|
| 320 | END IF |
---|
| 321 | CALL put_field(pass,"co2_send", "co2_ppm for coupling", co2_send) |
---|
| 322 | END IF |
---|
| 323 | END IF |
---|
| 324 | |
---|
| 325 | ! Restart variables for Slab ocean |
---|
| 326 | IF (type_ocean == 'slab') THEN |
---|
| 327 | IF (nslay.EQ.1) THEN |
---|
| 328 | CALL put_field(pass,"tslab", "Slab ocean temperature", tslab) |
---|
| 329 | ELSE |
---|
| 330 | DO it=1,nslay |
---|
| 331 | WRITE(str2,'(i2.2)') it |
---|
| 332 | CALL put_field(pass,"tslab"//str2, "Slab ocean temperature", tslab(:,it)) |
---|
| 333 | END DO |
---|
[1827] | 334 | END IF |
---|
[3605] | 335 | IF (version_ocean == 'sicINT') THEN |
---|
| 336 | CALL put_field(pass,"seaice", "Slab seaice (kg/m2)", seaice) |
---|
| 337 | CALL put_field(pass,"slab_tice", "Slab sea ice temperature", tice) |
---|
| 338 | END IF |
---|
| 339 | END IF |
---|
[1827] | 340 | |
---|
[3605] | 341 | if (ok_gwd_rando) call put_field(pass,"du_gwd_rando", & |
---|
| 342 | "tendency on zonal wind due to flott gravity waves", du_gwd_rando) |
---|
[2057] | 343 | |
---|
[3605] | 344 | IF (.not. ok_hines .and. ok_gwd_rando) call put_field(pass,"du_gwd_front", & |
---|
| 345 | "tendency on zonal wind due to acama gravity waves", du_gwd_front) |
---|
[1938] | 346 | |
---|
[3605] | 347 | if (activate_ocean_skin >= 1) then |
---|
[3740] | 348 | if (activate_ocean_skin == 2 .and. type_ocean == 'couple') then |
---|
[3767] | 349 | CALL put_field(pass, "delta_sal", & |
---|
| 350 | "ocean-air interface salinity minus bulk salinity", delta_sal) |
---|
[3744] | 351 | CALL put_field(pass, "delta_SST", & |
---|
| 352 | "ocean-air interface temperature minus bulk SST", delta_sst) |
---|
[3740] | 353 | end if |
---|
| 354 | |
---|
[3628] | 355 | CALL put_field(pass, "dS_ns", "delta salinity near surface", ds_ns) |
---|
[3605] | 356 | CALL put_field(pass, "dT_ns", "delta temperature near surface", dT_ns) |
---|
| 357 | end if |
---|
| 358 | |
---|
| 359 | IF (pass==1) CALL enddef_restartphy |
---|
| 360 | IF (pass==2) CALL close_restartphy |
---|
| 361 | ENDDO |
---|
[3429] | 362 | |
---|
[1827] | 363 | !$OMP BARRIER |
---|
| 364 | |
---|
[2293] | 365 | |
---|
| 366 | CONTAINS |
---|
| 367 | |
---|
| 368 | |
---|
[3605] | 369 | SUBROUTINE put_field_srf1(pass,nam,lnam,field) |
---|
[2293] | 370 | |
---|
| 371 | IMPLICIT NONE |
---|
[3605] | 372 | INTEGER, INTENT(IN) :: pass |
---|
[2293] | 373 | CHARACTER(LEN=*), INTENT(IN) :: nam, lnam |
---|
| 374 | REAL, INTENT(IN) :: field(:,:) |
---|
| 375 | CHARACTER(LEN=256) :: nm, lm, str |
---|
[2299] | 376 | DO nsrf = 1, SIZE(field,2) |
---|
[2293] | 377 | WRITE(str, '(i2.2)') nsrf |
---|
| 378 | nm=TRIM(nam)//TRIM(str) |
---|
| 379 | lm=TRIM(lnam)//" de surface No. "//TRIM(str) |
---|
[3605] | 380 | CALL put_field(pass,nm,lm,field(:,nsrf)) |
---|
[2293] | 381 | END DO |
---|
| 382 | |
---|
| 383 | END SUBROUTINE put_field_srf1 |
---|
| 384 | |
---|
| 385 | |
---|
[3605] | 386 | SUBROUTINE put_field_srf2(pass,nam,lnam,field) |
---|
[2293] | 387 | |
---|
| 388 | IMPLICIT NONE |
---|
[3605] | 389 | INTEGER, INTENT(IN) :: pass |
---|
[2293] | 390 | CHARACTER(LEN=*), INTENT(IN) :: nam, lnam |
---|
| 391 | REAL, INTENT(IN) :: field(:,:,:) |
---|
| 392 | CHARACTER(LEN=256) :: nm, lm, str |
---|
[2299] | 393 | DO nsrf = 1, SIZE(field,3) |
---|
| 394 | DO isoil=1, SIZE(field,2) |
---|
[2293] | 395 | WRITE(str, '(i2.2,"srf",i2.2)')isoil,nsrf |
---|
| 396 | ! WRITE(lunout,*)"PHYREDEM ",TRIM(nam)//TRIM(str) |
---|
| 397 | nm=TRIM(nam)//TRIM(str) |
---|
| 398 | lm=TRIM(lnam)//" du sol No. "//TRIM(str) |
---|
[3605] | 399 | CALL put_field(pass,nm,lm,field(:,isoil,nsrf)) |
---|
[2293] | 400 | END DO |
---|
| 401 | END DO |
---|
| 402 | |
---|
| 403 | END SUBROUTINE put_field_srf2 |
---|
| 404 | |
---|
| 405 | |
---|
[3605] | 406 | SUBROUTINE put_field_srf3(pass,nam,lnam,field) |
---|
[2293] | 407 | |
---|
| 408 | IMPLICIT NONE |
---|
[3605] | 409 | INTEGER, INTENT(IN) :: pass |
---|
[2293] | 410 | CHARACTER(LEN=*), INTENT(IN) :: nam, lnam |
---|
| 411 | REAL, INTENT(IN) :: field(:,:,:) |
---|
| 412 | CHARACTER(LEN=256) :: nm, lm, str |
---|
[2299] | 413 | DO nsrf = 1, SIZE(field,3) |
---|
[2293] | 414 | WRITE(str, '(i2.2)') nsrf |
---|
| 415 | nm=TRIM(nam)//TRIM(str) |
---|
| 416 | lm=TRIM(lnam)//TRIM(str) |
---|
[3605] | 417 | CALL put_field(pass,nm,lm,field(:,1:klev+1,nsrf)) |
---|
[2293] | 418 | END DO |
---|
| 419 | |
---|
| 420 | END SUBROUTINE put_field_srf3 |
---|
| 421 | |
---|
| 422 | |
---|
[1827] | 423 | END SUBROUTINE phyredem |
---|