Changeset 1626 for trunk/LMDZ.GENERIC


Ignore:
Timestamp:
Nov 10, 2016, 6:35:57 AM (8 years ago)
Author:
emillour
Message:

Generic GCM:

Improving XIOS outputs, add the scalar case.
EM

Location:
trunk/LMDZ.GENERIC
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/deftank/context_lmdz_physics.xml

    r1622 r1626  
    2222    </axis_definition>
    2323   
    24     <!-- toggle axis id below to change output vertical axis -->
    25     <grid id="grid_3d">
    26         <domain id="dom_glo" />
    27         <!-- <axis id="presnivs" /> -->
    28         <axis id="altitude" />
    29     </grid>
     24    <grid_definition>
     25        <!-- toggle axis id below to change output vertical axis -->
     26        <grid id="grid_3d">
     27            <domain id="dom_glo" />
     28                <!-- <axis id="presnivs" /> -->
     29                <axis id="altitude" />
     30        </grid>
     31        <!-- to output scalars -->
     32        <grid id="scalarpoint" >
     33            <scalar />
     34        </grid>
     35    </grid_definition>
    3036   
    3137    <!-- Definition of model variables -->
     
    3339                      freq_op="1ts"
    3440                      enabled=".TRUE.">
    35            
     41       
     42        <!-- 0D variables -->
     43        <field_group id="fields_0D" grid_ref="scalarpoint">
     44            <field id="ls"
     45                   long_name="Solar longitude"
     46                   unit="degrees" />
     47        </field_group>   
     48       
    3649        <!-- 2D variables -->
    3750        <field_group id="fields_2D" domain_ref="dom_glo">
     
    4558
    4659        <!-- 3D variables -->
    47         <field_group id="fields_3D" domain_ref="dom_glo" axis_ref="altitude">
    48         <!-- <field_group id="fields_3D" grid_ref="grid_3d"> --> <!-- doesn't work... why? -->
     60        <field_group id="fields_3D" grid_ref="grid_3d">
    4961            <field id="temperature"
    5062                   long_name="Atmospheric temperature"
     
    6981              enabled=".true.">
    7082                   
     83            <!-- VARS 0D -->
     84            <field_group operation="instant"
     85                         freq_op="1ts">
     86                <field field_ref="ls" />
     87            </field_group>
     88
    7189            <!-- VARS 2D -->
    7290            <field_group operation="instant"
     
    92110              enabled=".true.">
    93111                   
     112            <!-- VARS 0D -->
     113            <field_group operation="average"
     114                         freq_op="1ts">
     115                <field field_ref="ls" />
     116            </field_group>
     117
    94118            <!-- VARS 2D -->
    95119            <field_group operation="average"
  • trunk/LMDZ.GENERIC/libf/phystd/physiq_mod.F90

    r1623 r1626  
    21522152      ! Send fields to XIOS: (NB these fields must also be defined as
    21532153      ! <field id="..." /> in context_lmdz_physics.xml to be correctly used)
     2154      CALL send_xios_field("ls",zls)
     2155     
    21542156      CALL send_xios_field("ps",ps)
    21552157      CALL send_xios_field("area",cell_area)
  • trunk/LMDZ.GENERIC/libf/phystd/xios_output_mod.F90

    r1622 r1626  
    1111
    1212 INTERFACE send_xios_field
    13     MODULE PROCEDURE histwrite2d_xios,histwrite3d_xios
     13    MODULE PROCEDURE histwrite0d_xios,histwrite2d_xios,histwrite3d_xios
    1414 END INTERFACE
    1515 
     
    151151!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    152152
     153  SUBROUTINE histwrite0d_xios(field_name,field)
     154  USE xios, ONLY: xios_send_field
     155  USE print_control_mod, ONLY: prt_level, lunout
     156  IMPLICIT NONE
     157 
     158    CHARACTER(LEN=*), INTENT(IN) :: field_name
     159    REAL, INTENT(IN) :: field
     160   
     161    IF (prt_level >= 10) WRITE(lunout,*)'Begin histrwrite0d_xios ',trim(field_name)
     162   
     163!$OMP MASTER
     164    CALL xios_send_field(field_name,field)
     165!$OMP END MASTER
     166   
     167    IF (prt_level >= 10) WRITE(lunout,*)'End histrwrite0d_xios ',trim(field_name)
     168   
     169  END SUBROUTINE histwrite0d_xios
     170
     171!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     172
    153173  SUBROUTINE histwrite2d_xios(field_name,field)
    154174  USE dimphy, only: klon
Note: See TracChangeset for help on using the changeset viewer.