Changeset 2870


Ignore:
Timestamp:
Jan 16, 2023, 4:47:10 PM (23 months ago)
Author:
jleconte
Message:

Removed too many prints in CIA interpolation + correction for hot H2H2

Location:
trunk/LMDZ.GENERIC/libf/phystd
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/libf/phystd/interpolateCH4CH4.F90

    r2662 r2870  
    5353
    5454  character*20 bleh
    55   double precision blah, Ttemp
     55  double precision blah, Ttemp, ztemp
    5656  integer nres
    5757  integer ind
    5858
    59   if(temp.gt.400)then
     59  ztemp = temp
     60  if(ztemp.gt.400)then
    6061    if (strictboundcia) then
    6162      if (is_master) then
     
    6566      stop
    6667    else
    67       if (is_master) then
    68         print*,'Your temperatures are too high for this CH4-CH4 CIA dataset'
    69         print*,'you have chosen strictboundcia = ', strictboundcia
    70         print*,'*********************************************************'
    71         print*,' we allow model to continue but with temp = 400          '
    72         print*,'  ...       for CH4-CH4 CIA dataset        ...           '
    73         print*,'  ... we assume we know what you are doing ...           '
    74         print*,'*********************************************************'
    75       endif
    76       temp = 400
     68      !if (is_master) then
     69      !  print*,'Your temperatures are too high for this CH4-CH4 CIA dataset'
     70      !  print*,'you have chosen strictboundcia = ', strictboundcia
     71      !  print*,'*********************************************************'
     72      !  print*,' we allow model to continue but with temp = 400          '
     73      !  print*,'  ...       for CH4-CH4 CIA dataset        ...           '
     74      !  print*,'  ... we assume we know what you are doing ...           '
     75      !  print*,'*********************************************************'
     76      !endif
     77      ztemp = 400
    7778    endif
    78   elseif(temp.lt.40)then
     79  elseif(ztemp.lt.40)then
    7980    if (strictboundcia) then
    8081      if (is_master) then
     
    8485      stop
    8586    else
    86       if (is_master) then
    87         print*,'Your temperatures are too low for this CH4-CH4 CIA dataset'
    88         print*,'you have chosen strictboundcia = ', strictboundcia
    89         print*,'*********************************************************'
    90         print*,' we allow model to continue but with temp = 40           '
    91         print*,'  ...       for CH4-CH4 CIA dataset        ...           '
    92         print*,'  ... we assume we know what you are doing ...           '
    93         print*,'*********************************************************'
    94       endif
    95       temp = 40
     87      !if (is_master) then
     88      !  print*,'Your temperatures are too low for this CH4-CH4 CIA dataset'
     89      !  print*,'you have chosen strictboundcia = ', strictboundcia
     90      !  print*,'*********************************************************'
     91      !  print*,' we allow model to continue but with temp = 40           '
     92      !  print*,'  ...       for CH4-CH4 CIA dataset        ...           '
     93      !  print*,'  ... we assume we know what you are doing ...           '
     94      !  print*,'*********************************************************'
     95      !endif
     96      ztemp = 40
    9697    endif
    9798  endif
     
    150151  endif
    151152
    152   call bilinearbig(nS,nT,wn_arr,temp_arr,abs_arr,wn,temp,abcoef,ind)
     153  call bilinearbig(nS,nT,wn_arr,temp_arr,abs_arr,wn,ztemp,abcoef,ind)
    153154
    154155!     print*,'the absorption is ',abcoef,' cm^5 molecule^-2'
  • trunk/LMDZ.GENERIC/libf/phystd/interpolateH2CH4.F90

    r2662 r2870  
    5555
    5656  character*20 bleh
    57   double precision blah, Ttemp
     57  double precision blah, Ttemp, ztemp
    5858  integer nres
    5959  integer ind
    6060
    61   if(temp.gt.400)then
     61  ztemp=temp
     62  if(ztemp.gt.400)then
    6263    if (strictboundcia) then
    6364      if (is_master) then
     
    6768      stop
    6869    else
    69       if (is_master) then
    70         print*,'Your temperatures are too high for this H2-CH4 CIA dataset'
    71         print*,'you have chosen strictboundcia = ', strictboundcia
    72         print*,'*********************************************************'
    73         print*,' we allow model to continue but with temp = 400          '
    74         print*,'  ...       for H2-CH4 CIA dataset         ...           '
    75         print*,'  ... we assume we know what you are doing ...           '
    76         print*,'*********************************************************'
    77       endif
    78       temp = 400
     70      !if (is_master) then
     71      !  print*,'Your temperatures are too high for this H2-CH4 CIA dataset'
     72      !  print*,'you have chosen strictboundcia = ', strictboundcia
     73      !  print*,'*********************************************************'
     74      !  print*,' we allow model to continue but with temp = 400          '
     75      !  print*,'  ...       for H2-CH4 CIA dataset         ...           '
     76      !  print*,'  ... we assume we know what you are doing ...           '
     77      !  print*,'*********************************************************'
     78      !endif
     79      ztemp = 400
    7980    endif
    80   elseif(temp.lt.40)then
     81  elseif(ztemp.lt.40)then
    8182    if (strictboundcia) then
    8283      if (is_master) then
     
    8687      stop
    8788    else
    88       if (is_master) then
    89         print*,'Your temperatures are too low for this H2-CH4 CIA dataset'
    90         print*,'you have chosen strictboundcia = ', strictboundcia
    91         print*,'*********************************************************'
    92         print*,' we allow model to continue but with temp = 40           '
    93         print*,'  ...       for H2-CH4 CIA dataset         ...           '
    94         print*,'  ... we assume we know what you are doing ...           '
    95         print*,'*********************************************************'
    96       endif
    97       temp = 40
     89      !if (is_master) then
     90      !  print*,'Your temperatures are too low for this H2-CH4 CIA dataset'
     91      !  print*,'you have chosen strictboundcia = ', strictboundcia
     92      !  print*,'*********************************************************'
     93      !  print*,' we allow model to continue but with temp = 40           '
     94      !  print*,'  ...       for H2-CH4 CIA dataset         ...           '
     95      !  print*,'  ... we assume we know what you are doing ...           '
     96      !  print*,'*********************************************************'
     97      !endif
     98      ztemp = 40
    9899    endif
    99100  endif
     
    109110         if (H2orthopara_mixture.eq."normal") then
    110111           dt_file=TRIM(datadir)//'/continuum_data/H2-CH4_norm_2011.cia'
    111          else if (H2orthopara_mixture.eq."equilibrium") then
     112         else if ((H2orthopara_mixture.eq."hot") .or. (H2orthopara_mixture.eq."equilibrium")) then
    112113           dt_file=TRIM(datadir)//'/continuum_data/H2-CH4_eq_2011.cia'
    113114         endif
     
    158159  endif
    159160
    160   call bilinearbig(nS,nT,wn_arr,temp_arr,abs_arr,wn,temp,abcoef,ind)
     161  call bilinearbig(nS,nT,wn_arr,temp_arr,abs_arr,wn,ztemp,abcoef,ind)
    161162
    162163!     print*,'the absorption is ',abcoef,' cm^5 molecule^-2'
  • trunk/LMDZ.GENERIC/libf/phystd/interpolateH2H2.F90

    r2837 r2870  
    5858
    5959      character*20 bleh
    60       double precision blah, Ttemp
     60      double precision blah, Ttemp, ztemp
    6161      integer nres
    6262
    6363      integer ind
     64
     65      ztemp=temp
    6466      if ((H2orthopara_mixture .eq. "hot")) then
    65         if (temp .gt. 7000.) then
     67        if (ztemp .gt. 7000.) then
    6668          if (strictboundcia) then
    6769            if (is_master) then
     
    7072            stop
    7173          else
    72             if (is_master) then
    73               print*,'Your temperatures are too high for this H2-H2 CIA dataset (Hot Jupiter case)'
    74               print*,'you have chosen strictboundcia = ', strictboundcia
    75               print*,'*********************************************************'
    76               print*,' we allow model to continue but with temp = 7000          '
    77               print*,'  ...       for H2-H2 CIA dataset          ...           '
    78               print*,'  ... we assume we know what you are doing ...           '
    79               print*,'*********************************************************'
    80             endif !is_master
    81             temp = 7000.
     74            !if (is_master) then
     75            !  print*,'Your temperatures are too high for this H2-H2 CIA dataset (Hot Jupiter case)'
     76            !  print*,'you have chosen strictboundcia = ', strictboundcia
     77            !  print*,'*********************************************************'
     78            !  print*,' we allow model to continue but with temp = 7000          '
     79            !  print*,'  ...       for H2-H2 CIA dataset          ...           '
     80            !  print*,'  ... we assume we know what you are doing ...           '
     81            !  print*,'*********************************************************'
     82            !endif !is_master
     83            ztemp = 7000.
    8284          endif !strictboundcia
    8385        endif !(temp .gt. 7000.)
    8486      else ! if not "hot"
    85         if(temp.gt.400)then
     87        if(ztemp.gt.400)then
    8688          if (strictboundcia) then
    8789            if (is_master) then
     
    9294            stop
    9395          else
    94             if (is_master) then
    95               print*,'Your temperatures are too high for this H2-H2 CIA dataset'
    96               print*,'you have chosen strictboundcia = ', strictboundcia
    97               print*,'*********************************************************'
    98               print*,' we allow model to continue but with temp = 400          '
    99               print*,'  ...       for H2-H2 CIA dataset          ...           '
    100               print*,'  ... we assume we know what you are doing ...           '
    101               print*,'*********************************************************'
    102             endif !is_master
    103             temp = 400
     96            !if (is_master) then
     97            !  print*,'Your temperatures are too high for this H2-H2 CIA dataset'
     98            !  print*,'you have chosen strictboundcia = ', strictboundcia
     99            !  print*,'*********************************************************'
     100            !  print*,' we allow model to continue but with temp = 400          '
     101            !  print*,'  ...       for H2-H2 CIA dataset          ...           '
     102            !  print*,'  ... we assume we know what you are doing ...           '
     103            !  print*,'*********************************************************'
     104            !endif !is_master
     105            ztemp = 400
    104106          endif !of strictboundcia
    105         elseif(temp.lt.40)then     
     107        elseif(ztemp.lt.40)then     
    106108          if (strictboundcia) then
    107109            if (is_master) then
     
    112114            stop
    113115          else
    114             if (is_master) then
    115               print*,'Your temperatures are too low for this H2-H2 CIA dataset'
    116               print*,'you have chosen strictboundcia = ', strictboundcia
    117               print*,'*********************************************************'
    118               print*,' we allow model to continue but with temp = 40           '
    119               print*,'  ...       for H2-H2 CIA dataset          ...           '
    120               print*,'  ... we assume we know what you are doing ...           '
    121               print*,'*********************************************************'
    122             endif !is_master
    123             temp = 40
     116            !if (is_master) then
     117            !  print*,'Your temperatures are too low for this H2-H2 CIA dataset'
     118            !  print*,'you have chosen strictboundcia = ', strictboundcia
     119            !  print*,'*********************************************************'
     120            !  print*,' we allow model to continue but with temp = 40           '
     121            !  print*,'  ...       for H2-H2 CIA dataset          ...           '
     122            !  print*,'  ... we assume we know what you are doing ...           '
     123            !  print*,'*********************************************************'
     124            !endif !is_master
     125            ztemp = 40
    124126          endif !of strictboundcia       
    125127        endif ! of (temp .gt. 400)
     
    216218           
    217219           
    218          call bilinearbig(nS,nT,wn_arr,temp_arr,abs_arr,wn,temp,abcoef,ind)
     220         call bilinearbig(nS,nT,wn_arr,temp_arr,abs_arr,wn,ztemp,abcoef,ind)
    219221
    220222         !print*,'the absorption is ',abcoef,' cm^5 molecule^-2'
  • trunk/LMDZ.GENERIC/libf/phystd/interpolateH2He.F90

    r2667 r2870  
    5454
    5555      character*20 bleh
    56       double precision blah, Ttemp
     56      double precision blah, Ttemp, ztemp
     57
    5758      integer nres
    5859
    5960      integer ind
    6061
     62      ztemp=temp
    6163
    6264      if (H2orthopara_mixture .eq. "hot") then ! .and. (temp .gt. 3000.0)) then
    6365        ! print*,"We're in the Hot Jupiter case "
    6466        nS = 19981
    65         if (temp .gt. 9900) then
     67        if (ztemp .gt. 9900) then
    6668          if (strictboundcia) then
    6769            if (is_master) then
     
    7173            stop
    7274          else
    73             if (is_master) then
    74               print*,'Your temperatures are too high for this H2-He CIA dataset (Hot Jupiter case)'
    75               print*,'you have chosen strictboundcia = ', strictboundcia
    76               print*,'*********************************************************'
    77               print*,' we allow model to continue but with temp = 9900.0 K     '
    78               print*,'  ...       for H2-He CIA dataset          ...           '
    79               print*,'  ... we assume we know what you are doing ...           '
    80               print*,'*********************************************************'
    81             endif !is_master
    82             temp = 9900.0
     75            !if (is_master) then
     76            !  print*,'Your temperatures are too high for this H2-He CIA dataset (Hot Jupiter case)'
     77            !  print*,'you have chosen strictboundcia = ', strictboundcia
     78            !  print*,'*********************************************************'
     79            !  print*,' we allow model to continue but with temp = 9900.0 K     '
     80            !  print*,'  ...       for H2-He CIA dataset          ...           '
     81            !  print*,'  ... we assume we know what you are doing ...           '
     82            !  print*,'*********************************************************'
     83            !endif !is_master
     84            ztemp = 9900.0
    8385          endif ! of stricbound cia
    8486        endif ! temp .gt. 9900
    8587      else !not in Hot Jupiter case
    8688        nS = 2428
    87         if(temp.gt.400)then
     89        if(ztemp.gt.400)then
    8890          if (strictboundcia) then
    8991            if (is_master) then
     
    9395            stop
    9496          else
    95             if (is_master) then
    96               print*,'Your temperatures are too high for this H2-He CIA dataset'
    97               print*,'you have chosen strictboundcia = ', strictboundcia
    98               print*,'*********************************************************'
    99               print*,' we allow model to continue but with temp = 400          '
    100               print*,'  ...       for H2-He CIA dataset          ...           '
    101               print*,'  ... we assume we know what you are doing ...           '
    102               print*,'*********************************************************'
    103             endif ! is_master
    104             temp = 400
     97            !if (is_master) then
     98            !  print*,'Your temperatures are too high for this H2-He CIA dataset'
     99            !  print*,'you have chosen strictboundcia = ', strictboundcia
     100            !  print*,'*********************************************************'
     101            !  print*,' we allow model to continue but with temp = 400          '
     102            !  print*,'  ...       for H2-He CIA dataset          ...           '
     103            !  print*,'  ... we assume we know what you are doing ...           '
     104            !  print*,'*********************************************************'
     105            !endif ! is_master
     106            ztemp = 400
    105107          endif !of strictboundcia
    106         elseif(temp.lt.40)then
     108        elseif(ztemp.lt.40)then
    107109          if (strictboundcia) then
    108110            if (is_master) then
     
    112114            stop
    113115          else
    114             if (is_master) then
    115               print*,'Your temperatures are too low for this H2-He CIA dataset'
    116               print*,'you have chosen strictboundcia = ', strictboundcia
    117               print*,'*********************************************************'
    118               print*,' we allow model to continue but with temp = 40           '
    119               print*,'  ...       for H2-He CIA dataset          ...           '
    120               print*,'  ... we assume we know what you are doing ...           '
    121               print*,'*********************************************************'
    122             endif ! is_master
    123             temp = 40
     116            !if (is_master) then
     117            !  print*,'Your temperatures are too low for this H2-He CIA dataset'
     118            !  print*,'you have chosen strictboundcia = ', strictboundcia
     119            !  print*,'*********************************************************'
     120            !  print*,' we allow model to continue but with temp = 40           '
     121            !  print*,'  ...       for H2-He CIA dataset          ...           '
     122            !  print*,'  ... we assume we know what you are doing ...           '
     123            !  print*,'*********************************************************'
     124            !endif ! is_master
     125            ztemp = 40
    124126          endif !of strictboundcia
    125127        endif ! of (temp .gt. 400)
     
    190192      endif
    191193
    192          call bilinearbig(nS,nT,wn_arr,temp_arr,abs_arr,wn,temp,abcoef,ind)
     194         call bilinearbig(nS,nT,wn_arr,temp_arr,abs_arr,wn,ztemp,abcoef,ind)
    193195
    194196         !print*,'the absorption is ',abcoef,' cm^5 molecule^-2'
  • trunk/LMDZ.GENERIC/libf/phystd/interpolateHeCH4.F90

    r2662 r2870  
    5555
    5656  character*20 bleh
    57   double precision blah, Ttemp
     57  double precision blah, Ttemp, ztemp
    5858  integer nres
    5959  integer ind
    6060
    61   if(temp.gt.350)then
     61  ztemp=temp
     62
     63  if(ztemp.gt.350)then
    6264    if (strictboundcia) then
    6365      if (is_master) then
     
    6769      stop
    6870    else
    69       if (is_master) then
    70         print*,'Your temperatures are too high for this He-CH4 CIA dataset'
    71         print*,'you have chosen strictboundcia = ', strictboundcia
    72         print*,'*********************************************************'
    73         print*,' we allow model to continue but with temp = 350          '
    74         print*,'  ...       for He-CH4 CIA dataset         ...           '
    75         print*,'  ... we assume we know what you are doing ...           '
    76         print*,'*********************************************************'
    77       endif
    78       temp = 350
     71      !if (is_master) then
     72      !  print*,'Your temperatures are too high for this He-CH4 CIA dataset'
     73      !  print*,'you have chosen strictboundcia = ', strictboundcia
     74      !  print*,'*********************************************************'
     75      !  print*,' we allow model to continue but with temp = 350          '
     76      !  print*,'  ...       for He-CH4 CIA dataset         ...           '
     77      !  print*,'  ... we assume we know what you are doing ...           '
     78      !  print*,'*********************************************************'
     79      !endif
     80      ztemp = 350
    7981    endif
    80   elseif(temp.lt.40)then
     82  elseif(ztemp.lt.40)then
    8183    if (strictboundcia) then
    8284      if (is_master) then
     
    8688      stop
    8789    else
    88       if (is_master) then
    89         print*,'Your temperatures are too low for this He-CH4 CIA dataset'
    90         print*,'you have chosen strictboundcia = ', strictboundcia
    91         print*,'*********************************************************'
    92         print*,' we allow model to continue but with temp = 40           '
    93         print*,'  ...       for He-CH4 CIA dataset         ...           '
    94         print*,'  ... we assume we know what you are doing ...           '
    95         print*,'*********************************************************'
    96       endif
    97       temp = 40
     90      !if (is_master) then
     91      !  print*,'Your temperatures are too low for this He-CH4 CIA dataset'
     92      !  print*,'you have chosen strictboundcia = ', strictboundcia
     93      !  print*,'*********************************************************'
     94      !  print*,' we allow model to continue but with temp = 40           '
     95      !  print*,'  ...       for He-CH4 CIA dataset         ...           '
     96      !  print*,'  ... we assume we know what you are doing ...           '
     97      !  print*,'*********************************************************'
     98      !endif
     99      ztemp = 40
    98100    endif
    99101  endif
     
    154156  endif
    155157
    156   call bilinearbig(nS,nT,wn_arr,temp_arr,abs_arr,wn,temp,abcoef,ind)
     158  call bilinearbig(nS,nT,wn_arr,temp_arr,abs_arr,wn,ztemp,abcoef,ind)
    157159
    158160!     print*,'the absorption is ',abcoef,' cm^5 molecule^-2'
  • trunk/LMDZ.GENERIC/libf/phystd/interpolateN2H2.F90

    r2662 r2870  
    1414  !==================================================================
    1515
     16  use callkeys_mod, only: strictboundcia
    1617  use datafile_mod, only: datadir
    1718  use mod_phys_lmdz_para, only : is_master
     
    5455
    5556  character*20 bleh
    56   double precision blah, Ttemp
     57  double precision blah, Ttemp, ztemp
    5758  integer nres
    5859  integer ind
    5960
    60   if(temp.gt.400)then
    61      if (is_master) then
    62        print*,'Your temperatures are too high for this N2-H2 CIA dataset.'
    63        print*,'Please run mixed N2-H2 atmospheres below T = 400 K.'     
    64      endif
    65      stop
     61  ztemp=temp
     62
     63  if(ztemp.gt.400)then
     64    if (strictboundcia) then
     65      if (is_master) then
     66        print*,'Your temperatures are too high for this N2-H2 CIA dataset. If you '
     67        print*,'really want to run simulations with hydrogen at T > 400 K,'
     68        print*,'find relevant data.'
     69      endif !is_master
     70      stop
     71    else
     72      !if (is_master) then
     73      !  print*,'Your temperatures are too high for this N2-H2 CIA dataset'
     74      !  print*,'you have chosen strictboundcia = ', strictboundcia
     75      !  print*,'*********************************************************'
     76      !  print*,' we allow model to continue but with temp = 4000          '
     77      !  print*,'  ...       for N2-H2 CIA dataset          ...           '
     78      !  print*,'  ... we assume we know what you are doing ...           '
     79      !  print*,'*********************************************************'
     80      !endif !is_master
     81      ztemp = 400.
     82    endif !strictboundcia
    6683  endif
    6784
     
    121138  endif
    122139
    123   call bilinearbig(nS,nT,wn_arr,temp_arr,abs_arr,wn,temp,abcoef,ind)
     140  call bilinearbig(nS,nT,wn_arr,temp_arr,abs_arr,wn,ztemp,abcoef,ind)
    124141
    125142!     print*,'the absorption is ',abcoef,' cm^5 molecule^-2'
  • trunk/LMDZ.GENERIC/libf/phystd/interpolateN2N2.F90

    r2662 r2870  
    1414  !==================================================================
    1515
     16  use callkeys_mod, only: strictboundcia
    1617  use datafile_mod, only: datadir
    1718  use mod_phys_lmdz_para, only : is_master
     
    5354
    5455  character*20 bleh
    55   double precision blah, Ttemp
     56  double precision blah, Ttemp, ztemp
    5657  integer nres
    5758
     59  ztemp=temp
    5860
    59   if(temp.gt.400)then
     61  if(ztemp.gt.400)then
     62   if (strictboundcia) then
    6063     if (is_master) then
    61        print*,'Your temperatures are too high for this N2-N2 CIA dataset.'
    62        print*,'Currently, HITRAN provides data for this pair in the range 40-400 K.'
    63      endif
     64       print*,'Your temperatures are too high for this N2-N2 CIA dataset. If you '
     65       print*,'really want to run simulations with hydrogen at T > 400 K,'
     66       print*,'find relevant data.'
     67     endif !is_master
    6468     stop
     69   else
     70     !if (is_master) then
     71     !  print*,'Your temperatures are too high for this N2-?2 CIA dataset'
     72     !  print*,'you have chosen strictboundcia = ', strictboundcia
     73     !  print*,'*********************************************************'
     74     !  print*,' we allow model to continue but with temp = 4000          '
     75     !  print*,'  ...       for N2-N2 CIA dataset          ...           '
     76     !  print*,'  ... we assume we know what you are doing ...           '
     77     !  print*,'*********************************************************'
     78     !endif !is_master
     79     ztemp = 400.
     80   endif !strictboundcia
    6581  endif
     82
    6683
    6784  amagat = (273.15/temp)*(pres/101325.0)
     
    117134     endif
    118135  endif
    119      call bilinearbig(nS,nT,wn_arr,temp_arr,abs_arr,wn,temp,abcoef,ind)
     136     call bilinearbig(nS,nT,wn_arr,temp_arr,abs_arr,wn,ztemp,abcoef,ind)
    120137
    121138!     print*,'the absorption is ',abcoef,' cm^5 molecule^-2'
Note: See TracChangeset for help on using the changeset viewer.