From 3feba0a4fe73e42690c5cddb4a0830f04468f4ff Mon Sep 17 00:00:00 2001 From: Thomas Dethinne <tdethinne@uliege.be> Date: Tue, 12 Nov 2024 10:09:57 +0100 Subject: [PATCH] working on the spinup Y1 problem --- couplage/MAR/call_caraib.f90 | 8 ++++---- couplage/MAR/rename_spinup.f90 | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 couplage/MAR/rename_spinup.f90 diff --git a/couplage/MAR/call_caraib.f90 b/couplage/MAR/call_caraib.f90 index af48ff4..1da5989 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 0000000..e1fdfb1 --- /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 -- GitLab