Changes between Version 4 and Version 5 of GroupActivities/Meetings/Retreat20151119/GuidelinesXIOS


Ignore:
Timestamp:
2015-11-09T18:05:10+01:00 (9 years ago)
Author:
nvuilsce
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GroupActivities/Meetings/Retreat20151119/GuidelinesXIOS

    v4 v5  
    3535}}} 
    3636 
    37 For variables which are vectors, such as the variable 'carbon' 
     37For variables which are vectors, such as the variable 'carbon_passive' for instance in stomate_lpj.f90 
     38{{{ 
     39CALL xios_orchidee_send_field("CARBON_PASSIVE",carbon(:,ipassive,:)) 
     40}}} 
    3841 
    3942== '''Guideline 2''' : Units == 
    40 We propose to output variables with the same units  
     43Conversion of units, or operation between elementary output variables (such as a sum or a product), can be performed and defined in the field_def file. 
    4144 
     45We propose to output variables with the same units as they are used. One exception is regarding the time unit. We don't want to ouput variables expressed per time step unit, like a flux per 30min. The unit "per second" should be the standard. 
     46 
     47''Example 1:''[[BR]] 
     48For instance, in intersurf.f90 line [http://forge.ipsl.jussieu.fr/orchidee/browser/trunk/ORCHIDEE/src_sechiba/intersurf.f90#L1701 1701]: 
     49The instruction 
     50{{{ 
     51CALL xios_orchidee_send_field("evap",zvevapp*one_day/dt_sechiba) 
     52}}} 
     53should be modified as follows: 
     54{{{ 
     55CALL xios_orchidee_send_field("zvevapp",zvevapp/dt_sechiba) 
     56}}} 
     57 
     58and in the field_def file, instead of having[[BR]] 
     59{{{ 
     60<field id="evap" name="evap" long_name="Evaporation" unit="mm/d"/> 
     61}}} 
     62one proposes to have: 
     63{{{ 
     64<field id="zvevapp" name="zvevapp" long_name="Evaporation" unit="mm/s"/> 
     65<field id="evap" name="evap" field_ref="zvevapp" long_name="Evaporation" unit="mm/d"/> zvevapp*86400 
     66}}} 
     67 
     68''Example 2:''[[BR]] 
     69Some outputs are only the sum of elementary outputs. For instance, in slowproc.f90, the following section can be deleted: 
     70{{{ 
     71! 4.2.2 Compute the net primary production as the diff from 
     72! Gross primary productin and the growth and maintenance 
     73! respirations 
     74npp(:,1)=zero 
     75DO j = 2,nvm 
     76   npp(:,j) = gpp(:,j) - resp_growth(:,j) - resp_maint(:,j) 
     77ENDDO 
     78                
     79CALL xios_orchidee_send_field("npp",npp/dt_sechiba) 
     80}}} 
     81beacause, gpp, resp_growth and resp_maint are already ouptuts.[[BR]] 
     82 
     83npp will be now only set in the field_def file as follows: 
     84 
     85 
     86  
    4287== '''Guideline 2''' == 
    4388We do the "CALL xios_orchidee_send_field" in the module where the variable is calculated. If the variable is changed in several places, we do the call in the last XIOS module where it is changed or in sechiba_main, this has to be decided case by case.