1 | | * Guideline 2 |
| 1 | = XIOS Guidelines |
| 2 | |
| 3 | * '''Guideline 1''' (to be discussed)[[BR]] |
| 4 | ''Example1:'' |
| 5 | {{{ |
| 6 | CALL xios_orchidee_send_field("Qg",soilflx) |
| 7 | }}} |
| 8 | Qg: field id[[BR]] |
| 9 | soilflx: the local variable in the FORTRAN code |
| 10 | |
| 11 | and in field_def: |
| 12 | {{{ |
| 13 | <field id="Qg" name="Qg" long_name="Ground heat flux" unit="W/m^2"/> |
| 14 | }}} |
| 15 | Name in output: Qg (because name="Qg") |
| 16 | |
| 17 | '''The name of the "field id" should be the same as the name of the variable'''. Here is example1 modified according to this method:[[BR]] |
| 18 | ''Example 2:'' |
| 19 | {{{ |
| 20 | CALL xios_orchidee_send_field ("soilflx" soilflx) |
| 21 | }}} |
| 22 | soilflx: field id[[BR]] |
| 23 | soilflx: the local variable in the FORTRAN code |
| 24 | |
| 25 | and in field_def: |
| 26 | {{{ |
| 27 | <field id="soilflx" name="Qg" LONG_NAME="Ground heat flux" unit="W/m^2"/> |
| 28 | }}} |
| 29 | Name in output: Qg |
| 30 | |
| 31 | The results are the same. We see the advantage when, for another project for example, the variable is to be called differently in the outputs. |
| 32 | For the first example, if we want to change the name of the variable in the output, this gives (without recompiling):[[BR]] |
| 33 | ''Example3:'' |
| 34 | {{{ |
| 35 | CALL xios_orchidee_send_field ("Qg" soilflx) |
| 36 | }}} |
| 37 | |
| 38 | and in field_def: |
| 39 | {{{ |
| 40 | <field id="Qg" name="GroundHeatF" LONG_NAME="Ground heat flux" unit="W/m^2"/> |
| 41 | }}} |
| 42 | Name in output: GroundHeatF |
| 43 | |
| 44 | => soilflx becomes Qg, which becomes GroundHeatF. |
| 45 | |
| 46 | Example 3 is quite feasible and there are probably cases like that in ORCHIDEE. But the following example makes more sense: |
| 47 | ''Example4:'' |
| 48 | {{{ |
| 49 | CALL xios_orchidee_send_field ("soilflx" soilflx) |
| 50 | }}} |
| 51 | and in fiels_def: |
| 52 | {{{ |
| 53 | <field id="soilflx" name="GroundHeatF" LONG_NAME="Ground heat flux" unit="W/m^2"/> |
| 54 | }}} |
| 55 | |
| 56 | => In this case, soilflx becomes GroundHeatF directly. |
| 57 | |
| 58 | * '''Guideline 2''' |