Ignore:
Timestamp:
Jun 17, 2022, 4:24:49 PM (2 years ago)
Author:
lguez
Message:

Sync latest trunk changes to branch LMDZ-ECRAD.

Location:
LMDZ6/branches/LMDZ-ECRAD
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/LMDZ-ECRAD

  • LMDZ6/branches/LMDZ-ECRAD/libf/dyn3dmem/conf_gcm.F90

    r3802 r4171  
    66  USE control_mod
    77#ifdef CPP_IOIPSL
    8   use IOIPSL
     8  USE IOIPSL
    99#else
    1010  ! if not using IOIPSL, we still need to use (a local version of) getin
    11   use ioipsl_getincom
     11  USE ioipsl_getincom
    1212#endif
    13   use misc_mod
    14   use mod_filtre_fft, ONLY : use_filtre_fft
    15   use mod_filtre_fft_loc, ONLY : use_filtre_fft_loc=>use_filtre_fft
    16   use mod_hallo, ONLY : use_mpi_alloc
    17   USE infotrac, ONLY : type_trac
    18   use assert_m, only: assert
     13  USE misc_mod
     14  USE mod_filtre_fft, ONLY: use_filtre_fft
     15  USE mod_filtre_fft_loc, ONLY: use_filtre_fft_loc=>use_filtre_fft
     16  USE mod_hallo, ONLY: use_mpi_alloc
     17  USE infotrac, ONLY: type_trac
     18  USE assert_m, ONLY: assert
    1919  USE comconst_mod, ONLY: dissip_deltaz, dissip_factz, dissip_zref, &
    2020                          iflag_top_bound, mode_top_bound, tau_top_bound, &
     
    5555  LOGICAL  fxyhypbb, ysinuss
    5656  INTEGER i
    57   character(len=*),parameter :: modname="conf_gcm"
    58   character (len=80) :: abort_message
     57  CHARACTER(len=*), PARAMETER :: modname="conf_gcm"
     58  CHARACTER(len=80) :: abort_message
    5959#ifdef CPP_OMP
    60   integer,external :: OMP_GET_NUM_THREADS
     60  INTEGER, EXTERNAL :: OMP_GET_NUM_THREADS
    6161#endif
    6262
     
    102102
    103103  adjust=.false.
    104   call getin('adjust',adjust)
     104  CALL getin('adjust',adjust)
    105105
    106106#ifdef CPP_OMP
    107107  ! adjust=y not implemented in case of OpenMP threads...
    108108  !$OMP PARALLEL
    109   if ((OMP_GET_NUM_THREADS()>1).and.adjust) then
     109  IF ((OMP_GET_NUM_THREADS()>1).and.adjust) then
    110110     write(lunout,*)'conf_gcm: Error, adjust should be set to n' &
    111111          ,' when running with OpenMP threads'
    112112     abort_message = 'Wrong value for adjust'
    113      call abort_gcm(modname,abort_message,1)
    114   endif
     113     CALL abort_gcm(modname,abort_message,1)
     114  ENDIF
    115115  !$OMP END PARALLEL         
    116116#endif
    117117
    118118  itaumax=0
    119   call getin('itaumax',itaumax);
    120   if (itaumax<=0) itaumax=HUGE(itaumax)
     119  CALL getin('itaumax',itaumax);
     120  IF (itaumax<=0) itaumax=HUGE(itaumax)
    121121
    122122  !Config  Key  = prt_level
     
    146146! initialize year_len for aquaplanets and 1D
    147147  CALL getin('calend', calend)
    148      if (calend == 'earth_360d') then
    149         year_len=360
    150       else if (calend == 'earth_365d') then
    151         year_len=365
    152       else if (calend == 'earth_366d') then
    153         year_len=366
    154       else
    155         year_len=1
    156       endif
    157  
     148  IF (calend == 'earth_360d') THEN
     149    year_len=360
     150  ELSE IF (calend == 'earth_365d') THEN
     151    year_len=365
     152  ELSE IF (calend == 'earth_366d') THEN
     153    year_len=366
     154  ELSE
     155    year_len=1
     156  ENDIF
    158157
    159158  !Config  Key  = dayref
     
    345344  ngroup=3
    346345  CALL getin('ngroup',ngroup)
    347   if (mod(iim, 2**ngroup) /= 0) &
     346  IF (mod(iim, 2**ngroup) /= 0) &
    348347       call abort_gcm("conf_gcm", 'iim must be multiple of 2**ngroup', 1)
    349   if (2**ngroup > jjm + 1) &
     348  IF (2**ngroup > jjm + 1) &
    350349       call abort_gcm("conf_gcm", '2**ngroup must be <= jjm + 1', 1)
    351350
     
    357356  iflag_top_bound=1
    358357  CALL getin('iflag_top_bound',iflag_top_bound)
     358  IF (iflag_top_bound < 0 .or. iflag_top_bound > 2) &
     359       call abort_gcm("conf_gcm", 'iflag_top_bound must be 0, 1 or 2', 1)
    359360
    360361  ! mode_top_bound : fields towards which sponge relaxation will be done:
     
    392393  CALL getin('ok_guide',ok_guide)
    393394
    394   if (ok_guide .and. adjust) call abort_gcm("conf_gcm", &
     395  IF (ok_guide .and. adjust) call abort_gcm("conf_gcm", &
    395396       "adjust does not work with ok_guide", 1)
    396397
     
    632633        WRITE(lunout,*)  &
    633634             'only the file phystoke.nc will still be created '
    634      END IF
     635     ENDIF
    635636
    636637     !Config  Key  = type_trac
     
    677678     ok_dyn_ave = .FALSE.
    678679     CALL getin('ok_dyn_ave',ok_dyn_ave)
     680
     681     !Config  Key  = ok_dyn_xios
     682     !Config  Desc = sorties moyennes dans la dynamique
     683     !Config  Def  = n
     684     !Config  Help =
     685     !Config         
     686     ok_dyn_xios = .FALSE.
     687     CALL getin('ok_dyn_xios',ok_dyn_xios)
    679688
    680689     write(lunout,*)' #########################################'
     
    720729     write(lunout,*)' ok_dyn_ins = ', ok_dyn_ins
    721730     write(lunout,*)' ok_dyn_ave = ', ok_dyn_ave
     731     write(lunout,*)' ok_dyn_xios = ', ok_dyn_xios
    722732  else
    723733     !Config  Key  = clon
     
    754764
    755765     IF( grossismx.LT.1. )  THEN
    756         write(lunout,*) &
    757              'conf_gcm: ***  ATTENTION !! grossismx < 1 .   *** '
     766        write(lunout,*) 'conf_gcm: ***ATTENTION !! grossismx < 1 . *** '
    758767        STOP
    759768     ELSE
     
    768777     ENDIF
    769778
    770      write(lunout,*)'conf_gcm: alphax alphay ',alphax,alphay
     779     write(lunout,*) 'conf_gcm: alphax alphay ',alphax,alphay
    771780
    772781     !    alphax et alphay sont les anciennes formulat. des grossissements
     
    835844        WRITE(lunout,*)  &
    836845             'only the file phystoke.nc will still be created '
    837      END IF
     846     ENDIF
    838847
    839848     !Config  Key  = type_trac
     
    880889     ok_dyn_ave = .FALSE.
    881890     CALL getin('ok_dyn_ave',ok_dyn_ave)
     891
     892     !Config  Key  = ok_dyn_xios
     893     !Config  Desc = sorties moyennes dans la dynamique
     894     !Config  Def  = n
     895     !Config  Help =
     896     !Config         
     897     ok_dyn_xios = .FALSE.
     898     CALL getin('ok_dyn_xios',ok_dyn_xios)
    882899
    883900     !Config  Key  = use_filtre_fft
     
    953970
    954971     write(lunout,*)' #########################################'
    955      write(lunout,*)' Configuration des parametres de cel0' &
    956           //'_limit: '
     972     write(lunout,*)' Configuration des parametres de cel0_limit: '
    957973     write(lunout,*)' planet_type = ', planet_type
    958974     write(lunout,*)' calend = ', calend
     
    9941010     write(lunout,*)' ok_dyn_ins = ', ok_dyn_ins
    9951011     write(lunout,*)' ok_dyn_ave = ', ok_dyn_ave
     1012     write(lunout,*)' ok_dyn_xios = ', ok_dyn_xios
    9961013     write(lunout,*)' use_filtre_fft = ', use_filtre_fft
    9971014     write(lunout,*)' use_mpi_alloc = ', use_mpi_alloc
     
    10001017     write(lunout,*)' ok_limit = ', ok_limit
    10011018     write(lunout,*)' ok_etat0 = ', ok_etat0
     1019     write(lunout,*)' ok_guide = ', ok_guide
    10021020     write(lunout,*)' read_orop = ', read_orop
    1003   end IF test_etatinit
     1021  ENDIF test_etatinit
    10041022
    10051023END SUBROUTINE conf_gcm
Note: See TracChangeset for help on using the changeset viewer.