Skip to content
Snippets Groups Projects
Commit b4b5e365 authored by Dethinne Thomas's avatar Dethinne Thomas
Browse files

remove CAR code from iniglf

parent cd6580ab
No related branches found
No related tags found
No related merge requests found
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
use mardim use mardim
use marcar use marcar
use mar_ge use mar_ge
use mar_vb
IMPLICIT NONE IMPLICIT NONE
...@@ -93,9 +94,38 @@ ...@@ -93,9 +94,38 @@
! +--CASES called in iniglf.f90 ! +--CASES called in iniglf.f90
! + ========================== ! + ==========================
! + ! +
! check if a .nc exists
CASE(10) CASE(10)
INQUIRE(FILE="MARglf.nc", EXIST=file_exists) INQUIRE(FILE="MARglf.nc", EXIST=file_exists)
CASE(11)
if (file_exists) then
call CF_READ2D('MARglf.nc','LAI',1,mx,my,nvx,lai_caraib)
call CF_READ2D('MARglf.nc','GLF',1,mx,my,nvx,glf_caraib)
else
open(unit=11, status='old', form='unformatted', file='MARglf.DAT')
rewind 11
endif
! Read th NESTOR file of CARAIB file dependinf on the coupling
CASE(12)
if (file_exists) then
glf2VB=glf_caraib
LAI2VB=lai_caraib
iyr_VB = iyrrGE
mma_VB = mmarGE
jda_VB = jdarGE
jhu_VB = jhurGE +1
!!!!!!!!!!!!!!!!!!!
jdh_VB = 6 ! temps entre 2 forçage --> hard codé ici
!!!!!!!!!!!!!!!!!!!
else
read(11) iyr_VB, mma_VB, jda_VB, jhu_VB, jdh_VB
read(11) glf2VB
read(11) LAI2VB
endif
CASE DEFAULT CASE DEFAULT
write(6, *) "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" write(6, *) "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
......
...@@ -114,14 +114,12 @@ subroutine INIglf(ihamr_glf, nhamr_glf, newglfINI) ...@@ -114,14 +114,12 @@ subroutine INIglf(ihamr_glf, nhamr_glf, newglfINI)
if(jdh_VB == 0) jdh_VB = -1 if(jdh_VB == 0) jdh_VB = -1
if (.not. file_exists .or. .not. CARcoupling) then ! Read th NESTOR file of CARAIB file dependinf on the coupling
open(unit=11, status='old', form='unformatted', file='MARglf.DAT') if (CARcoupling .eq. .true.) then
rewind 11 call call_caraib(11)
else else
open(unit=11, status='old', form='unformatted', file='MARglf.DAT')
call CF_READ2D('MARglf.nc','LAI',1,mx,my,nvx,lai_caraib) rewind 11
call CF_READ2D('MARglf.nc','GLF',1,mx,my,nvx,glf_caraib)
endif endif
11 continue 11 continue
...@@ -153,24 +151,14 @@ subroutine INIglf(ihamr_glf, nhamr_glf, newglfINI) ...@@ -153,24 +151,14 @@ subroutine INIglf(ihamr_glf, nhamr_glf, newglfINI)
! + ---------------------------- ! + ----------------------------
! + ! +
!On lit les infos dans le fichier !On lit les infos dans le fichier
if (.not. file_exists) then if (CARcoupling .eq. .true.) then
read(11) iyr_VB, mma_VB, jda_VB, jhu_VB, jdh_VB call call_caraib(12)
read(11) glf2VB
read(11) LAI2VB
else
glf2VB=glf_caraib
LAI2VB=lai_caraib
iyr_VB = iyrrGE
mma_VB = mmarGE
jda_VB = jdarGE
jhu_VB = jhurGE +1
!!!!!!!!!!!!!!!!!!! else
jdh_VB = 6 ! temps entre 2 forçage --> hard codé ici read(11) iyr_VB, mma_VB, jda_VB, jhu_VB, jdh_VB
!!!!!!!!!!!!!!!!!!! read(11) glf2VB
read(11) LAI2VB
endif endif
! + ! +
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment