Changeset 3719 for trunk/LMDZ.VENUS
- Timestamp:
- Apr 11, 2025, 3:56:08 PM (2 months ago)
- Location:
- trunk/LMDZ.VENUS/libf/phyvenus
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.VENUS/libf/phyvenus/iostart.F90
r901 r3719 4 4 INTEGER,SAVE :: nid_start 5 5 INTEGER,SAVE :: nid_restart 6 6 !$OMP THREADPRIVATE(nid_start,nid_restart) 7 7 8 INTEGER,SAVE :: idim1,idim2,idim3,idim4 9 !$OMP THREADPRIVATE(idim1,idim2,idim3,idim4) 8 10 INTEGER,PARAMETER :: length=100 9 11 … … 30 32 31 33 SUBROUTINE open_startphy(filename) 32 USE netcdf 33 USE mod_phys_lmdz_para 34 IMPLICIT NONE 35 CHARACTER(LEN=*) :: filename34 USE netcdf, ONLY: NF90_OPEN, nf90_strerror, NF90_NOWRITE, NF90_NOERR 35 USE mod_phys_lmdz_para, ONLY: is_master 36 IMPLICIT NONE 37 CHARACTER(LEN=*),INTENT(IN) :: filename 36 38 INTEGER :: ierr 37 39 38 IF (is_m pi_root .AND. is_omp_root) THEN40 IF (is_master) THEN 39 41 ierr = NF90_OPEN (filename, NF90_NOWRITE,nid_start) 40 42 IF (ierr.NE.NF90_NOERR) THEN 41 write( 6,*)' Pb d''ouverture du fichier '//filename42 write( 6,*)' ierr = ', ierr43 CALL ABORT43 write(*,*)'open_startphy: problem opening file '//trim(filename) 44 write(*,*)trim(nf90_strerror(ierr)) 45 CALL abort_physic("open_startphy","Cannot open file",1) 44 46 ENDIF 45 47 ENDIF … … 48 50 49 51 SUBROUTINE Close_startphy 50 USE netcdf 51 USE mod_phys_lmdz_para 52 USE netcdf, ONLY: NF90_CLOSE 53 USE mod_phys_lmdz_para, ONLY: is_master 52 54 IMPLICIT NONE 53 55 INTEGER :: ierr 54 56 55 IF (is_m pi_root .AND. is_omp_root) THEN57 IF (is_master) THEN 56 58 ierr = NF90_CLOSE (nid_start) 57 59 ENDIF … … 61 63 62 64 FUNCTION Inquire_Field(Field_name) 63 USE netcdf 64 USE mod_phys_lmdz_para 65 IMPLICIT NONE 66 CHARACTER(LEN=*) :: Field_name65 USE netcdf, ONLY: NF90_INQ_VARID, NF90_NOERR 66 USE mod_phys_lmdz_para, only: is_master, bcast 67 IMPLICIT NONE 68 CHARACTER(LEN=*),INTENT(IN) :: Field_name 67 69 LOGICAL :: inquire_field 68 70 INTEGER :: varid 69 71 INTEGER :: ierr 70 72 71 IF (is_m pi_root .AND. is_omp_root) THEN73 IF (is_master) THEN 72 74 ierr=NF90_INQ_VARID(nid_start,Field_name,varid) 73 75 IF (ierr==NF90_NOERR) THEN … … 127 129 128 130 SUBROUTINE Get_field_rgen(field_name,field,field_size,found) 129 USE netcdf 130 USE dimphy 131 USE mod_grid_phy_lmdz 132 USE mod_phys_lmdz_para 133 IMPLICIT NONE 134 CHARACTER(LEN=*) :: Field_name 135 INTEGER :: field_size 136 REAL :: field(klon,field_size) 137 LOGICAL,OPTIONAL :: found 138 139 REAL :: field_glo(klon_glo,field_size) 131 USE netcdf, ONLY: NF90_INQ_VARID, NF90_GET_VAR, NF90_NOERR 132 USE dimphy, ONLY: klon ! number of columns on local grid 133 USE geometry_mod, ONLY: ind_cell_glo 134 USE mod_grid_phy_lmdz, ONLY: klon_glo ! number of columns on global grid 135 USE mod_phys_lmdz_para, ONLY: is_master, bcast, scatter, gather 136 IMPLICIT NONE 137 CHARACTER(LEN=*),INTENT(IN) :: Field_name 138 INTEGER,INTENT(IN) :: field_size 139 REAL,INTENT(OUT) :: field(klon,field_size) 140 LOGICAL,OPTIONAL,INTENT(OUT) :: found 141 142 REAL :: field_glo(klon_glo,field_size) ! field on global grid 143 REAL :: field_glo_tmp(klon_glo,field_size) 144 INTEGER :: ind_cell_glo_glo(klon_glo) ! cell indexes on global grid 140 145 LOGICAL :: tmp_found 141 146 INTEGER :: varid 142 INTEGER :: ierr 143 144 IF (is_mpi_root .AND. is_omp_root) THEN 147 INTEGER :: ierr, i 148 149 ! gather columns indexes on global grid 150 CALL gather(ind_cell_glo,ind_cell_glo_glo) 151 152 IF (is_master) THEN 145 153 146 154 ierr=NF90_INQ_VARID(nid_start,Field_name,varid) 147 155 148 156 IF (ierr==NF90_NOERR) THEN 149 CALL body(field_glo )157 CALL body(field_glo_tmp) 150 158 tmp_found=.TRUE. 151 159 ELSE … … 153 161 ENDIF 154 162 155 ENDIF 163 ENDIF ! of IF (is_master) 156 164 157 165 CALL bcast(tmp_found) 158 166 159 167 IF (tmp_found) THEN 168 IF (is_master) THEN 169 ! reorder columns according to ind_cell_glo(:) indexes 170 DO i=1,klon_glo 171 field_glo(i,:)=field_glo_tmp(ind_cell_glo_glo(i),:) 172 ENDDO 173 ENDIF 160 174 CALL scatter(field_glo,field) 161 175 ENDIF … … 165 179 ELSE 166 180 IF (.NOT. tmp_found) THEN 167 PRINT*, ' phyetat0: Le champ <'//field_name//'> est absent'168 CALL abort 181 PRINT*, 'get_field_rgen: Field <'//field_name//'> not found' 182 CALL abort_physic("get_field_rgen","Failed to find field",1) 169 183 ENDIF 170 184 ENDIF … … 178 192 IF (ierr/=NF90_NOERR) THEN 179 193 ! La variable exist dans le fichier mais la lecture a echouee. 180 PRINT*, ' phyetat0: Lecture echouee pour<'//field_name//'>'181 182 IF (field_name=='CLWCON' .OR. field_name=='RNEBCON' .OR. field_name=='RATQS') THEN183 ! Essaye de lire le variable sur surface uniqument, comme fait avant184 field_glo(:)=0.185 ierr=NF90_GET_VAR(nid_start,varid,field_glo(1:klon_glo))186 IF (ierr/=NF90_NOERR) THEN187 PRINT*, 'phyetat0: Lecture echouee aussi en 2D pour <'//field_name//'>'188 CALL abort189 ELSE190 PRINT*, 'phyetat0: La variable <'//field_name//'> lu sur surface seulement'!, selon ancien format, le reste mis a zero'191 END IF192 ELSE193 CALL abort194 ENDIF194 PRINT*, 'get_field_rgen: Failed reading <'//field_name//'>' 195 ! It looks like the following is for Earth physics only... 196 !IF (field_name=='CLWCON' .OR. field_name=='RNEBCON' .OR. field_name=='RATQS') THEN 197 ! ! Essaye de lire le variable sur surface uniqument, comme fait avant 198 ! field_glo(:)=0. 199 ! ierr=NF90_GET_VAR(nid_start,varid,field_glo(1:klon_glo)) 200 ! IF (ierr/=NF90_NOERR) THEN 201 ! PRINT*, 'phyetat0: Lecture echouee aussi en 2D pour <'//field_name//'>' 202 ! CALL abort 203 ! ELSE 204 ! PRINT*, 'phyetat0: La variable <'//field_name//'> lu sur surface seulement'!, selon ancien format, le reste mis a zero' 205 ! END IF 206 !ELSE 207 CALL abort_physic("get_field_rgen","Failed to read field",1) 208 !ENDIF 195 209 ENDIF 196 210 … … 260 274 261 275 SUBROUTINE Get_var_rgen(var_name,var,var_size,found) 262 USE netcdf 263 USE dimphy 264 USE mod_grid_phy_lmdz 265 USE mod_phys_lmdz_para 266 IMPLICIT NONE 267 CHARACTER(LEN=*) :: var_name 268 INTEGER :: var_size 269 REAL :: var(var_size) 270 LOGICAL,OPTIONAL :: found 276 USE netcdf, ONLY: NF90_INQ_VARID, NF90_GET_VAR, NF90_NOERR 277 USE mod_phys_lmdz_para, ONLY: is_master, bcast 278 IMPLICIT NONE 279 CHARACTER(LEN=*),INTENT(IN) :: var_name 280 INTEGER,INTENT(IN) :: var_size 281 REAL,INTENT(OUT) :: var(var_size) 282 LOGICAL,OPTIONAL,INTENT(OUT) :: found 271 283 272 284 LOGICAL :: tmp_found … … 274 286 INTEGER :: ierr 275 287 276 IF (is_m pi_root .AND. is_omp_root) THEN288 IF (is_master) THEN 277 289 278 290 ierr=NF90_INQ_VARID(nid_start,var_name,varid) … … 281 293 ierr=NF90_GET_VAR(nid_start,varid,var) 282 294 IF (ierr/=NF90_NOERR) THEN 283 PRINT*, 'phyetat0: Lecture echouee pour <'//var_name//'>'284 CALL abort 295 PRINT*, 'phyetat0: Failed loading <'//trim(var_name)//'>' 296 CALL abort_physic("get_var_rgen","Failed to read variable",1) 285 297 ENDIF 286 298 tmp_found=.TRUE. … … 301 313 ELSE 302 314 IF (.NOT. tmp_found) THEN 303 PRINT*, 'phyetat0: La variable champ <'//var_name//'> est absente'304 CALL abort 315 PRINT*, 'phyetat0: Variable <'//trim(var_name)//'> not found' 316 CALL abort_physic("get_var_rgen","Failed to read variable",1) 305 317 ENDIF 306 318 ENDIF … … 310 322 311 323 SUBROUTINE open_restartphy(filename) 312 USE netcdf 313 USE mod_phys_lmdz_para 314 USE mod_grid_phy_lmdz 315 USE dimphy 324 USE netcdf, ONLY: NF90_CREATE, NF90_CLOBBER, NF90_NOERR, nf90_strerror, & 325 NF90_PUT_ATT, NF90_GLOBAL, NF90_DEF_DIM, & 326 NF90_ENDDEF 327 USE mod_phys_lmdz_para,ONLY: is_master 328 USE mod_grid_phy_lmdz, ONLY: klon_glo 329 USE dimphy, ONLY: klev, klevp1 316 330 IMPLICIT NONE 317 331 CHARACTER(LEN=*),INTENT(IN) :: filename 318 332 INTEGER :: ierr 319 333 320 IF (is_m pi_root .AND. is_omp_root) THEN334 IF (is_master) THEN 321 335 ierr = NF90_CREATE(filename, NF90_CLOBBER, nid_restart) 322 336 IF (ierr/=NF90_NOERR) THEN 323 write(6,*)' Pb d''ouverture du fichier '//filename324 write(6,*)' ierr = ', ierr325 CALL ABORT337 write(*,*)'open_restartphy: problem creating file '//trim(filename) 338 write(*,*)trim(nf90_strerror(ierr)) 339 CALL abort_physic("open_restartphy","Failed creating file",1) 326 340 ENDIF 327 341 … … 339 353 340 354 SUBROUTINE close_restartphy 341 USE netcdf 342 USE mod_phys_lmdz_para 355 USE netcdf, ONLY: NF90_CLOSE 356 USE mod_phys_lmdz_para, ONLY: is_master 343 357 IMPLICIT NONE 344 358 INTEGER :: ierr 345 359 346 IF (is_m pi_root .AND. is_omp_root) THEN360 IF (is_master) THEN 347 361 ierr = NF90_CLOSE (nid_restart) 348 362 ENDIF … … 382 396 383 397 SUBROUTINE put_field_rgen(field_name,title,field,field_size) 384 USE netcdf 385 USE dimphy 386 USE mod_grid_phy_lmdz 387 USE mod_phys_lmdz_para 398 USE netcdf, ONLY: NF90_REDEF, NF90_ENDDEF, NF90_DEF_VAR, NF90_PUT_ATT, & 399 NF90_PUT_VAR, NF90_FLOAT, NF90_DOUBLE 400 USE dimphy, ONLY: klon, klev, klevp1 401 USE mod_grid_phy_lmdz, ONLY: klon_glo 402 USE mod_phys_lmdz_para, ONLY: is_master, gather 403 USE geometry_mod, ONLY: ind_cell_glo 404 388 405 IMPLICIT NONE 389 406 CHARACTER(LEN=*),INTENT(IN) :: field_name … … 392 409 REAL,INTENT(IN) :: field(klon,field_size) 393 410 394 REAL :: field_glo(klon_glo,field_size) 411 REAL :: field_glo(klon_glo,field_size) 412 REAL :: field_glo_tmp(klon_glo,field_size) 413 INTEGER :: ind_cell_glo_glo(klon_glo) ! cell indexes on global grid 414 395 415 INTEGER :: ierr 396 416 INTEGER :: nvarid 397 417 INTEGER :: idim 418 INTEGER :: i 398 419 399 400 CALL gather(field,field_glo) 401 402 IF (is_mpi_root .AND. is_omp_root) THEN 403 420 ! gather indexes on global grid 421 CALL gather(ind_cell_glo,ind_cell_glo_glo) 422 ! gather field on master 423 CALL gather(field,field_glo_tmp) 424 425 IF (is_master) THEN 426 ! reorder columns 427 DO i=1,klon_glo 428 field_glo(ind_cell_glo_glo(i),:)=field_glo_tmp(i,:) 429 ENDDO 430 404 431 IF (field_size==1) THEN 405 432 idim=idim2 … … 409 436 idim=idim4 410 437 ELSE 411 PRINT *, "erreur phyredem : probleme de dimension"412 CALL ABORT438 WRITE(*,*)"put_field_rgen error: issue with dimensions" 439 CALL abort_physic("put_field_rgen","wrong field dimensions",1) 413 440 ENDIF 414 441 … … 471 498 472 499 SUBROUTINE put_var_rgen(var_name,title,var,var_size) 473 USE netcdf 474 USE dimphy475 USE mod_phys_lmdz_para 500 USE netcdf, ONLY: NF90_REDEF, NF90_DEF_VAR, NF90_ENDDEF, NF90_PUT_VAR, & 501 NF90_PUT_ATT, NF90_FLOAT, NF90_DOUBLE 502 USE mod_phys_lmdz_para, ONLY: is_master 476 503 IMPLICIT NONE 477 504 CHARACTER(LEN=*),INTENT(IN) :: var_name … … 483 510 INTEGER :: nvarid 484 511 485 IF (is_m pi_root .AND. is_omp_root) THEN512 IF (is_master) THEN 486 513 487 514 IF (var_size/=length) THEN 488 PRINT *, "erreur phyredem : probleme de dimension"489 CALL abort 515 WRITE(*,*)"put_var_rgen error: issue with dimensions" 516 CALL abort_physic("put_var_rgen","wrong field dimensions",1) 490 517 ENDIF 491 518 -
trunk/LMDZ.VENUS/libf/phyvenus/phyetat0.F90
r3451 r3719 1 ! 2 ! $Id $ 3 ! 1 module phyetat0_mod 2 3 implicit none 4 5 contains 6 4 7 subroutine phyetat0(fichnom) 5 8 ! Load initial state for the physics 6 9 ! and do some resulting initializations 7 10 8 USE dimphy 9 USE mod_grid_phy_lmdz 10 USE mod_phys_lmdz_para 11 USE iophy 12 USE phys_state_var_mod 13 USE iostart 14 use geometry_mod, only: longitude_deg, latitude_deg 15 USE time_phylmdz_mod, only: itau_phy, raz_date, pdtphys 16 USE ioipsl_getin_p_mod, only: getin_p 11 use dimphy, only: klon 12 use iophy, only: init_iophy_new 13 use phys_state_var_mod, only: ftsol, ftsoil, age, dlw, falbe, fder, q2, & 14 radsol, sollw, sollwdown, solsw, & 15 ancien_ok, t_ancien, & 16 zmea, zgam, zpic, zsig, zstd, zthe, zval 17 use iostart, only: get_var, get_field, open_startphy, close_startphy 18 use geometry_mod, only: longitude_deg, latitude_deg 19 use time_phylmdz_mod, only: itau_phy, raz_date, pdtphys 20 use ioipsl_getin_p_mod, only: getin_p 17 21 use nonoro_gwd_ran_mod, only: du_nonoro_gwd, dv_nonoro_gwd, & 18 22 east_gwstress, west_gwstress … … 20 24 implicit none 21 25 !====================================================================== 22 ! Auteur(s) Z.X. Li (LMD/CNRS) date: 1993081823 ! Objet: Lecture de l'etat initial pour la physique24 !======================================================================25 !include "netcdf.inc"26 26 include "dimsoil.h" 27 27 include "clesphys.h" … … 36 36 REAL :: lon_startphy(klon), lat_startphy(klon) 37 37 REAL :: surface_albedo 38 39 ! les variables globales lues dans le fichier restart 38 character(len=8) :: modname="phyetat0" 39 40 ! global variables read in startphy.nc file 40 41 41 42 ! open physics initial state file: … … 50 51 CALL get_var("controle",tab_cntrl,found) 51 52 IF (.not.found) THEN 52 PRINT*, 'phyetat0: Le champ <controle> est absent'53 CALL abort53 write(*,*) modname//': Field <controle> is missing' 54 call abort_physic(modname,"Missing <controle>",1) 54 55 ENDIF 55 56 … … 63 64 itau_phy = tab_cntrl(15) 64 65 65 ! Attention si raz_date estactive :66 ! i l faut remettre a zero itau_phy apresphyetat0 !66 ! Warning, if raz_date is active : 67 ! itau_phy must be re-set to zero after phyetat0 ! 67 68 IF (raz_date.eq.1) THEN 68 69 itau_phy=0 … … 81 82 call get_field("latitude",lat_startphy,found) 82 83 IF (.not.found) THEN 83 PRINT*, 'phyetat0: Le champ <latitude> est absent'84 CALL abort84 write(*,*) modname//':: Field <latitude> is missing' 85 call abort_physic(modname,"Missing <latitude>",1) 85 86 ENDIF 86 87 DO i=1,klon 87 88 IF (ABS(lat_startphy(i)-latitude_deg(i))>=0.01) THEN 88 WRITE(*,*) "phyetat0: Warning! Latitude discrepancy wrt startphy file:",&89 WRITE(*,*) modname//": Warning! Latitude discrepancy wrt startphy file:",& 89 90 " i=",i," lat_startphy(i)=",lat_startphy(i),& 90 91 " latitude_deg(i)=",latitude_deg(i) 91 CALL abort92 call abort_physic(modname,"<latitude> values discrepency",1) 92 93 ENDIF 93 94 ENDDO … … 96 97 call get_field("longitude",lon_startphy,found) 97 98 IF (.not.found) THEN 98 PRINT*, 'phyetat0: Le champ <longitude> est absent'99 CALL abort99 write(*,*)'phyetat0: Field <longitude> is missing' 100 call abort_physic(modname,"Missing <longitude>",1) 100 101 ENDIF 101 102 DO i=1,klon 102 103 IF (ABS(lon_startphy(i)-longitude_deg(i))>=0.01) THEN 103 WRITE(*,*) "phyetat0: Warning! Longitude discrepancy wrt startphy file:",&104 WRITE(*,*) modname//": Warning! Longitude discrepancy wrt startphy file:",& 104 105 " i=",i," lon_startphy(i)=",lon_startphy(i),& 105 106 " longitude_deg(i)=",longitude_deg(i) 106 CALL abort107 call abort_physic(modname,"<latitude> values discrepency",1) 107 108 ENDIF 108 109 ENDDO … … 115 116 CALL get_field("TS",ftsol(:),found) 116 117 IF (.not.found) THEN 117 PRINT*, 'phyetat0: Le champ <TS> est absent' 118 PRINT*, "phyetat0: Lecture echouee pour <TS>" 119 CALL abort 118 WRITE(*,*) modname//": Field <TS> is missing" 119 call abort_physic(modname,"Missing <TS>",1) 120 120 ELSE 121 PRINT*, 'phyetat0: Le champ <TS> est present'122 PRINT*,'Temperature du sol<TS>', minval(ftsol), maxval(ftsol)121 WRITE(*,*) modname//": Field <TS> is present" 122 WRITE(*,*) 'Surface temperature <TS>', minval(ftsol), maxval(ftsol) 123 123 ENDIF 124 124 ELSE … … 131 131 DO isoil=1, nsoilmx 132 132 IF (isoil.GT.99) THEN 133 PRINT*, "Trop de couches"134 CALL abort133 WRITE(*,*) "Too many layers!" 134 call abort_physic(modname,"Too many subsurface layers",1) 135 135 ENDIF 136 136 WRITE(str2,'(i2.2)') isoil 137 137 CALL get_field('Tsoil'//str2,ftsoil(:,isoil),found) 138 138 IF (.not.found) THEN 139 PRINT*, "phyetat0: Le champ <Tsoil"//str2//"> est absent"140 PRINT*, " Il prend donc la valeur de surface"139 WRITE(*,*) modname//": Field <Tsoil"//str2//"> is missing" 140 WRITE(*,*) " it will be nitialized with surface value" 141 141 DO i=1, klon 142 142 ftsoil(i,isoil)=ftsol(i) … … 153 153 CALL get_field("ALBE", falbe,found) 154 154 IF (.not.found) THEN 155 PRINT*, 'phyetat0: Le champ <ALBE> est absent' 156 PRINT*, "phyetat0: Lecture echouee pour <ALBE>" 157 CALL abort 155 WRITE(*,*) modname//": Field <ALBE> is missing" 156 call abort_physic(modname,"Missing <ALBE>",1) 158 157 ENDIF 159 158 ELSE … … 163 162 falbe(:)=surface_albedo 164 163 ENDIF ! of IF (startphy_file) 165 PRINT*,'Albedo du sol<ALBE>', minval(falbe), maxval(falbe)166 167 IF (startphy_file) THEN 168 ! Lecture rayonnement solaire au sol:164 WRITE(*,*) 'Surface albedo <ALBE>', minval(falbe), maxval(falbe) 165 166 IF (startphy_file) THEN 167 ! Solar flux to the surface: 169 168 CALL get_field("solsw",solsw,found) 170 169 IF (.not.found) THEN 171 PRINT*, 'phyetat0: Le champ <solsw> est absent'172 PRINT*, 'mis a zero'170 WRITE(*,*) modname//": Field <solsw> is missing" 171 WRITE(*,*) "set to zero" 173 172 solsw = 0. 174 173 ENDIF … … 177 176 solsw(:)=0 178 177 ENDIF ! of IF (startphy_file) 179 PRINT*,'Rayonnement solaire au solsolsw:', minval(solsw), maxval(solsw)180 181 IF (startphy_file) THEN 182 ! Lecture rayonnement IR au sol:178 WRITE(*,*) 'Solar flux to the surface solsw:', minval(solsw), maxval(solsw) 179 180 IF (startphy_file) THEN 181 ! IR flux to the surface: 183 182 CALL get_field("sollw",sollw,found) 184 183 IF (.not.found) THEN 185 PRINT*, 'phyetat0: Le champ <sollw> est absent'186 PRINT*, 'mis a zero'184 WRITE(*,*) modname//": Field <sollw> is missing" 185 WRITE(*,*) "set to zero" 187 186 sollw = 0. 188 187 ENDIF … … 191 190 sollw(:)=0 192 191 ENDIF ! of IF (startphy_file) 193 PRINT*,'Rayonnement IR au solsollw:', minval(sollw), maxval(solsw)194 195 IF (startphy_file) THEN 196 ! Lecture derive des flux:192 WRITE(*,*) 'IR flux to the surface sollw:', minval(sollw), maxval(solsw) 193 194 IF (startphy_file) THEN 195 ! Derivative of the sensible and latent fluxes: 197 196 CALL get_field("fder",fder,found) 198 197 IF (.not.found) THEN 199 PRINT*, 'phyetat0: Le champ <fder> est absent'200 PRINT*, 'mis a zero'198 WRITE(*,*) modname//": Field <fder> is missing" 199 WRITE(*,*) "set to zero" 201 200 fder = 0. 202 201 ENDIF … … 205 204 fder(:)=0 206 205 ENDIF ! of IF (startphy_file) 207 PRINT*,'Derive desflux fder:', minval(fder), maxval(fder)208 209 IF (startphy_file) THEN 210 ! Lecture derive flux IR:206 WRITE(*,*) 'Derivative of the flux fder:', minval(fder), maxval(fder) 207 208 IF (startphy_file) THEN 209 ! Derivative of the IR flux: 211 210 CALL get_field("dlw",dlw,found) 212 211 IF (.not.found) THEN 213 PRINT*, 'phyetat0: Le champ <dlw> est absent'214 PRINT*, 'mis a zero'212 WRITE(*,*) modname//": Field <dlw> is missing" 213 WRITE(*,*) "set to zero" 215 214 dlw = 0. 216 215 ENDIF … … 219 218 dlw(:)=0 220 219 ENDIF ! of IF (startphy_file) 221 PRINT*,'Derive flux IRdlw:', minval(dlw), maxval(dlw)222 223 IF (startphy_file) THEN 224 ! Lecture rayonnement IR vers le bas au sol:220 WRITE(*,*) 'Derivative of the IR flux dlw:', minval(dlw), maxval(dlw) 221 222 IF (startphy_file) THEN 223 ! Downward IR flux at the surface: 225 224 CALL get_field("sollwdown",sollwdown,found) 226 225 IF (.not.found) THEN 227 PRINT*, 'phyetat0: Le champ <sollwdown> est absent'228 PRINT*, 'mis a zero'226 WRITE(*,*) modname//": Field <sollwdown> is missing" 227 WRITE(*,*) "set to zero" 229 228 sollwdown = 0. 230 229 ENDIF … … 233 232 sollwdown(:)=0 234 233 ENDIF ! of IF (startphy_file) 235 PRINT*,'Flux IR vers le bas au solsollwdown:', minval(sollwdown), maxval(sollwdown)236 237 IF (startphy_file) THEN 238 ! Lecture du rayonnement net au sol:234 WRITE(*,*) 'Downward IR flux at the surface sollwdown:', minval(sollwdown), maxval(sollwdown) 235 236 IF (startphy_file) THEN 237 ! Net flux at the surface: 239 238 CALL get_field("RADS",radsol,found) 240 239 IF (.not.found) THEN 241 PRINT*, 'phyetat0: Le champ <RADS> est absent'242 CALL abort240 WRITE(*,*) modname//": Field <RADS> is missing" 241 call abort_physic(modname,"Missing <RADS>",1) 243 242 ENDIF 244 243 ELSE … … 246 245 radsol(:)=0 247 246 ENDIF ! of IF (startphy_file) 248 PRINT*,'Rayonnement net au solradsol:', minval(radsol), maxval(radsol)247 WRITE(*,*) 'Net flux at the surface radsol:', minval(radsol), maxval(radsol) 249 248 250 249 IF (startphy_file) THEN … … 252 251 CALL get_field("ZMEA",zmea,found) 253 252 IF (.not.found) THEN 254 PRINT*, 'phyetat0: Le champ <ZMEA> est absent'255 PRINT*, 'mis a zero'253 WRITE(*,*) modname//": Field <ZMEA> is missing" 254 WRITE(*,*) "set to zero" 256 255 zmea=0. 257 256 ENDIF … … 259 258 zmea(:)=0 260 259 ENDIF ! of IF (startphy_file) 261 PRINT*,'OROGRAPHIE SOUS-MAILLEzmea:', minval(zmea), maxval(zmea)260 WRITE(*,*) 'Subgrid scale orography zmea:', minval(zmea), maxval(zmea) 262 261 263 262 IF (startphy_file) THEN … … 265 264 CALL get_field("ZSTD",zstd,found) 266 265 IF (.not.found) THEN 267 PRINT*, 'phyetat0: Le champ <ZSTD> est absent'268 PRINT*, 'mis a zero'266 WRITE(*,*) modname//": Field <ZSTD> is missing" 267 WRITE(*,*) "set to zero" 269 268 zstd=0. 270 269 ENDIF … … 272 271 zstd(:)=0 273 272 ENDIF ! of IF (startphy_file) 274 PRINT*,'OROGRAPHIE SOUS-MAILLEzstd:', minval(zstd), maxval(zstd)273 WRITE(*,*) 'Subgrid scale orography zstd:', minval(zstd), maxval(zstd) 275 274 276 275 IF (startphy_file) THEN … … 278 277 CALL get_field("ZSIG",zsig,found) 279 278 IF (.not.found) THEN 280 PRINT*, 'phyetat0: Le champ <ZSIG> est absent'281 PRINT*, 'mis a zero'279 WRITE(*,*) modname//": Field <ZSIG> is missing" 280 WRITE(*,*) "set to zero" 282 281 zsig=0. 283 282 ENDIF … … 285 284 zsig(:)=0 286 285 ENDIF ! of IF (startphy_file) 287 PRINT*,'OROGRAPHIE SOUS-MAILLEzsig:', minval(zsig), maxval(zsig)286 WRITE(*,*) 'Subgrid scale orography zsig:', minval(zsig), maxval(zsig) 288 287 289 288 IF (startphy_file) THEN … … 291 290 CALL get_field("ZGAM",zgam,found) 292 291 IF (.not.found) THEN 293 PRINT*, 'phyetat0: Le champ <ZGAM> est absent'294 PRINT*, 'mis a zero'292 WRITE(*,*) modname//": Field <ZGAM> is missing" 293 WRITE(*,*) "set to zero" 295 294 zgam=0. 296 295 ENDIF … … 298 297 zgam(:)=0 299 298 ENDIF ! of IF (startphy_file) 300 PRINT*,'OROGRAPHIE SOUS-MAILLEzgam:', minval(zgam), maxval(zgam)299 WRITE(*,*) 'Subgrid scale orography zgam:', minval(zgam), maxval(zgam) 301 300 302 301 IF (startphy_file) THEN … … 304 303 CALL get_field("ZTHE",zthe,found) 305 304 IF (.not.found) THEN 306 PRINT*, 'phyetat0: Le champ <ZTHE> est absent'307 PRINT*, 'mis a zero'305 WRITE(*,*) modname//": Field <ZTHE> is missing" 306 WRITE(*,*) "set to zero" 308 307 zthe=0. 309 308 ENDIF … … 311 310 zthe(:)=0 312 311 ENDIF ! of IF (startphy_file) 313 PRINT*,'OROGRAPHIE SOUS-MAILLEzthe:', minval(zthe), maxval(zthe)312 WRITE(*,*) 'Subgrid scale orography zthe:', minval(zthe), maxval(zthe) 314 313 315 314 IF (startphy_file) THEN … … 317 316 CALL get_field("ZPIC",zpic,found) 318 317 IF (.not.found) THEN 319 PRINT*, 'phyetat0: Le champ <ZPIC> est absent'320 PRINT*, 'mis a zero'318 WRITE(*,*) modname//": Field <ZPIC> is missing" 319 WRITE(*,*) "set to zero" 321 320 zpic=0. 322 321 ENDIF … … 324 323 zpic(:)=0 325 324 ENDIF ! of IF (startphy_file) 326 PRINT*,'OROGRAPHIE SOUS-MAILLEzpic:', minval(zpic), maxval(zpic)325 WRITE(*,*) 'Subgrid scale orography zpic:', minval(zpic), maxval(zpic) 327 326 328 327 IF (startphy_file) THEN … … 330 329 CALL get_field("ZVAL",zval,found) 331 330 IF (.not.found) THEN 332 PRINT*, 'phyetat0: Le champ <ZVAL> est absent'333 PRINT*, 'mis a zero'331 WRITE(*,*) modname//": Field <ZVAL> is missing" 332 WRITE(*,*) "set to zero" 334 333 zval=0. 335 334 ENDIF … … 337 336 zval(:)=0 338 337 ENDIF ! of IF (startphy_file) 339 PRINT*,'OROGRAPHIE SOUS-MAILLEzval:', minval(zval), maxval(zval)338 WRITE(*,*) 'Subgrid scale orography zval:', minval(zval), maxval(zval) 340 339 341 340 IF (startphy_file) THEN … … 345 344 CALL get_field("TANCIEN",t_ancien,found) 346 345 IF (.not.found) THEN 347 PRINT*, "phyetat0: Le champ <TANCIEN> est absent"348 PRINT*, "Depart legerement fausse. Mais je continue"346 WRITE(*,*) modname//": Field <TANCIEN> is missing" 347 WRITE(*,*) "Slightly biaised start. But let's keep going." 349 348 ancien_ok = .FALSE. 350 349 ENDIF … … 368 367 CALL get_field("Q2",q2,found) 369 368 IF (.not.found) THEN 370 PRINT*, 'phyetat0: Le champ <Q2> est absent'371 PRINT*, 'mis a zero'369 WRITE(*,*) modname//": Field <Q2> is missing" 370 WRITE(*,*) "set to zero" 372 371 q2(:,:)=0. 373 372 ENDIF … … 376 375 q2(:,:)=0 377 376 ENDIF ! of IF (startphy_file) 378 PRINT*,'Turbulent Kinetic Energy', minval(q2), maxval(q2)377 WRITE(*,*) 'Turbulent Kinetic Energy', minval(q2), maxval(q2) 379 378 380 379 ! Non-orographic gravity waves … … 415 414 416 415 end subroutine phyetat0 416 417 end module phyetat0_mod -
trunk/LMDZ.VENUS/libf/phyvenus/physiq_mod.F
r3622 r3719 92 92 use comm_wrf 93 93 #else 94 use phyetat0_mod, only: phyetat0 94 95 use iophy 95 96 use write_field_phy … … 246 247 EXTERNAL hgardfou ! verifier les temperatures 247 248 c EXTERNAL orbite ! calculer l'orbite 248 EXTERNAL phyetat0 ! lire l'etat initial de la physique249 249 EXTERNAL phyredem ! ecrire l'etat de redemarrage de la physique 250 250 EXTERNAL radlwsw ! rayonnements solaire et infrarouge
Note: See TracChangeset
for help on using the changeset viewer.