Commit ff6b6d75 authored by ymeur's avatar ymeur
Browse files

Manage automatically switch from xios XML start/restart file for...

Manage automatically switch from xios XML start/restart file for reading/writing, or not, fields required by non-hydrostatic model.
YM
parent 328f95fc
Pipeline #182810 passed with stages
in 8 minutes and 51 seconds
......@@ -50,7 +50,8 @@
</field_group>
<field_group axis_ref="levp1" >
<field_group id="non_hydro_restart" axis_ref="levp1" >
<!-- this group will be activated automatically if needed -->
<field id="geopot_restart" name="geopot" />
<field id="W_restart" name="W" />
</field_group>
......@@ -116,7 +117,8 @@
</field_group>
</field_group>
<field_group axis_ref="levp1" enabled="false">
<field_group id="non_hydro_start" axis_ref="levp1">
<!-- this group will be activated automatically if needed -->
<field id="geopot_start" name="geopot" />
<field id="W_start" name="W" />
</field_group>
......
......@@ -73,6 +73,12 @@
</field_group>
</field_group>
<field_group id="non_hydro_restart" axis_ref="levp1" >
<field id="geopot_restart" name="geopot" />
<field id="W_restart" name="W" />
</field_group>
</field_group>
</field_group>
</file>
......@@ -130,8 +136,13 @@
<field_group id="tracers_start">
<!-- tracers will be add atomatically here-->
</field_group>
</field_group>
<field_group id="non_hydro_start" axis_ref="levp1">
<field id="geopot_start" name="geopot" />
<field id="W_start" name="W" />
</field_group>
</field_group>
<field id="q_start" name="q" grid_ref="grid_q_start" prec="8"/>
</field_group>
......
......@@ -64,6 +64,7 @@ CONTAINS
CALL xios_add_child(tracers_restart,tracer_restart,TRIM(tracers(iq)%name)//"_restart")
CALL xios_set_attr(tracer_restart, name=TRIM(tracers(iq)%name))
ENDDO
CALL xios_set_fieldgroup_attr("non_hydro_restart",enabled = .NOT. hydrostatic)
IF (is_write_start) THEN
CALL xios_set_file_attr("start0", enabled=.TRUE., output_freq=1*xios_timestep,name=TRIM(ADJUSTL(start_file_name))//"0")
......@@ -73,6 +74,7 @@ CONTAINS
CALL xios_add_child(tracers_start,tracer_start,TRIM(tracers(iq)%name)//"_start0")
CALL xios_set_attr(tracer_start, name=TRIM(tracers(iq)%name))
ENDDO
ENDIF
IF (is_read_start) THEN
......@@ -94,6 +96,8 @@ CONTAINS
status = NF90_CLOSE(ncid)
ELSE
CALL xios_set_file_attr("start", enabled=.TRUE., output_freq=(itaumax+1)*xios_timestep, name=TRIM(ADJUSTL(start_file_name)))
CALL xios_set_fieldgroup_attr("non_hydro_start",enabled = .NOT. hydrostatic)
status = NF90_OPEN(TRIM(start_file_name)//'.nc', NF90_NOWRITE, ncid)
CALL xios_get_handle("tracers_start",tracers_start)
DO iq=1,nqtot
......
......@@ -50,7 +50,8 @@
</field_group>
<field_group axis_ref="levp1" >
<field_group id="non_hydro_restart" axis_ref="levp1" >
<!-- this group will be activated automatically if needed -->
<field id="geopot_restart" name="geopot" />
<field id="W_restart" name="W" />
</field_group>
......@@ -116,7 +117,8 @@
</field_group>
</field_group>
<field_group axis_ref="levp1" >
<field_group id="non_hydro_start" axis_ref="levp1" >
<!-- this group will be activated automatically if needed -->
<field id="geopot_start" name="geopot" />
<field id="W_start" name="W" />
</field_group>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment