1 | MODULE etat0_limit_unstruct_mod |
---|
2 | |
---|
3 | LOGICAL, SAVE :: create_etat0_limit |
---|
4 | !$OMP THREADPRIVATE(create_etat0_limit) |
---|
5 | |
---|
6 | |
---|
7 | |
---|
8 | |
---|
9 | CONTAINS |
---|
10 | |
---|
11 | SUBROUTINE init_etat0_limit_unstruct |
---|
12 | USE xios |
---|
13 | USE mod_phys_lmdz_para |
---|
14 | USE mod_grid_phy_lmdz |
---|
15 | USE ioipsl, ONLY : getin, ioget_year_len |
---|
16 | USE time_phylmdz_mod, ONLY : annee_ref |
---|
17 | IMPLICIT NONE |
---|
18 | |
---|
19 | INTEGER :: iflag_phys,i |
---|
20 | INTEGER :: ndays |
---|
21 | REAL,ALLOCATABLE :: value(:) |
---|
22 | |
---|
23 | IF (grid_type==unstructured) THEN |
---|
24 | IF (is_master) CALL getin("iflag_phys",iflag_phys) |
---|
25 | CALL bcast(iflag_phys) |
---|
26 | |
---|
27 | IF (is_master) CALL getin('create_etat0_limit',create_etat0_limit) |
---|
28 | CALL bcast(create_etat0_limit) |
---|
29 | |
---|
30 | ndays=ioget_year_len(annee_ref) |
---|
31 | ALLOCATE(value(ndays)) |
---|
32 | DO i=1,ndays |
---|
33 | value(i)=i-1 |
---|
34 | ENDDO |
---|
35 | |
---|
36 | CALL xios_set_axis_attr("time_year",n_glo=ndays,value=value) |
---|
37 | |
---|
38 | IF (iflag_phys<100) THEN |
---|
39 | |
---|
40 | IF (create_etat0_limit) THEN |
---|
41 | CALL xios_set_fieldgroup_attr("etat0_limit_read",read_access=.TRUE.,enabled=.TRUE.) |
---|
42 | CALL xios_set_filegroup_attr("etat0_limit_read",enabled=.TRUE.) |
---|
43 | ENDIF |
---|
44 | |
---|
45 | ENDIF |
---|
46 | |
---|
47 | ENDIF |
---|
48 | |
---|
49 | END SUBROUTINE init_etat0_limit_unstruct |
---|
50 | |
---|
51 | SUBROUTINE create_etat0_limit_unstruct |
---|
52 | USE mod_grid_phy_lmdz |
---|
53 | USE create_etat0_unstruct_mod |
---|
54 | USE create_limit_unstruct_mod |
---|
55 | USE phyaqua_mod |
---|
56 | USE mod_phys_lmdz_para |
---|
57 | USE ioipsl, ONLY : getin |
---|
58 | USE dimphy |
---|
59 | IMPLICIT NONE |
---|
60 | INTEGER :: iflag_phys |
---|
61 | |
---|
62 | IF (grid_type==unstructured) THEN |
---|
63 | |
---|
64 | IF (is_master) CALL getin("iflag_phys",iflag_phys) |
---|
65 | CALL bcast(iflag_phys) |
---|
66 | |
---|
67 | IF (iflag_phys<100) THEN |
---|
68 | IF ( create_etat0_limit) THEN |
---|
69 | CALL create_etat0_unstruct |
---|
70 | CALL create_limit_unstruct |
---|
71 | CALL abort_physic ('create_etat0_limit_unstruct','Initial state file are created, all is fine' ,1) |
---|
72 | ENDIF |
---|
73 | ELSE |
---|
74 | IF (create_etat0_limit) THEN |
---|
75 | CALL iniaqua(klon,iflag_phys) |
---|
76 | CALL abort_physic ('create_etat0_limit_unstruct','Initial state file are created, all is fine' ,1) |
---|
77 | ENDIF |
---|
78 | ENDIF |
---|
79 | ENDIF |
---|
80 | |
---|
81 | END SUBROUTINE create_etat0_limit_unstruct |
---|
82 | |
---|
83 | END MODULE etat0_limit_unstruct_mod |
---|