Commit 5c9b7ea8 authored by Thomas Dubos's avatar Thomas Dubos
Browse files

Patch disvertXXX as in modipsl config ICOLMDZOR_v7_LAM

parent 4c34abd0
Pipeline #187431 passed with stage
in 8 minutes and 5 seconds
#/bin/bash
# See https://docs.gitlab.com/ee/ci/triggers/
GITLAB=gitlab.in2p3.fr
PROJECTID=10876
cat <<EOF
An access token must be provided as the environment variable TRIGGER_TOKEN
e.g. TRIGGER_TOKEN=abcdef $0
# The value of the token can be found at :
# https://gitlab.in2p3.fr/ipsl/projets/dynamico/dynamico/-/settings/ci_cd
# in section "Project Variables"
EOF
REF=hotfix/modipsl
curl --request POST \
--form token=$TRIGGER_TOKEN \
--form ref=$REF \
"https://$GITLAB/api/v4/projects/$PROJECTID/trigger/pipeline"
......@@ -6,6 +6,8 @@ MODULE disvert_apbp_mod
!$OMP THREADPRIVATE(bp)
REAL(rstd), SAVE, ALLOCATABLE,TARGET :: presnivs(:)
!$OMP THREADPRIVATE(presnivs)
REAL(rstd), SAVE, ALLOCATABLE,TARGET :: presinter(:)
!$OMP THREADPRIVATE(presinter)
CONTAINS
......@@ -15,13 +17,14 @@ CONTAINS
ALLOCATE(ap(llm+1))
ALLOCATE(bp(llm+1))
ALLOCATE(presnivs(llm))
CALL disvert(ap,bp,presnivs)
ALLOCATE(presinter(llm+1))
CALL disvert(ap,bp,presnivs,presinter)
END SUBROUTINE init_disvert
SUBROUTINE disvert(ap,bp,presnivs)
SUBROUTINE disvert(ap,bp,presnivs,presinter)
USE abort_mod
USE mpipara, ONLY: is_mpi_root
USE omp_para, ONLY: omp_in_parallel
......@@ -31,6 +34,7 @@ CONTAINS
REAL(rstd),INTENT(OUT) :: ap(:)
REAL(rstd),INTENT(OUT) :: bp(:)
REAL(rstd),INTENT(OUT) :: presnivs(:)
REAL(rstd),INTENT(OUT) :: presinter(:)
INTEGER :: unit
CHARACTER(len=255) :: filename
INTEGER :: l,ok
......@@ -67,6 +71,9 @@ CONTAINS
DO l=1,llm
presnivs(l)=0.5*(ap(l)+bp(l)*preff+ap(l+1)+bp(l+1)*preff)
ENDDO
DO l=1, llm+1
presinter(l)= ap(l)+bp(l)*preff
END DO
! tell the world about it
IF (is_mpi_root) THEN
......
......@@ -11,8 +11,10 @@
!$OMP THREADPRIVATE(bp)
REAL(rstd), SAVE, ALLOCATABLE,TARGET :: presnivs(:)
!$OMP THREADPRIVATE(presnivs)
REAL(rstd), SAVE, ALLOCATABLE,TARGET :: presinter(:)
!$OMP THREADPRIVATE(presinter)
PUBLIC :: init_disvert, ap, bp, presnivs
PUBLIC :: init_disvert, ap, bp, presnivs, presinter
CONTAINS
!=========================================================================
......@@ -21,12 +23,12 @@ CONTAINS
ALLOCATE(ap(llm+1))
ALLOCATE(bp(llm+1))
ALLOCATE(presnivs(llm))
CALL disvert(ap,bp,presnivs)
ALLOCATE(presinter(llm+1))
CALL disvert(ap,bp,presnivs,presinter)
END SUBROUTINE init_disvert
SUBROUTINE disvert(ap,bp,presnivs)
SUBROUTINE disvert(ap,bp,presnivs,presinter)
USE earth_const, ONLY : cpp, kappa, preff, g
USE icosa, ONLY : ncar_dz, ncar_T0, ncar_p0
USE getin_mod, ONLY : getin
......@@ -34,6 +36,7 @@ CONTAINS
REAL(rstd),INTENT(OUT) :: ap(:)
REAL(rstd),INTENT(OUT) :: bp(:)
REAL(rstd),INTENT(OUT) :: presnivs(:)
REAL(rstd),INTENT(OUT) :: presinter(:)
! reads from run.def : ncar_dz, ncar_T0, ncar_p0, ncar_disvert_c
INTEGER :: l,cindx
REAL(rstd) :: eta_top, eta
......@@ -60,6 +63,9 @@ CONTAINS
DO l = 1, llm
presnivs(l) = 0.5 *( ap(l)+bp(l)*preff + ap(l+1)+bp(l+1)*preff )
ENDDO
DO l=1, llm+1
presinter(l)= ap(l)+bp(l)*preff
END DO
!$OMP MASTER
IF (is_mpi_root) PRINT *, 'Vertical placement of model levels according to DCMIP Appendix E.3'
......
......@@ -9,8 +9,10 @@ MODULE disvert_dcmip31_mod
!$OMP THREADPRIVATE(bp)
REAL(rstd), SAVE, ALLOCATABLE,TARGET :: presnivs(:)
!$OMP THREADPRIVATE(presnivs)
REAL(rstd), SAVE, ALLOCATABLE,TARGET :: presinter(:)
!$OMP THREADPRIVATE(presinter)
PUBLIC :: ap,bp,presnivs, init_disvert
PUBLIC :: ap,bp,presnivs,presinter, init_disvert
CONTAINS
!=========================================================================
......@@ -19,15 +21,17 @@ CONTAINS
ALLOCATE(ap(llm+1))
ALLOCATE(bp(llm+1))
ALLOCATE(presnivs(llm))
CALL disvert(ap,bp,presnivs)
ALLOCATE(presinter(llm+1))
CALL disvert(ap,bp,presnivs,presinter)
END SUBROUTINE init_disvert
SUBROUTINE disvert(ap,bp,presnivs)
SUBROUTINE disvert(ap,bp,presnivs,presinter)
USE mpipara
REAL(rstd),INTENT(OUT) :: ap(:)
REAL(rstd),INTENT(OUT) :: bp(:)
REAL(rstd),INTENT(OUT) :: presnivs(:)
! reads from run.def : ncar_dz, ncar_T0, ncar_p0, ncar_disvert_c
REAL(rstd),INTENT(OUT) :: presinter(:)
! reads from run.def : ncar_dz, ncar_T0, ncar_p0, ncar_disvert_c
INTEGER :: l,cindx
REAL(rstd) :: GG, eta_top, eta
REAL(rstd),PARAMETER :: N=0.01 ! Brunt-Vaisala frequency (s-1)
......@@ -55,6 +59,9 @@ CONTAINS
DO l = 1, llm
presnivs(l) = 0.5 *( ap(l)+bp(l)*preff + ap(l+1)+bp(l+1)*preff )
ENDDO
DO l=1, llm+1
presinter(l)= ap(l)+bp(l)*preff
END DO
!$OMP MASTER
IF (is_mpi_root) PRINT *, 'Vertical placement of model levels according to DCMIP Appendix E.3'
......
......@@ -7,6 +7,8 @@
!$OMP THREADPRIVATE(bp)
REAL(rstd), SAVE, ALLOCATABLE,TARGET :: presnivs(:)
!$OMP THREADPRIVATE(presnivs)
REAL(rstd), SAVE, ALLOCATABLE,TARGET :: presinter(:)
!$OMP THREADPRIVATE(presinter)
CONTAINS
!=========================================================================
......@@ -18,19 +20,20 @@ CONTAINS
ALLOCATE(ap(llm+1))
ALLOCATE(bp(llm+1))
ALLOCATE(presnivs(llm))
CALL disvert(ap,bp,presnivs)
ALLOCATE(presinter(llm+1))
CALL disvert(ap,bp,presnivs,presinter)
END SUBROUTINE init_disvert
SUBROUTINE disvert(ap,bp,presnivs)
SUBROUTINE disvert(ap,bp,presnivs,presinter)
USE icosa
USE mpipara
IMPLICIT NONE
REAL(rstd),INTENT(OUT) :: ap(:)
REAL(rstd),INTENT(OUT) :: bp(:)
REAL(rstd),INTENT(OUT) :: presnivs(:)
! reads from run.def : ncar_dz, ncar_T0, ncar_p0, ncar_disvert_c
REAL(rstd),INTENT(OUT) :: presinter(:)
! reads from run.def : ncar_dz, ncar_T0, ncar_p0, ncar_disvert_c
INTEGER :: l,cindx
REAL(rstd) :: H, eta_top, eta
......@@ -59,6 +62,9 @@ CONTAINS
DO l = 1, llm
presnivs(l) = 0.5 *( ap(l)+bp(l)*ncar_p0 + ap(l+1)+bp(l+1)*ncar_p0 )
ENDDO
DO l=1, llm+1
presinter(l)= ap(l)+bp(l)*preff
END DO
!$OMP MASTER
IF (is_mpi_root) PRINT *, 'Vertical placement of model levels according to DCMIP Appendix E.3'
......
......@@ -7,6 +7,8 @@ MODULE disvert_ncarl30_mod
!$OMP THREADPRIVATE(bp)
REAL(rstd), SAVE, ALLOCATABLE,TARGET :: presnivs(:)
!$OMP THREADPRIVATE(presnivs)
REAL(rstd), SAVE, ALLOCATABLE,TARGET :: presinter(:)
!$OMP THREADPRIVATE(presinter)
CONTAINS
......@@ -19,19 +21,20 @@ CONTAINS
ALLOCATE(ap(llm+1))
ALLOCATE(bp(llm+1))
ALLOCATE(presnivs(llm))
CALL disvert(ap,bp,presnivs)
ALLOCATE(presinter(llm+1))
CALL disvert(ap,bp,presnivs,presinter)
END SUBROUTINE init_disvert
SUBROUTINE disvert(ap,bp,presnivs)
SUBROUTINE disvert(ap,bp,presnivs,presinter)
USE icosa
USE mpipara
IMPLICIT NONE
REAL(rstd),INTENT(OUT) :: ap(:)
REAL(rstd),INTENT(OUT) :: bp(:)
REAL(rstd),INTENT(OUT) :: presnivs(:)
REAL(rstd),INTENT(OUT) :: presinter(:)
INTEGER :: l
REAL(rstd) :: a(31)=(/ 0.00225523952394724, &
0.00503169186413288, &
......@@ -107,7 +110,10 @@ CONTAINS
' DZ ~ ',8.*log((ap(l)+bp(l)*preff)/ max(ap(l+1)+bp(l+1)*preff,1.e-10))
!$OMP END MASTER
ENDDO
DO l=1, llm+1
presinter(l)= ap(l)+bp(l)*preff
END DO
END SUBROUTINE disvert
END MODULE disvert_ncarl30_mod
......@@ -9,8 +9,10 @@ MODULE disvert_std_mod
!$OMP THREADPRIVATE(bp)
REAL(rstd), SAVE, ALLOCATABLE,TARGET :: presnivs(:)
!$OMP THREADPRIVATE(presnivs)
REAL(rstd), SAVE, ALLOCATABLE,TARGET :: presinter(:)
!$OMP THREADPRIVATE(presinter)
PUBLIC :: init_disvert, ap, bp, presnivs
PUBLIC :: init_disvert, ap, bp, presnivs, presinter
CONTAINS
......@@ -21,17 +23,18 @@ CONTAINS
ALLOCATE(ap(llm+1))
ALLOCATE(bp(llm+1))
ALLOCATE(presnivs(llm))
CALL disvert(ap,bp,presnivs)
ALLOCATE(presinter(llm+1))
CALL disvert(ap,bp,presnivs,presinter)
END SUBROUTINE init_disvert
SUBROUTINE disvert(ap,bp,presnivs)
USE mpipara
SUBROUTINE disvert(ap,bp,presnivs,presinter)
USE mpipara
REAL(rstd),INTENT(OUT) :: ap(:)
REAL(rstd),INTENT(OUT) :: bp(:)
REAL(rstd),INTENT(OUT) :: presnivs(:)
REAL(rstd),INTENT(OUT) :: presinter(:)
REAL(rstd) :: dsig(llm)
REAL(rstd) :: sig(llm+1)
......@@ -64,7 +67,10 @@ CONTAINS
DO l = 1, llm
presnivs(l) = 0.5 *( ap(l)+bp(l)*preff + ap(l+1)+bp(l+1)*preff )
ENDDO
DO l=1, llm+1
presinter(l)= ap(l)+bp(l)*preff
END DO
! tell the world about it
IF (is_mpi_root) THEN
!$OMP MASTER
......
......@@ -12,8 +12,10 @@ MODULE disvert_strato_mod
!$OMP THREADPRIVATE(bp)
REAL(rstd), SAVE, ALLOCATABLE,TARGET :: presnivs(:)
!$OMP THREADPRIVATE(presnivs)
REAL(rstd), SAVE, ALLOCATABLE,TARGET :: presinter(:)
!$OMP THREADPRIVATE(presinter)
PUBLIC :: ap,bp,presnivs, init_disvert, init_disvert_strato_custom
PUBLIC :: ap,bp,presnivs,presinter, init_disvert, init_disvert_strato_custom
CONTAINS
......@@ -24,7 +26,8 @@ CONTAINS
ALLOCATE(ap(llm+1))
ALLOCATE(bp(llm+1))
ALLOCATE(presnivs(llm))
ALLOCATE(presinter(llm+1))
dsigmin=1.0 ! Should be 0.3 for CMIP5
CALL getin('disvert_dsigmin', dsigmin)
......@@ -55,6 +58,9 @@ CONTAINS
DO l = 1, llm
presnivs(l) = 0.5 *( ap(l)+bp(l)*preff + ap(l+1)+bp(l+1)*preff )
ENDDO
DO l=1, llm+1
presinter(l)= ap(l)+bp(l)*preff
END DO
! tell the world about it
IF (is_mpi_root) THEN
......@@ -79,6 +85,7 @@ CONTAINS
ALLOCATE(ap(llm+1))
ALLOCATE(bp(llm+1))
ALLOCATE(presnivs(llm))
ALLOCATE(presinter(llm+1))
!===================================================================
! David Cugnet, François Lott, Lionel Guez, Ehouoarn Millour, Fredho
! 2014/05
......@@ -150,7 +157,10 @@ CONTAINS
DO l = 1, llm
presnivs(l) = 0.5 *( ap(l)+bp(l)*preff + ap(l+1)+bp(l+1)*preff )
ENDDO
DO l=1, llm+1
presinter(l)= ap(l)+bp(l)*preff
END DO
! tell the world about it
IF (is_mpi_root) THEN
!$OMP MASTER
......
......@@ -7,6 +7,9 @@ MODULE disvert_mod
!$OMP THREADPRIVATE(bp)
REAL(rstd), SAVE, POINTER :: presnivs(:)
!$OMP THREADPRIVATE(presnivs)
REAL(rstd), SAVE, POINTER :: presinter(:)
!$OMP THREADPRIVATE(presinter)
REAL(rstd), SAVE, POINTER :: mass_al(:), mass_bl(:), mass_ak(:), mass_bk(:), mass_dak(:), mass_dbk(:)
!$OMP THREADPRIVATE(mass_al, mass_bl, mass_ak, mass_bk, mass_dak, mass_dbk)
......@@ -22,16 +25,16 @@ MODULE disvert_mod
CONTAINS
SUBROUTINE init_disvert
USE disvert_std_mod, ONLY: ap_std=>ap, bp_std=>bp, presnivs_std=>presnivs, init_disvert_std=>init_disvert
USE disvert_strato_mod, ONLY: ap_strato=>ap, bp_strato=>bp, presnivs_strato=>presnivs, init_disvert_strato=>init_disvert, init_disvert_strato_custom
USE disvert_apbp_mod, ONLY: ap_apbp=>ap, bp_apbp=>bp, presnivs_apbp=>presnivs, init_disvert_apbp=>init_disvert
USE disvert_ncar_mod, ONLY: ap_ncar=>ap, bp_ncar=>bp, presnivs_ncar=>presnivs, init_disvert_ncar=>init_disvert
USE disvert_ncarl30_mod, ONLY: ap_ncarl30=>ap, bp_ncarl30=>bp, presnivs_ncarl30=>presnivs, init_disvert_ncarl30=>init_disvert
USE disvert_dcmip31_mod, ONLY: ap_dcmip31=>ap, bp_dcmip31=>bp, presnivs_dcmip31=>presnivs, init_disvert_dcmip31=>init_disvert
USE disvert_dcmip200_mod, ONLY: ap_dcmip200=>ap, bp_dcmip200=>bp, presnivs_dcmip200=>presnivs, init_disvert_dcmip200=>init_disvert
USE disvert_plugin_mod, ONLY: ap_plugin=>ap, bp_plugin=>bp, presnivs_plugin=>presnivs, init_disvert_plugin=>init_disvert
USE icosa
USE mpipara
USE disvert_std_mod, ONLY: ap_std=>ap, bp_std=>bp, presnivs_std=>presnivs, init_disvert_std=>init_disvert, presinter_std=>presinter
USE disvert_strato_mod, ONLY: ap_strato=>ap, bp_strato=>bp, presnivs_strato=>presnivs, init_disvert_strato=>init_disvert, init_disvert_strato_custom, presinter_strato=>presinter
USE disvert_apbp_mod, ONLY: ap_apbp=>ap, bp_apbp=>bp, presnivs_apbp=>presnivs, init_disvert_apbp=>init_disvert, presinter_apbp=>presinter
USE disvert_ncar_mod, ONLY: ap_ncar=>ap, bp_ncar=>bp, presnivs_ncar=>presnivs, init_disvert_ncar=>init_disvert, presinter_ncar=>presinter
USE disvert_ncarl30_mod, ONLY: ap_ncarl30=>ap, bp_ncarl30=>bp, presnivs_ncarl30=>presnivs, init_disvert_ncarl30=>init_disvert, presinter_ncarl30=>presinter
USE disvert_dcmip31_mod, ONLY: ap_dcmip31=>ap, bp_dcmip31=>bp, presnivs_dcmip31=>presnivs, init_disvert_dcmip31=>init_disvert, presinter_dcmip31=>presinter
USE disvert_dcmip200_mod, ONLY: ap_dcmip200=>ap, bp_dcmip200=>bp, presnivs_dcmip200=>presnivs, init_disvert_dcmip200=>init_disvert, presinter_dcmip200=>presinter
USE disvert_plugin_mod, ONLY: ap_plugin=>ap, bp_plugin=>bp, presnivs_plugin=>presnivs, init_disvert_plugin=>init_disvert, presinter_plugin=>presinter
USE icosa
USE mpipara
IMPLICIT NONE
CHARACTER(len=255) :: def
INTEGER :: l
......@@ -66,13 +69,15 @@ CONTAINS
ap=>ap_std
bp=>bp_std
presnivs=>presnivs_std
presinter=>presinter_std
CASE('strato')
CALL init_disvert_strato
ap=>ap_strato
bp=>bp_strato
presnivs=>presnivs_strato
presinter=>presinter_strato
CASE('strato_custom')
......@@ -80,6 +85,7 @@ CONTAINS
ap=>ap_strato
bp=>bp_strato
presnivs=>presnivs_strato
presinter=>presinter_strato
CASE('read_apbp')
......@@ -87,6 +93,7 @@ CONTAINS
ap=>ap_apbp
bp=>bp_apbp
presnivs=>presnivs_apbp
presinter=>presinter_apbp
CASE('plugin')
......@@ -94,6 +101,7 @@ CONTAINS
ap=>ap_plugin
bp=>bp_plugin
presnivs=>presnivs_plugin
presinter=>presinter_plugin
CASE ('ncar')
......@@ -101,6 +109,7 @@ CONTAINS
ap=>ap_ncar
bp=>bp_ncar
presnivs=>presnivs_ncar
presinter=>presinter_ncar
CASE ('dcmip31')
......@@ -108,6 +117,7 @@ CONTAINS
ap=>ap_dcmip31
bp=>bp_dcmip31
presnivs=>presnivs_dcmip31
presinter=>presinter_dcmip31
CASE ('dcmip200')
......@@ -115,6 +125,7 @@ CONTAINS
ap=>ap_dcmip200
bp=>bp_dcmip200
presnivs=>presnivs_dcmip200
presinter=>presinter_dcmip200
CASE ('ncarl30')
......@@ -122,6 +133,8 @@ CONTAINS
ap=>ap_ncarl30
bp=>bp_ncarl30
presnivs=>presnivs_ncarl30
presinter=>presinter_ncarl30
CASE default
IF (is_mpi_root) THEN
PRINT *, "Bad selector for variable disvert : <", TRIM(def), ">"
......
......@@ -7,12 +7,16 @@ MODULE disvert_plugin_mod
!$OMP THREADPRIVATE(bp)
REAL(rstd), SAVE, ALLOCATABLE,TARGET :: presnivs(:)
!$OMP THREADPRIVATE(presnivs)
REAL(rstd), SAVE, ALLOCATABLE,TARGET :: presinter(:)
!$OMP THREADPRIVATE(presinter)
INTERFACE
SUBROUTINE plugin_disvert(ap,bp,presnivs)
SUBROUTINE plugin_disvert(ap,bp,presnivs,presinter)
REAL,INTENT(OUT) :: ap(:)
REAL,INTENT(OUT) :: bp(:)
REAL,INTENT(OUT) :: presnivs(:)
REAL,INTENT(OUT) :: presinter(:)
END SUBROUTINE
END INTERFACE
......@@ -30,14 +34,15 @@ CONTAINS
ALLOCATE(ap(llm+1))
ALLOCATE(bp(llm+1))
ALLOCATE(presnivs(llm))
ALLOCATE(presinter(llm+1))
IF(.NOT.ASSOCIATED(disvert_plugin)) THEN
WRITE(*,*) "Fatal Error: option disvert=plugin is selected ",&
"but disvert_plugin not set by driver"
CALL dynamico_abort("init_disvert : disvert_plugin not set")
ENDIF
CALL disvert_plugin(ap,bp,presnivs)
CALL disvert_plugin(ap,bp,presnivs,presinter)
END SUBROUTINE init_disvert
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment