Changeset 6102


Ignore:
Timestamp:
Mar 12, 2026, 4:02:42 PM (10 days ago)
Author:
asima
Message:

Variable year_fr is renamed more properly decimal_year, to avoid confusion with a dimension name in the input SP aerosol file (year_fr = 52 ).

Location:
LMDZ6/trunk/libf/phylmd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/macv2sp.f90

    r6100 r6102  
    5858  !
    5959  REAL :: zlambda, zweight
    60   REAL :: year_fr
     60!  REAL :: year_fr  ! also a dimension name in SP aerosol file ; renamed more properly "decimal_year"
     61  REAL :: decimal_year
    6162  !
    6263  INTEGER band, i, k, Nwv
     
    7980  !
    8081
    81   ! Call sp_setup to retrieve 'aerosol_SP_forcing_year' value used in year_fr calculation below
     82  ! Call sp_setup to retrieve 'aerosol_SP_forcing_year' value used in decimal_year calculation below
    8283  IF (.NOT.sp_initialized) CALL sp_setup
    8384
     
    9091! Choice between yearly vs fixed_year forcing, depending on 'aerosols_SP_forcing_year'
    9192  IF (aerosols_SP_forcing_year.EQ.-9999) THEN
    92      year_fr= float(year_cur) + float(days_elapsed)/float(year_len)
     93     decimal_year= float(year_cur) + float(days_elapsed)/float(year_len)
    9394  ELSE
    94      year_fr= float(aerosols_SP_forcing_year) + float(days_elapsed)/float(year_len)
     95     decimal_year= float(aerosols_SP_forcing_year) + float(days_elapsed)/float(year_len)
    9596  ENDIF
    9697
    97   IF (year_fr.LT.1850.0.OR.year_fr.GE.2024.0) THEN
     98  IF (decimal_year.LT.1850.0.OR.decimal_year.GE.2024.0) THEN
    9899     CALL abort_physic ('macv2sp','year not supported by plume model',1)
    99100  ENDIF
     
    103104  CALL sp_aop_profile                                    ( &
    104105       klev     ,klon ,l443 ,oro    ,xlon     ,xlat      , &
    105        year_fr  ,z    ,dz   ,dNovrN ,aod_prof ,ssa_prof  , &
     106       decimal_year  ,z    ,dz   ,dNovrN ,aod_prof ,ssa_prof  , &
    106107       asy_prof )
    107108  !
     
    113114  CALL sp_aop_profile                                    ( &
    114115       klev     ,klon ,l550 ,oro    ,xlon     ,xlat      , &
    115        year_fr  ,z    ,dz   ,dNovrN ,aod_prof ,ssa_prof  , &
     116       decimal_year  ,z    ,dz   ,dNovrN ,aod_prof ,ssa_prof  , &
    116117       asy_prof )
    117118  !
     
    142143  CALL sp_aop_profile                                    ( &
    143144       klev     ,klon ,l865 ,oro    ,xlon     ,xlat      , &
    144        year_fr  ,z    ,dz   ,dNovrN ,aod_prof ,ssa_prof  , &
     145       decimal_year  ,z    ,dz   ,dNovrN ,aod_prof ,ssa_prof  , &
    145146       asy_prof )
    146147  !
     
    185186    CALL sp_aop_profile                                       ( &
    186187         klev     ,klon ,zlambda ,oro    ,xlon     ,xlat      , &
    187          year_fr  ,z    ,dz      ,dNovrN ,aod_prof ,ssa_prof  , &
     188         decimal_year  ,z    ,dz      ,dNovrN ,aod_prof ,ssa_prof  , &
    188189         asy_prof )
    189190    !
  • LMDZ6/trunk/libf/phylmd/mo_simple_plumes.f90

    r6100 r6102  
    290290  ! week in the year and superimposed on the yearly mean value of the weight.
    291291  !
    292   SUBROUTINE set_time_weight(year_fr)
     292  SUBROUTINE set_time_weight(decimal_year)
    293293    !
    294294    ! ----------
    295295    !
    296296    REAL, INTENT(IN) ::  &
    297          year_fr           !< Fractional Year (1850.0 - 2100.99)
     297         decimal_year      !< Fractional Year (1850.0 - 2100.99)
    298298
    299299    INTEGER          ::  &
     
    304304    ! ----------
    305305    !
    306     iyear = FLOOR(year_fr) - 1849
    307     iweek = FLOOR((year_fr - FLOOR(year_fr)) * ntimes) + 1
     306    iyear = FLOOR(decimal_year) - 1849
     307    iweek = FLOOR((decimal_year - FLOOR(decimal_year)) * ntimes) + 1
    308308
    309309    IF ((iweek > ntimes) .OR. (iweek < 1) .OR. (iyear > nyears) .OR. (iyear < 1)) THEN
     
    328328  SUBROUTINE sp_aop_profile                                                                           ( &
    329329       nlevels        ,ncol           ,lambda         ,oro            ,lon            ,lat            , &
    330        year_fr        ,z              ,dz             ,dNovrN         ,aod_prof       ,ssa_prof       , &
     330       decimal_year        ,z              ,dz             ,dNovrN         ,aod_prof       ,ssa_prof       , &
    331331       asy_prof       )
    332332    !
     
    339339    REAL, INTENT(IN)           :: &
    340340         lambda,                  & !< wavelength
    341          year_fr,                 & !< Fractional Year (1903.0 is the 0Z on the first of January 1903, Gregorian)
     341         decimal_year,            & !< Fractional Year (1903.0 is the 0Z on the first of January 1903, Gregorian)
    342342         oro(ncol),               & !< orographic height (m)
    343343         lon(ncol),               & !< longitude
     
    393393    ! get time weights
    394394    !
    395     CALL set_time_weight(year_fr)
     395    CALL set_time_weight(decimal_year)
    396396    !
    397397    ! initialize variables, including output
Note: See TracChangeset for help on using the changeset viewer.