12 |
! Authors: P. Le Van, L. Fairhead |
! Authors: P. Le Van, L. Fairhead |
13 |
! This procedure reads the initial state of the atmosphere. |
! This procedure reads the initial state of the atmosphere. |
14 |
|
|
15 |
use comconst, only: im, dtvr, jm, lllm |
use comconst, only: dtvr |
|
use comvert, only: pa |
|
16 |
use comgeom, only: rlonu, rlatu, rlonv, rlatv, cu_2d, cv_2d, aire_2d |
use comgeom, only: rlonu, rlatu, rlonv, rlatv, cu_2d, cv_2d, aire_2d |
17 |
|
use conf_gcm_m, only: fxyhypb, ysinus |
18 |
use dimens_m, only: iim, jjm, llm, nqmx |
use dimens_m, only: iim, jjm, llm, nqmx |
19 |
|
use disvert_m, only: pa |
20 |
use ener, only: etot0, ang0, ptot0, stot0, ztot0 |
use ener, only: etot0, ang0, ptot0, stot0, ztot0 |
21 |
use iniadvtrac_m, only: tname |
use iniadvtrac_m, only: tname |
22 |
use conf_gcm_m, only: fxyhypb, ysinus |
use netcdf, only: NF90_NOWRITE, NF90_NOERR |
|
use serre, only: clon, clat, grossismy, grossismx |
|
23 |
use netcdf95, only: NF95_GET_VAR, nf95_open, nf95_inq_varid, NF95_CLOSE, & |
use netcdf95, only: NF95_GET_VAR, nf95_open, nf95_inq_varid, NF95_CLOSE, & |
24 |
NF95_Gw_VAR |
NF95_Gw_VAR |
|
use netcdf, only: NF90_NOWRITE, NF90_NOERR |
|
25 |
use nr_util, only: assert |
use nr_util, only: assert |
26 |
|
use serre, only: clon, clat, grossismy, grossismx |
27 |
use temps, only: day_ref, itau_dyn, annee_ref |
use temps, only: day_ref, itau_dyn, annee_ref |
28 |
|
|
29 |
REAL, intent(out):: vcov(: , :, :) ! (iim + 1, jjm, llm) |
REAL, intent(out):: vcov(: , :, :) ! (iim + 1, jjm, llm) |
59 |
call nf95_inq_varid(ncid, "controle", varid) |
call nf95_inq_varid(ncid, "controle", varid) |
60 |
call NF95_Gw_VAR(ncid, varid, tab_cntrl) |
call NF95_Gw_VAR(ncid, varid, tab_cntrl) |
61 |
|
|
62 |
im = int(tab_cntrl(1)) |
call assert(int(tab_cntrl(1)) == iim, "dynetat0 tab_cntrl iim") |
63 |
jm = int(tab_cntrl(2)) |
call assert(int(tab_cntrl(2)) == jjm, "dynetat0 tab_cntrl jjm") |
64 |
lllm = int(tab_cntrl(3)) |
call assert(int(tab_cntrl(3)) == llm, "dynetat0 tab_cntrl llm") |
|
call assert(im == iim, "dynetat0 im iim") |
|
|
call assert(jm == jjm, "dynetat0 jm jjm") |
|
|
call assert(lllm == llm, "dynetat0 lllm llm") |
|
65 |
|
|
66 |
day_ref = int(tab_cntrl(4)) |
day_ref = int(tab_cntrl(4)) |
67 |
annee_ref = int(tab_cntrl(5)) |
annee_ref = int(tab_cntrl(5)) |
68 |
dtvr = tab_cntrl(12) |
|
69 |
|
IF (dtvr /= tab_cntrl(12)) THEN |
70 |
|
print *, 'Warning: the time steps from day_step and "start.nc" ' // & |
71 |
|
'are different.' |
72 |
|
print *, 'dtvr from day_step: ', dtvr |
73 |
|
print *, 'dtvr from "start.nc": ', tab_cntrl(12) |
74 |
|
print *, 'Using the value from day_step.' |
75 |
|
ENDIF |
76 |
|
|
77 |
etot0 = tab_cntrl(13) |
etot0 = tab_cntrl(13) |
78 |
ptot0 = tab_cntrl(14) |
ptot0 = tab_cntrl(14) |
79 |
ztot0 = tab_cntrl(15) |
ztot0 = tab_cntrl(15) |
146 |
|
|
147 |
call NF95_INQ_VARID (ncid, "ps", varid) |
call NF95_INQ_VARID (ncid, "ps", varid) |
148 |
call NF95_GET_VAR(ncid, varid, ps) |
call NF95_GET_VAR(ncid, varid, ps) |
149 |
|
! Check that there is a single value at each pole: |
150 |
|
call assert(ps(1, 1) == ps(2:, 1), "dynetat0 ps north pole") |
151 |
|
call assert(ps(1, jjm + 1) == ps(2:, jjm + 1), "dynetat0 ps south pole") |
152 |
|
|
153 |
call NF95_CLOSE(ncid) |
call NF95_CLOSE(ncid) |
154 |
|
|