wiki:Documentation/UserGuide/FLUXNETValidation

Version 6 (modified by mmcgrath, 5 years ago) (diff)

--

First, look at Nicolas's page.

http://forge.ipsl.jussieu.fr/orchidee/wiki/Scripts/FluxnetValidation

And then look at the README file in config/ORCHIDEE_OL/ENSEMBLE.

Now, if you are using ORCHIDEE-CN-CAN, you need to do some other things. I am running on Obelix.

Start from a clean SVN ENSEMBLE install. Notice that Job\_ENSEMBLE is the main driver, and it should not be deleted! It will create jobs based on ../SPINUP/SUBJOB/OOL\_SEC\_STO/.

First, a change in the IOIPSL source code needs to be made, with a recompile. In modeles/IOIPSL/src/histcom.f90, change nb\_zax\_max=20. Recompile.

cd ~/ORCHIDEE-CN-CAN/config/ORCHIDEE_OL/ENSEMBLE
vi config.card

Change the following lines

JobName=FLUXNET
  ARCHIVE=/home/scratch01/mmcgrath

then create the job scripts

../../../libIGCM/ins_job

this creates Job\_FLUXNET. Notice that this job will pull from the SPINUP directory as well. ins\_job used to create Job files in every directory, but that functionally changed a while ago. Therefore, the following is now necessary (OOL\_SEC\_STO because we will run a job with sechiba and stomate).

cd ../SPINUP
../../../libIGCM/ins_job
cd SUBJOB/OOL_SEC_STO/
../../../../../libIGCM/ins_job
cd ../../../ENSEMBLE

Now modify the run directory.

vi Job_FLUXNET
(change RUN_DIR_PATH=/home/scratch01/mmcgrath/RUN_DIR)
mkdir /home/scratch01/mmcgrath/RUN_DIR

Now change the options for the sites to run against.

vi fluxnet.card

Need to change the number of PFTs, which sites we are running against (do a small testcase with a single site first), and the PFT characteristics of that site.

  NbPFTs= 37
  Groups= ( TEST )
  TEST =	   ( BR-Sa3 , BR-Sa3_2000-2003.nc , 2000 , 4 , 0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ) 

For some reason, in SPINUP/SUBJOB/OOL\_SEC\_STO/ reftemp.nc is copied to the run directory in both sechiba.card and stomate.card; this results in a crash. To fix:

   vi ../SPINUP/SUBJOB/OOL_SEC_STO/COMP/sechiba.card

and remove the line

            (${R_IN}/SRF/reftemp.nc, .), \

Now we need to copy the CAN-CN run.def that we want to use. XXXXXX is the run.def file from whatever configuration directory you have that is currently working.

   cp XXXXXX ../SPINUP/SUBJOB/OOL_SEC_STO/PARAM/
   cp XXXXXX ../ENSEMBLE/PARAM/

It seems that AUTO values are not being removed in the run.def during processing. I set XIOS\_ORCHIDEE\_OK=N, DRIVER\_reset\_time=y, taking values from a previous successful run I did (looking in the RUN\_DIR). I only replaced a value when the code crashed with a complaint.

RESTART_FILEIN= NONE
SECHIBA_restart_in= NONE
STOMATE_RESTART_FILEIN= NONE

Need to check the differences between the sechiba.card in our working configuration directory and that in SPINUP/SUBJOB/OOL\_SEC\_STO/COMP. I had to change the following in SPINUP/SUBJOB/OOL\_SEC\_STO/COMP/sechiba.card

[InitialStateFiles]
List=       (${R_IN}/SRF/routing.nc, .), \
            (${R_IN}/SRF/cartepente2d_15min.nc, .), \
            (${R_IN}/SRF/floodplains.nc, .), \
            (${R_IN}/SRF/albedo/alb_bg_modisopt_2D.nc, alb_bg.nc), \
            (${R_IN}/SRF/PFTmap_1850to2005_AR5_LUHa.rc2/PFTmap_IPCC_2000.nc, PFTmap.nc)

in SPINUP/SUBJOB/OOL\_SEC\_STO/COMP/sechiba.card, I made the following change:

[BoundaryFiles]
List=	()
ListNonDel= (${R_IN}/SRF/reftemp.nc, .), \
            (/home/orchidee04/aslanso/Files/soils_param.nc, soils_param.nc), \
            (${R_IN}/SRF/soils_param_usdatop.nc, soils_param_usda.nc)

I had to modify the run.def a bit due to crashes (AUTO values were not getting replaced).

I removed the following lines from ENSEMBLE/PARAM/run.def, since those variables didn't appear anywhere in the working config directories for the TRUNK.

TIME_LENGTH = _AUTO_
TIME_SKIP = _AUTO_
SECHIBA_HISTFILE2=_AUTO_
WRITE_STEP=_AUTO_
STOMATE_HIST_DT=_AUTO_
STOMATE_IPCC_HIST_DT=_AUTO_
ATM_CO2 =_AUTO_: DEFAULT = 350.
STOMATE_CFORCING_NAME= _AUTO_ : DEFAULT = NONE

Even though the next ones weren't in the TRUNK run.def, I assigned a value since I don't like the default.

STOMATE_OK_STOMATE=y

With my debug flags on, the code threw a runtime error on the following line for an unknown reason, so I just commented it out (it's a debugging write statement, and I had l\_dbg activated...no harm in removing for the moment).

modeles/IOIPSL/src/calendar.f90

    IF (l_dbg) THEN
!      WRITE(ipslout,*) "isittime 2.0 ", &
! &     date_next_check,date_next_act,ABS(dt_action-freq), &
! &     ABS(dt_action+dt_check-freq),dt_action,dt_check, &
! &     next_check_itau,do_action
    ENDIF

out\_orchidee has become huge, seemingly because of histfile debugging output. So I am turning off ioipsl\_debug in modeles/IOIPSL/src/errioipsl.f90.

We need to make sure all of the following lines are commented out (or do not exist in the run.def, since the script will change the vegetation for each site by adding lines at the end of the run.def and if these lines are present they will override them:

IMPOSE_VEG=y
SECHIBA_VEG__01=0.0769230769231
...
SECHIBA_VEGMAX__01=0.0769230769231
  ...

I often set the JobType?=DEV in my Job file so that it will overwrite old output files in the archive. Else, you have to delete the IGCM\_OUT/OL2/PROD/ensemble/ files for every site before every run. Which is no problem if everything works, but it is annoying if you are not yet sure they will work.

Launch the job (from the README file).

   ./Job_ENSEMBLE fluxnet > out.Job_ENSEMBLE

This submits jobs to the queue which create new directories in the ENSEMBLE directory, each one having the name of the test site.

First simulation finishes with no problems! However, it complains of an error in copying the restart file. I tried deleting the whole archive and rerunning.

It takes 20 minutes or so to run the STOI (it runs over four years or so, the length of the forcing file for that site).