diff --git a/couplage/MAR/call_caraib.f90 b/couplage/MAR/call_caraib.f90 index af48ff419a977cd2d745fedca31cf3c29099abe2..1da598956553fccbd40c2835cb0635a8ca63beac 100644 --- a/couplage/MAR/call_caraib.f90 +++ b/couplage/MAR/call_caraib.f90 @@ -2,7 +2,7 @@ ! | Subroutine call_caraib 07/11/2024 COUPLAGE | ! +------------------------------------------------------------------+ ! | | -! | This routine purpose us to call subroutine linked to CARAIB from| +! | This routine purpose is to call subroutine linked to CARAIB from | ! | MAR so the coupling is transparent from MAR point. | ! | This routine is called at some place in MAR with different | ! | initiator. Depending on it, the routine call some subroutines | @@ -85,9 +85,9 @@ call caraib - ! if first iter: - ! change yyyy to yyyy-1 for car outputs - ! change the 0 to 1 read data file + !Rename all the files of the first output of CARAIB if its the spin up + if (first_iter .eq. 1) CALL rename_spinup + ! day_counter = day_counter + 1 first_iter = 0 diff --git a/couplage/MAR/rename_spinup.f90 b/couplage/MAR/rename_spinup.f90 new file mode 100644 index 0000000000000000000000000000000000000000..e1fdfb15777340287f630a2613b2863c1d66d591 --- /dev/null +++ b/couplage/MAR/rename_spinup.f90 @@ -0,0 +1,34 @@ +! +------------------------------------------------------------------+ +! | Subroutine rename_spinup 12/11/2024 COUPLAGE | +! +------------------------------------------------------------------+ +! | | +! | This routine purpose is to trick Caraib to do its spin up and | +! | Then act as its spin up was the year simulated before the first | +! | So at next MAR time step (of the forst year), the data read is | +! | the spinuped data +! | Output: None | +! | ^^^^^^^ | +! | | +! +------------------------------------------------------------------+ + + !SUBROUTINE + subroutine rename_spinup + + IMPLICIT NONE + + include './com_18/cte.common' + + if (readsteady .eq. 0) then + ! CALL RENAME('co2prev2010.res','co2prev2010.res') not needed + CALL RENAME('ylailim2009.res','ylailim2009.res') + CALL RENAME('xlai_min_max2009.res','xlai_min_max2009.res') + CALL RENAME('temprev2009.res','temprev2009.res') + CALL RENAME('frac2009.res','frac2009.res') + CALL RENAME('cropino2009.res','cropino2009.res') + + + endif + + + + end subroutine rename_spinup