10 |
SUBROUTINE start_init_phys(tsol_2d, qsol_2d) |
SUBROUTINE start_init_phys(tsol_2d, qsol_2d) |
11 |
|
|
12 |
USE flincom, only: flininfo, flinopen_nozoom, flinclo |
USE flincom, only: flininfo, flinopen_nozoom, flinclo |
|
use flinget_m, only: flinget |
|
13 |
use conf_dat2d_m, only: conf_dat2d |
use conf_dat2d_m, only: conf_dat2d |
14 |
use inter_barxy_m, only: inter_barxy |
use inter_barxy_m, only: inter_barxy |
15 |
use gr_int_dyn_m, only: gr_int_dyn |
use gr_int_dyn_m, only: gr_int_dyn |
16 |
use comgeom, only: rlonu, rlatv |
use comgeom, only: rlonu, rlatv |
17 |
use dimens_m, only: iim, jjm |
use dimens_m, only: iim, jjm |
18 |
use nr_util, only: assert |
use nr_util, only: assert |
19 |
|
use netcdf, only: nf90_nowrite |
20 |
|
use netcdf95, only: nf95_open, nf95_close, nf95_get_var, nf95_inq_varid |
21 |
|
|
22 |
REAL, intent(out):: tsol_2d(:, :), qsol_2d(:, :) ! (iim + 1, jjm + 1) |
REAL, intent(out):: tsol_2d(:, :), qsol_2d(:, :) ! (iim + 1, jjm + 1) |
23 |
|
|
24 |
! Variables local to the procedure: |
! Variables local to the procedure: |
25 |
|
|
26 |
INTEGER fid_phys, iml_phys, jml_phys |
INTEGER fid_phys, iml_phys, jml_phys, ncid, varid |
27 |
REAL, ALLOCATABLE, DIMENSION(:, :):: lon_phys, lat_phys |
REAL, ALLOCATABLE, DIMENSION(:, :):: lon_phys, lat_phys |
28 |
REAL date, dt |
REAL date, dt |
29 |
REAL, ALLOCATABLE:: levphys_ini(:) |
REAL, ALLOCATABLE:: levphys_ini(:) |
30 |
|
|
31 |
INTEGER:: itau(1) |
INTEGER itau(1) |
32 |
INTEGER:: llm_tmp, ttm_tmp |
INTEGER llm_tmp, ttm_tmp |
33 |
|
|
34 |
REAL, ALLOCATABLE:: lon_rad(:), lat_rad(:) |
REAL, ALLOCATABLE:: lon_rad(:), lat_rad(:) |
35 |
REAL, ALLOCATABLE:: lon_ini(:), lat_ini(:) |
REAL, ALLOCATABLE:: lon_ini(:), lat_ini(:) |
53 |
|
|
54 |
CALL flinopen_nozoom(iml_phys, jml_phys, llm_tmp, lon_phys, lat_phys, & |
CALL flinopen_nozoom(iml_phys, jml_phys, llm_tmp, lon_phys, lat_phys, & |
55 |
levphys_ini, ttm_tmp, itau, date, dt, fid_phys) |
levphys_ini, ttm_tmp, itau, date, dt, fid_phys) |
56 |
|
CALL flinclo(fid_phys) |
57 |
|
|
58 |
DEALLOCATE(levphys_ini) |
DEALLOCATE(levphys_ini) |
59 |
|
|
79 |
lat_ini = lat_phys(1, :) |
lat_ini = lat_phys(1, :) |
80 |
ENDIF |
ENDIF |
81 |
|
|
82 |
|
call nf95_open('ECPHY.nc', nf90_nowrite, ncid) |
83 |
|
|
84 |
! We get the two standard variables |
! We get the two standard variables |
85 |
! 'ST': surface temperature |
! 'ST': surface temperature |
86 |
CALL flinget(fid_phys, 'ST', iml_phys, jml_phys, & |
call nf95_inq_varid(ncid, 'ST', varid) |
87 |
llm_tmp, ttm_tmp, 1, 1, var_ana) |
call nf95_get_var(ncid, varid, var_ana) |
88 |
CALL conf_dat2d(lon_ini, lat_ini, lon_rad, lat_rad, var_ana) |
CALL conf_dat2d(lon_ini, lat_ini, lon_rad, lat_rad, var_ana) |
89 |
CALL inter_barxy(lon_rad, lat_rad(:jml_phys -1), var_ana, rlonu(:iim), & |
CALL inter_barxy(lon_rad, lat_rad(:jml_phys -1), var_ana, rlonu(:iim), & |
90 |
rlatv, tmp_var) |
rlatv, tmp_var) |
|
|
|
91 |
tsol_2d = gr_int_dyn(tmp_var) |
tsol_2d = gr_int_dyn(tmp_var) |
92 |
|
|
93 |
! Soil moisture |
! Soil moisture |
94 |
CALL flinget(fid_phys, 'CDSW', iml_phys, jml_phys, & |
call nf95_inq_varid(ncid, 'CDSW', varid) |
95 |
llm_tmp, ttm_tmp, 1, 1, var_ana) |
call nf95_get_var(ncid, varid, var_ana) |
96 |
CALL conf_dat2d(lon_ini, lat_ini, lon_rad, lat_rad, var_ana) |
CALL conf_dat2d(lon_ini, lat_ini, lon_rad, lat_rad, var_ana) |
97 |
CALL inter_barxy(lon_rad, lat_rad(:jml_phys -1), var_ana, rlonu(:iim), & |
CALL inter_barxy(lon_rad, lat_rad(:jml_phys -1), var_ana, rlonu(:iim), & |
98 |
rlatv, tmp_var) |
rlatv, tmp_var) |
99 |
qsol_2d = gr_int_dyn(tmp_var) |
qsol_2d = gr_int_dyn(tmp_var) |
100 |
|
|
101 |
CALL flinclo(fid_phys) |
call nf95_close(ncid) |
102 |
|
|
103 |
END SUBROUTINE start_init_phys |
END SUBROUTINE start_init_phys |
104 |
|
|