Changes between Version 4 and Version 5 of Documentation/UserGuide/VariableHistory


Ignore:
Timestamp:
2017-02-27T10:59:13+01:00 (7 years ago)
Author:
luyssaert
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/UserGuide/VariableHistory

    v4 v5  
    11= How to add a variable to history.nc = 
    22 
    3 Define the variable in intersurf.f90, check whether the correct operators (i.e. ave) and history level i.e. (4) are defined more information on 'histdef' and 'histwrite' can be found on the documentation page of this wiki ( or another HowTo, http://forge.ipsl.jussieu.fr/orchidee/wiki/HowTo/HistoryOperators) 
     3Define the variable in ioipslctrl.f90, check whether the correct operators (i.e. ave) and history level i.e. (4) are defined more information on 'histdef' and 'histwrite' can be found on the documentation page of this wiki ( or another HowTo, http://forge.ipsl.jussieu.fr/orchidee/wiki/HowTo/HistoryOperators) 
    44 
    5 The first big question is where to put the histdef.  It goes in intersurf, but there are five possible places for it.  The questions you need to ask yourself are: 1) Is this a stomate or sechiba variable? 2) If it is sechiba, do I want to write it to the high frequency file or just the regular file (only a few variables should, in theory, be written to the HF file)? 3) Is this variable part of the ALMA convention or not (if you're not sure, the answer is probably "no")? 
     5The first big question is where to put the histdef.  It goes in ioipslctrl.f90, but there are five possible places for it.  The questions you need to ask yourself are: 1) Is this a stomate or sechiba variable? 2) If it is sechiba, do I want to write it to the high frequency file or just the regular file (only a few variables should, in theory, be written to the HF file)? 3) Is this variable part of the ALMA convention or not (if you're not sure, the answer is probably "no")? 
    66 
    7 The basic structure of intersurf for defining variables is 
     7The basic structure of ioipslctrl for defining variables is 
    88 
    99{{{ 
    10   SUBROUTINE intsurf_history 
     10  SUBROUTINE 
    1111 
    1212  ! Writing to the main history file, file id hist_id 
     
    4848 
    4949{{{  
    50 ! total living biomass 
     50! total fruit biomass 
    5151    CALL histdef (hist_id_stom, & 
    5252         &               TRIM("Fruit_M             "), & 
     
    6565 
    6666There also seems to be a convention that if you are defining a variable for ALMA output, the first letter is a capital letter, and otherwise it is lowercase.  I do not know this for a fact, but it seems to be that way in the code. 
     67 
     68If despite your best efforts you get error messages (i.e., define the variable XXX) it may be worth to check the length of your variable name in histdef. There is a maximal length. If that length is exceeded, the string will get truncated and so the field that you think that does exist e.g. VERYLONGVARIABLENAME is in the model known as e.g. VERYLONGVARI. 
     69 
     70Note that IOIPSL routines (histdef, histwrite, getin, ...) are case sensitive. That is another classic cause of appearantly illogic problems.