Changeset 4092 for trunk/LMDZ.VENUS/libf


Ignore:
Timestamp:
Feb 28, 2026, 6:36:58 PM (4 weeks ago)
Author:
emillour
Message:

Venus PCM:
Code cleanup: remove "hedin.h" and make variables included there be module
variables of compo_hedin_mod2.F90. Turn "nirdat.h" into module nirdata.F90
and incroporate initialization routine nir_leedat.F in it.
EM

Location:
trunk/LMDZ.VENUS/libf/phyvenus
Files:
2 deleted
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.VENUS/libf/phyvenus/compo_hedin_mod2.F90

    r3884 r4092  
    22  !!05/2013 Laura Salmi
    33  !!03/2014 revision Gabriella Gilli
    4   !!Calcul des vmr pour CO2, CO, O, N et N2 en s'appuyant sur les tables donnees dans l'article Hedin (1983)
     4  !!Compute vmr for CO2, CO, O, N and N2 based on tables from Hedin (1983) paper
    55 
    66  implicit none     
     7
     8  integer, parameter :: zsize=23  ! for z from 100 to 210 km
     9  integer, parameter :: musize=10 ! for sza ranging from -1 to 1
     10 
     11  real, save, protected :: co2_hedin(musize,zsize)
     12  real, save, protected :: co_hedin(musize,zsize)
     13  real, save, protected :: n2_hedin(musize,zsize)
     14  real, save, protected :: o_hedin(musize,zsize)
     15  real, save, protected :: n_hedin(musize,zsize)
     16 
     17  real, save, protected :: pres_hedin(musize,zsize)
     18  real, save, protected :: mu_hedin(musize)
     19 
    720  contains
    821
    922        subroutine compo_hedin83_init2
    10         use YOMCST_mod
     23        use YOMCST_mod, only: RKBOL
    1124        implicit none
    12 !#include "YOMCST.h"
    13 #include "hedin.h"
    1425
    1526        REAL :: alpha
     
    133144!!Interpolation des profils de Hedin (1983) sur la grille du modele
    134145
    135         use dimphy
     146        use dimphy, only: klon, klev
    136147        implicit none
    137         include 'hedin.h'
     148
    138149        REAL, intent(in) :: pression(klon,klev), mu0(klon)
    139150        integer :: i,k,iz,jmu,jz,z_ok, mu_ok
  • trunk/LMDZ.VENUS/libf/phyvenus/nirco2abs.F

    r3884 r4092  
    88       use clesphys_mod
    99       use YOMCST_mod
    10 c       use compo_hedin83_mod2
     10       use nirdata_mod, only: pres1d, corgcm, alfa, npres, oco21d
    1111
    1212
     
    5757c    ------------------
    5858c
    59 
    60 c#include "YOMCST.h"
    61 c#include "clesphys.h"
    62 c#include "comdiurn.h"
    63 #include "nirdata.h"
    64 c#include "tracer.h"
    65 c#include "mmol.h"
    6659
    6760c-----------------------------------------------------------------------
  • trunk/LMDZ.VENUS/libf/phyvenus/nirdata.F90

    r4091 r4092  
     1module nirdata_mod
    12
    2       integer npres                ! Number of pressures in NIR correction
    3       parameter (npres=42)         ! table
     3implicit none
    44
    5       common /NIRdata/ pres1d,corgcm,oco21d,alfa,p1999
    6       real    pres1d(npres)
    7       real    corgcm(npres)
    8       real    oco21d(npres),alfa(npres),p1999(npres)
     5! Number of pressures in NIR correction table
     6integer,parameter :: npres=42   
     7
     8real,save,protected :: pres1d(npres)
     9real,save,protected :: corgcm(npres)
     10real,save,protected :: oco21d(npres)
     11real,save,protected :: alfa(npres)
     12real,save,protected :: p1999(npres)
     13!$OMP THREADPRIVATE(pres1d,corgcm,oco21d,alfa,p1999)
     14
     15contains
     16
     17  subroutine nir_leedat
     18
     19!       reads parameters for NIR NLTE calculation   
     20
     21!       nov 2011    fgg+malv    first version               
     22!***********************************************************************
     23
     24    use mod_phys_lmdz_para, only: is_master, bcast
     25
     26    implicit none
     27 
     28    integer :: ind
     29    character (len=100) :: datafile="HIGHATM"
    930   
     31    if (is_master) then ! only the master needs read the file
     32      open(43,file=trim(datafile)//'/NIRcorrection_feb2011.dat', &
     33              status='old')
     34      do ind=1,9
     35         read(43,*)
     36      enddo
     37     
     38      do ind=1,npres
     39         read(43,*)pres1d(ind),corgcm(ind),oco21d(ind),p1999(ind), &
     40                   alfa(ind)
     41         ! Tabulated pressure to Pa
     42         pres1d(ind)=pres1d(ind)*100.
     43      enddo
     44     
     45      close(43)
     46   
     47    endif ! of if (is_master)
     48 
     49    ! broadcast to all cores
     50    call bcast(pres1d)
     51    call bcast(corgcm)
     52    call bcast(oco21d)
     53    call bcast(p1999)
     54    call bcast(alfa)
     55
     56  end subroutine nir_leedat
     57
     58end module nirdata_mod
  • trunk/LMDZ.VENUS/libf/phyvenus/physiq_mod.F

    r4088 r4092  
    7777      USE conc
    7878      USE param_v4_h
    79       USE compo_hedin83_mod2
     79      use compo_hedin83_mod2, only: compo_hedin83_init2
     80      use compo_hedin83_mod2, only: compo_hedin83_mod
     81      use nirdata_mod, only: nir_leedat
    8082      use radlwsw_newtoncool_mod, only: radlwsw_newtoncool
    8183      use radlwsw_mod, only: radlwsw
     
    130132c======================================================================
    131133#include "iniprint.h"
    132 #include "nirdata.h"
    133 #include "hedin.h"
    134134c======================================================================
    135135      LOGICAL, SAVE :: ok_journe ! flag to output IOIPSL file histday
Note: See TracChangeset for help on using the changeset viewer.