Ignore:
Timestamp:
Sep 22, 2024, 10:07:56 PM (24 hours ago)
Author:
dcugnet
Message:

The fortran parameters file "iso_params_mod.F90" is introduced so that "tnat" and "alpha_ideal" are defined in a single place but used in several.
The "getKey" routine is only used in "infotrac" and "infotrac_phy" routines, but could be used outside this scope to get tracers parameters (read from "tracer.def") or isotopic parameters (read from "isotopes_params.def" - disabled for now).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/dyn3d/iniacademic.F90

    r5200 r5214  
    55
    66  USE filtreg_mod, ONLY: inifilr
    7   USE infotrac,    ONLY: nqtot, niso, iqIsoPha, tracers, getKey, isoName, addPhase
     7  USE infotrac,    ONLY: nqtot, niso, iqIsoPha, tracers, isoName, addPhase
    88  USE control_mod, ONLY: day_step,planet_type
    99  use exner_hyb_m, only: exner_hyb
     
    2323  use netcdf, only : NF90_NOWRITE,NF90_OPEN,NF90_NOERR,NF90_INQ_VARID
    2424  use netcdf, only : NF90_CLOSE, NF90_GET_VAR
     25  USE iso_params_mod   ! tnat_* and alpha_ideal_*
    2526
    2627
     
    327328                    WRITE(lunout, *)'In '//TRIM(modname)//': !!!  Beware: alpha_ideal put to 1  !!!'
    328329                 ELSE
    329                     IF(getKey('tnat', tnat, isoName(iName)) .OR. getKey('alpha', alpha_ideal, isoName(iName))) &
    330                     CALL abort_gcm(TRIM(modname), 'missing isotopic parameters', 1)
     330                    SELECT CASE(isoName(iName))
     331                      CASE('H216O'); tnat = tnat_H216O; alpha_ideal = alpha_ideal_H216O
     332                      CASE('H217O'); tnat = tnat_H217O; alpha_ideal = alpha_ideal_H217O
     333                      CASE('H218O'); tnat = tnat_H218O; alpha_ideal = alpha_ideal_H218O
     334                      CASE('HDO');   tnat = tnat_HDO;   alpha_ideal = alpha_ideal_HDO
     335                      CASE('HTO');   tnat = tnat_HTO;   alpha_ideal = alpha_ideal_HTO
     336                      CASE DEFAULT
     337                         CALL abort_gcm(TRIM(modname),'unknown isotope "'//TRIM(isoName(iName))//'" ; check tracer.def file',1)
     338                    END SELECT
    331339                 END IF
    332340                 q(:,:,iq) = q(:,:,iqParent)*tnat*(q(:,:,iqParent)/30.e-3)**(alpha_ideal-1.)
Note: See TracChangeset for help on using the changeset viewer.