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


Ignore:
Timestamp:
2020-02-28T14:04:29+01:00 (4 years ago)
Author:
maignan
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/UserGuide/LoopIGCM

    v4 v5  
    11= How to loop over years with libIGCM = 
    22Author: M. !McGrath 
     3Last revision: 2020/02/28, F. Maignan 
    34 
    4 Let's say that you want to run a 200Y long simulation, but you only want to use a few years of forcing data (we won't worry about why you want to do this at the moment).  This is pretty easy to do with libIGCM by slightly modifying Josefine's instructions for running with analytical spinup, which I've mostly copied here. 
     5Let's say that you want to run a 200Y long simulation, but you only want to use a few years of forcing data (we won't worry about why you want to do this at the moment). This is pretty easy to do with libIGCM by slightly modifying Josefine's instructions for running with analytical spinup, which I've mostly copied here. 
    56 
    6 NOTE: You have to loop over multiples of four years.  If you do not, something strange happens in the leap years and only 11 out of the 12 months are printed in the history files sometimes.  I talked to Josefine about it and we couldn't figure out why, so we're just using this as a fix.  I have no idea how this works for things like FLUXNET validation. 
     7NOTE: You have to loop over multiples of four years.  If you do not, something strange happens in the leap years and only 11 out of the 12 months are printed in the history files sometimes.  I talked to Josefine about it and we couldn't figure out why, so we're just using this as a fix. I have no idea how this works for things like FLUXNET validation. 
    78 
    8 NOTE2:  Because of the previous note, take care to make sure your leap years line up in your looping years and your "real" years. I'll explain this more below. 
     9NOTE2: Because of the previous note, take care to make sure your leap years line up in your looping years and your "real" years. I'll explain this more below. 
    910 
    1011NOTE3: You need libIGCM tag libIGCM_v2.0 (or trunk since revision 819). 
    1112 
    1213== How it works to use cyclic forcing == 
    13 By adding the 2 variables '''!CyclicBegin''' and '''!CyclicEnd''' to config.card the cyclic fonctionality can be used.  
    14 !CyclicBegin is the first year of the forcing file to be used and !CyclicEnd is the last year.  So if I wanted to loop over years 1950-1953 (this is a multiple of four!), I would add the following to config.card: 
     14By adding the 2 variables '''!CyclicBegin''' and '''!CyclicEnd''' to config.card the cyclic functionality can be used.  
     15!CyclicBegin is the first year of the forcing file to be used and !CyclicEnd is the last year. So if I wanted to loop over years 1950-1953 (this is a multiple of four!), I would add the following to config.card: 
    1516 
    1617{{{ 
     
    2122[[BR]] 
    2223 
    23 libIGCM will use these variables to calculate the 2 new variables '''!CyclicYear''' and '''!CyclicYear_p1'''.  !CyclicYear is the year within the forcing period [!CyclicBegin, !CyclicEnd]. !CyclicYear_p1 is the next coming cyclic year in the same interval (to be used for the PFTmap). These 2 new variables have to be used in orchidee_ol.card and sechiba.card to copy the correct forcing files. 
     24libIGCM will use these variables to calculate the 2 new variables '''!CyclicYear''' and '''!CyclicYear_p1'''. !CyclicYear is the year within the forcing period [!CyclicBegin, !CyclicEnd]. !CyclicYear_p1 is the next coming cyclic year in the same interval (to be used for the PFTmap). These 2 new variables have to be used in orchidee_ol.card and sechiba.card to copy the correct forcing files. 
    2425 
    25 Now let's say that I want to run for 10 total years (notice this is not a multiple of the number of cyclic years.  If you are doing analytical spinup, it has to be, but not if you're just doing cyclic forcing.  Again, we won't ask why you want to do this). We need to change config.card. 
     26Now let's say that I want to run for 10 total years (notice this is not a multiple of the number of cyclic years. If you are doing analytical spinup, it has to be, but not if you're just doing cyclic forcing. Again, we won't ask why you want to do this). We need to change config.card. 
    2627 
    2728{{{ 
     
    3132}}} 
    3233 
    33 Having DateBegin and CyclicBegin be the same guarantees that the leap years will line up. 
     34Having !DateBegin and !CyclicBegin be the same guarantees that the leap years will line up. 
    3435 
    35 If we leave everything else the same, libIGCM isn't going to know to use the cyclic forcing files and it will just use the ones corresponding to the current date.  This is because we only defined the variables in config.card; we haven't actually told libIGCM to use the variables anywhere yet. If we make the following modifications, then we are telling libIGCM exactly where to use the new variables. 
     36If we leave everything else the same, libIGCM isn't going to know to use the cyclic forcing files and it will just use the ones corresponding to the current date. This is because we only defined the variables in config.card; we haven't actually told libIGCM to use the variables anywhere yet. If we make the following modifications, then we are telling libIGCM exactly where to use the new variables. 
    3637 
    3738 
     
    4445 
    4546=== COMP/sechiba.card === 
    46 The PFTmap file must be copied using the variable !CyclicYear_p1 which is the next coming forcing year. In sechiba.card, remove PFTmap from section [!InitialStateFiles]. Notice that you have to remove ",\" in the end of the line with floodplains.nc. This section becomes : 
     47The PFTmap file must be copied using the variable !CyclicYear_p1 which is the next coming forcing year. In sechiba.card, remove PFTmap from section [!InitialStateFiles]. Notice that you have to remove ",\" in the end of the line with floodplains.nc. This section becomes: 
    4748 
    4849{{{ 
     
    5455}}} 
    5556 
    56 In section [!BoundaryFiles] change following : 
     57In section [!BoundaryFiles] change following: 
    5758{{{ 
    5859[BoundaryFiles] 
     
    7071}}} 
    7172 
    72 Notice that you need to remove the additional "List=  ()" line.  No specific treatment in sechiba.driver will now be done for the PFTmap.nc file. It is not necessary to change in sechiba.driver. For the first year without restart file the PFTmap the will be used corrsponds to the next coming year. For all next coming years the correct PFTmap is used. It is not possible to come around this probleme while running with a period length one year. 
     73Notice that you need to remove the additional "List=  ()" line. No specific treatment in sechiba.driver will now be done for the PFTmap.nc file. It is not necessary to change in sechiba.driver. For the first year without restart file the PFTmap the will be used corresponds to the next coming year. For all next coming years the correct PFTmap is used. It is not possible to come around this problem while running with a period length one year. 
    7374 
    7475=== PARAM/run.def ===