Changes between Version 2 and Version 3 of Documentation/UserGuide/FutureForcing


Ignore:
Timestamp:
2014-11-21T16:14:21+01:00 (9 years ago)
Author:
mmcgrath
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/UserGuide/FutureForcing

    v2 v3  
    66!/bin/sh 
    77 
    8 export inputfilename="ipsl_rcp4p5_2006-2010.nc" 
    9 years=(2006 2007 2008 2009 2010) 
    10 sindex=(1 366 731 1096 1461)  
    11 eindex=(365 730 1095 1460 1825)  
    128varnames=(LWdown Psurf Qair Rainf SWdown Snowf Tmax Tmin Wind) 
    139 
    14 for ifile in 0 1 2 3 4  
    15 do  
    16     echo "On year ${years[$ifile]}" 
    17     export outputfilename=ipsl_rcp4p5_${years[$ifile]}.nc 
    18     rm -f $outputfilename  
    19     for ivar in {0..8} 
    20     do 
    21         rm -f temp.nc 
    22         echo "On ${varnames[$ivar]},${sindex[$ifile]},${eindex[$ifile]} " 
    23         ncea -F -d time,${sindex[$ifile]},${eindex[$ifile]} /ccc/scratch/cont003/dsm/p529viov/isimip/ipsl/i${varnames[$ivar]}_$inputfilename temp.nc 
    24         ncks -A -o $outputfilename temp.nc 
    25         rm -f temp.nc 
     10syear=(2006 2011 2021 2031 2041 2051 2061 2071 2081 2091) 
     11eyear=(2010 2020 2030 2040 2050 2060 2070 2080 2090 2100) 
     12ndays_year=365 
     13 
     14for igroup in 0 1 2 3 4 5 6 7 8 9 
     15do 
     16    echo "On year ${syear[$igroup]}" 
     17    export inputfilename="ipsl_rcp4p5_${syear[$igroup]}-${eyear[$igroup]}.nc" 
     18    for ((year=${syear[$igroup]}; year<=${eyear[$igroup]}; year++)) 
     19    do  
     20        echo "On year $year" 
     21        export outputfilename=ipsl_rcp4p5_$year.nc 
     22        rm -f $outputfilename  
     23        # Calculate the number of days in this year 
     24        sday=$((($year-${syear[$igroup]})*$ndays_year+1 )) 
     25        eday=$((($year-${syear[$igroup]}+1)*$ndays_year )) 
     26        echo "Days: $sday $eday" 
     27        for ivar in {0..8} 
     28        do 
     29            rm -f temp.nc 
     30            echo "On ${varnames[$ivar]},${sindex[$ifile]},${eindex[$ifile]} " 
     31            ncea -F -d time,$sday,$eday /ccc/scratch/cont003/dsm/p529viov/isimip/ipsl/i${varnames[$ivar]}_$inputfilename temp.nc 
     32            ncks -A -o $outputfilename temp.nc 
     33            rm -f temp.nc 
     34        done 
    2635    done 
    2736done 
     37 
    2838}}} 
    2939 
    30 The above script combines the forcing from 2006-2010 that Nicolas uses into annual files.  From there, additional work still needs to be done (and the script needs to be modified to cover the years 2011-2100).  In particular, 
     40The above script combines the forcing from 2006-2100 that Nicolas uses into annual files.  From there, additional work still needs to be done.  In particular, 
    3141 
    32421) The order of the variables is not necessarily the same as the CRU-NCEP files.  ORCHIDEE is very picky about the input files, so you'll have to make sure that the order of the variables and all meta data/axis are exactly the same as found in the existing CRU-NCEP files to make it work. 
     
    36463) There are no Wind_N and Wind_E variable, only WIND.  It seems like a good idea is to assign the value of WIND to Wind_E, and then set Wind_N equal to zero, since apparently in the offline mode the wind is always converted to the magnitude and therefore the direction does not matter. 
    3747 
    38 4) There is no tair, just TMIN and TMAX.  A simple average of TMIN and TMAX for each point/timestep and setting that to be tair in the output file probably suffices, but should be checked with some test simulations afterwards. 
     484) There is no precip (needed by the weather generator for daily files).  It seems that you can combine Snowf and Rainf, and then the weather generator using the temperature to decide what is rain and what is snow.