Ignore:
Timestamp:
Mar 4, 2022, 6:29:05 PM (3 years ago)
Author:
aslmd
Message:

Introduction of cpp_mugaz_mode to decide what source should be used for cpp and mugaz. Force_cpp and check_cpp_match are deprecated (see issue la-communaut-des-mod-les-atmosph-riques-plan-taires/git-trunk#27).

File:
1 edited

Legend:

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

    r2633 r2635  
    240240     if (is_master) write(*,*) trim(rname)//": enertest = ",enertest
    241241
    242      if (is_master) write(*,*) trim(rname)//&
    243        ": Check to see if cpp values used match gases.def ?"
    244      check_cpp_match=.true. ! default value
    245      call getin_p("check_cpp_match",check_cpp_match)
    246      if (is_master) write(*,*) trim(rname)//&
    247        ": check_cpp_match = ",check_cpp_match
    248 
    249242     if (is_master) write(*,*) trim(rname)//": call radiative transfer ?"
    250243     callrad=.true. ! default value
     
    10081001     if (is_master) write(*,*)trim(rname)//": kmixmin = ",kmixmin
    10091002
    1010      if (is_master) write(*,*)trim(rname)//&
    1011        ": Does user want to force cpp and mugaz?"
     1003     if (is_master) write(*,*)'Predefined Cp from dynamics is ',cpp,'J kg^-1 K^-1'
     1004     if (is_master) write(*,*)'Predefined Mg from dynamics is ',mugaz,'amu'
     1005
    10121006     force_cpp=.false. ! default value
    10131007     call getin_p("force_cpp",force_cpp)
    1014      if (is_master) write(*,*)trim(rname)//": force_cpp = ",force_cpp
    1015 
    10161008     if (force_cpp) then
     1009      if (is_master) write(*,*)trim(rname)//": force_cpp = ",force_cpp
     1010      if (is_master) write(*,*)trim(rname)//": force_cpp is deprecated.",&
     1011      "Set cpp_mugaz_mode=1 in callfis to emulate force_cpp=.true."
     1012      call abort_physic(rname,"Anyway, you need to set force_cpp=.false. to continue.",1)
     1013     endif
     1014
     1015     if (is_master) write(*,*)trim(rname)//&
     1016     ": where do you want your cpp/mugaz value to come from?",&
     1017     "=> 0: dynamics (3d), 1: forced in callfis (1d), 2: computed from gases.def (1d)?"
     1018     cpp_mugaz_mode = 0 ! default value
     1019     call getin_p("cpp_mugaz_mode",cpp_mugaz_mode)
     1020     if (is_master) write(*,*)trim(rname)//": cpp_mugaz_mode = ",cpp_mugaz_mode
     1021
     1022     if ((cpp_mugaz_mode >= 1).and.(is_master).and.(ngrid>1)) then
     1023        write(*,*)'    !!!!! Be aware that having different values for cpp and mugaz in the dynamics and physics'
     1024        write(*,*)'    in 3D can result in very pathological behavior. You have been warned !!!!!'
     1025     endif
     1026
     1027     if (cpp_mugaz_mode == 1) then
    10171028       mugaz = -99999.
    10181029       if (is_master) write(*,*)trim(rname)//&
     
    10201031       call getin_p("mugaz",mugaz)
    10211032       IF (mugaz.eq.-99999.) THEN
    1022          call abort_physic(rname,"mugaz must be set if force_cpp = T",1)
    1023        ELSE
    1024          if (is_master) write(*,*)trim(rname)//": mugaz=",mugaz
     1033         call abort_physic(rname,"mugaz must be set if cpp_mugaz_mode = 1",1)
    10251034       ENDIF
    10261035       cpp = -99999.
     
    10291038       call getin_p("cpp",cpp)
    10301039       IF (cpp.eq.-99999.) THEN
    1031            PRINT *, "cpp must be set if force_cpp = T"
     1040           PRINT *, "cpp must be set if cpp_mugaz_mode = 1"
    10321041           STOP
    1033        ELSE
    1034            if (is_master) write(*,*)trim(rname)//": cpp=",cpp
    10351042       ENDIF
    1036      endif ! of if (force_cpp)
     1043       if (is_master) write(*,*)'New Cp from callfis is ',cpp,'J kg^-1 K^-1'
     1044       if (is_master) write(*,*)'New Mg from callfis is ',mugaz,'amu'
     1045 
     1046     endif ! of if (cpp_mugaz_mode == 1)
    10371047     call su_gases
    10381048     call calc_cpp_mugaz
Note: See TracChangeset for help on using the changeset viewer.