set_resol_mod.F90 Source File


This file depends on

sourcefile~~set_resol_mod.f90~~EfferentGraph sourcefile~set_resol_mod.f90 set_resol_mod.F90 sourcefile~abort_trans_mod.f90 abort_trans_mod.F90 sourcefile~set_resol_mod.f90->sourcefile~abort_trans_mod.f90 sourcefile~tpm_ctl.f90 tpm_ctl.F90 sourcefile~set_resol_mod.f90->sourcefile~tpm_ctl.f90 sourcefile~tpm_dim.f90 tpm_dim.F90 sourcefile~set_resol_mod.f90->sourcefile~tpm_dim.f90 sourcefile~tpm_distr.f90 tpm_distr.F90 sourcefile~set_resol_mod.f90->sourcefile~tpm_distr.f90 sourcefile~tpm_fft.f90 tpm_fft.F90 sourcefile~set_resol_mod.f90->sourcefile~tpm_fft.f90 sourcefile~tpm_fields.f90 tpm_fields.F90 sourcefile~set_resol_mod.f90->sourcefile~tpm_fields.f90 sourcefile~tpm_flt.f90 tpm_flt.F90 sourcefile~set_resol_mod.f90->sourcefile~tpm_flt.f90 sourcefile~tpm_gen.f90 tpm_gen.F90 sourcefile~set_resol_mod.f90->sourcefile~tpm_gen.f90 sourcefile~tpm_geometry.f90 tpm_geometry.F90 sourcefile~set_resol_mod.f90->sourcefile~tpm_geometry.f90 sourcefile~tpm_hicfft.f90 tpm_hicfft.F90 sourcefile~set_resol_mod.f90->sourcefile~tpm_hicfft.f90 sourcefile~abort_trans_mod.f90->sourcefile~tpm_distr.f90 sourcefile~abort_trans_mod.f90->sourcefile~tpm_gen.f90 sourcefile~sharedmem_mod.f90 sharedmem_mod.F90 sourcefile~tpm_ctl.f90->sourcefile~sharedmem_mod.f90 sourcefile~parkind_ectrans.f90 parkind_ectrans.F90 sourcefile~tpm_fft.f90->sourcefile~parkind_ectrans.f90 sourcefile~tpm_fields.f90->sourcefile~parkind_ectrans.f90 sourcefile~tpm_flt.f90->sourcefile~parkind_ectrans.f90 sourcefile~seefmm_mix.f90 seefmm_mix.F90 sourcefile~tpm_flt.f90->sourcefile~seefmm_mix.f90 sourcefile~tpm_gen.f90->sourcefile~parkind_ectrans.f90 sourcefile~tpm_geometry.f90->sourcefile~parkind_ectrans.f90 sourcefile~growing_allocator_mod.f90 growing_allocator_mod.F90 sourcefile~tpm_hicfft.f90->sourcefile~growing_allocator_mod.f90 sourcefile~tpm_hicfft.f90->sourcefile~parkind_ectrans.f90 sourcefile~seefmm_mix.f90->sourcefile~parkind_ectrans.f90 sourcefile~wts500_mod.f90 wts500_mod.F90 sourcefile~seefmm_mix.f90->sourcefile~wts500_mod.f90 sourcefile~wts500_mod.f90->sourcefile~parkind_ectrans.f90

Files dependent on this one

sourcefile~~set_resol_mod.f90~~AfferentGraph sourcefile~set_resol_mod.f90 set_resol_mod.F90 sourcefile~dealloc_resol_mod.f90 dealloc_resol_mod.F90 sourcefile~dealloc_resol_mod.f90->sourcefile~set_resol_mod.f90 sourcefile~dealloc_resol_mod.f90~2 dealloc_resol_mod.F90 sourcefile~dealloc_resol_mod.f90~2->sourcefile~set_resol_mod.f90 sourcefile~dir_trans.f90 dir_trans.F90 sourcefile~dir_trans.f90->sourcefile~set_resol_mod.f90 sourcefile~dir_trans.f90~2 dir_trans.F90 sourcefile~dir_trans.f90~2->sourcefile~set_resol_mod.f90 sourcefile~dir_transad.f90~2 dir_transad.F90 sourcefile~dir_transad.f90~2->sourcefile~set_resol_mod.f90 sourcefile~dist_grid.f90 dist_grid.F90 sourcefile~dist_grid.f90->sourcefile~set_resol_mod.f90 sourcefile~dist_grid.f90~2 dist_grid.F90 sourcefile~dist_grid.f90~2->sourcefile~set_resol_mod.f90 sourcefile~dist_grid_32.f90 dist_grid_32.F90 sourcefile~dist_grid_32.f90->sourcefile~set_resol_mod.f90 sourcefile~dist_grid_32.f90~2 dist_grid_32.F90 sourcefile~dist_grid_32.f90~2->sourcefile~set_resol_mod.f90 sourcefile~dist_spec.f90 dist_spec.F90 sourcefile~dist_spec.f90->sourcefile~set_resol_mod.f90 sourcefile~dist_spec.f90~2 dist_spec.F90 sourcefile~dist_spec.f90~2->sourcefile~set_resol_mod.f90 sourcefile~gath_grid.f90 gath_grid.F90 sourcefile~gath_grid.f90->sourcefile~set_resol_mod.f90 sourcefile~gath_grid.f90~2 gath_grid.F90 sourcefile~gath_grid.f90~2->sourcefile~set_resol_mod.f90 sourcefile~gath_grid_32.f90 gath_grid_32.F90 sourcefile~gath_grid_32.f90->sourcefile~set_resol_mod.f90 sourcefile~gath_grid_32.f90~2 gath_grid_32.F90 sourcefile~gath_grid_32.f90~2->sourcefile~set_resol_mod.f90 sourcefile~gath_spec.f90 gath_spec.F90 sourcefile~gath_spec.f90->sourcefile~set_resol_mod.f90 sourcefile~gath_spec.f90~2 gath_spec.F90 sourcefile~gath_spec.f90~2->sourcefile~set_resol_mod.f90 sourcefile~gpnorm_trans.f90 gpnorm_trans.F90 sourcefile~gpnorm_trans.f90->sourcefile~set_resol_mod.f90 sourcefile~gpnorm_trans.f90~2 gpnorm_trans.F90 sourcefile~gpnorm_trans.f90~2->sourcefile~set_resol_mod.f90 sourcefile~gpnorm_trans_ctl_mod.f90 gpnorm_trans_ctl_mod.F90 sourcefile~gpnorm_trans.f90~2->sourcefile~gpnorm_trans_ctl_mod.f90 sourcefile~gpnorm_trans_ctl_mod.f90->sourcefile~set_resol_mod.f90 sourcefile~gpnorm_trans_gpu.f90 gpnorm_trans_gpu.F90 sourcefile~gpnorm_trans_gpu.f90->sourcefile~set_resol_mod.f90 sourcefile~inv_trans.f90 inv_trans.F90 sourcefile~inv_trans.f90->sourcefile~set_resol_mod.f90 sourcefile~inv_trans.f90~2 inv_trans.F90 sourcefile~inv_trans.f90~2->sourcefile~set_resol_mod.f90 sourcefile~inv_transad.f90~2 inv_transad.F90 sourcefile~inv_transad.f90~2->sourcefile~set_resol_mod.f90 sourcefile~setup_trans.f90 setup_trans.F90 sourcefile~setup_trans.f90->sourcefile~set_resol_mod.f90 sourcefile~setup_trans.f90~2 setup_trans.F90 sourcefile~setup_trans.f90~2->sourcefile~set_resol_mod.f90 sourcefile~specnorm.f90 specnorm.F90 sourcefile~specnorm.f90->sourcefile~set_resol_mod.f90 sourcefile~specnorm.f90~2 specnorm.F90 sourcefile~specnorm.f90~2->sourcefile~set_resol_mod.f90 sourcefile~trans_end.f90 trans_end.F90 sourcefile~trans_end.f90->sourcefile~set_resol_mod.f90 sourcefile~trans_end.f90->sourcefile~dealloc_resol_mod.f90 sourcefile~trans_end.f90~2 trans_end.F90 sourcefile~trans_end.f90~2->sourcefile~set_resol_mod.f90 sourcefile~trans_end.f90~2->sourcefile~dealloc_resol_mod.f90 sourcefile~trans_inq.f90 trans_inq.F90 sourcefile~trans_inq.f90->sourcefile~set_resol_mod.f90 sourcefile~trans_inq.f90~2 trans_inq.F90 sourcefile~trans_inq.f90~2->sourcefile~set_resol_mod.f90 sourcefile~trans_pnm.f90 trans_pnm.F90 sourcefile~trans_pnm.f90->sourcefile~set_resol_mod.f90 sourcefile~trans_pnm.f90~2 trans_pnm.F90 sourcefile~trans_pnm.f90~2->sourcefile~set_resol_mod.f90 sourcefile~vordiv_to_uv.f90 vordiv_to_uv.F90 sourcefile~vordiv_to_uv.f90->sourcefile~set_resol_mod.f90 sourcefile~vordiv_to_uv.f90~2 vordiv_to_uv.F90 sourcefile~vordiv_to_uv.f90~2->sourcefile~set_resol_mod.f90 sourcefile~trans_release.f90 trans_release.F90 sourcefile~trans_release.f90->sourcefile~dealloc_resol_mod.f90 sourcefile~trans_release.f90~2 trans_release.F90 sourcefile~trans_release.f90~2->sourcefile~dealloc_resol_mod.f90

Source Code

! (C) Copyright 2000- ECMWF.
! (C) Copyright 2000- Meteo-France.
! (C) Copyright 2022- NVIDIA.
! 
! This software is licensed under the terms of the Apache Licence Version 2.0
! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
! In applying this licence, ECMWF does not waive the privileges and immunities
! granted to it by virtue of its status as an intergovernmental organisation
! nor does it submit to any jurisdiction.
!

MODULE SET_RESOL_MOD
CONTAINS
SUBROUTINE SET_RESOL(KRESOL,LDSETUP)
USE PARKIND1        ,ONLY : JPIM

USE TPM_GEN         ,ONLY : NOUT, MSETUP0, NCUR_RESOL, NMAX_RESOL,LENABLED
USE TPM_DIM         ,ONLY : R, DIM_RESOL
!USE TPM_TRANS
USE TPM_DISTR       ,ONLY : D, DISTR_RESOL
USE TPM_GEOMETRY    ,ONLY : G, GEOM_RESOL
USE TPM_FIELDS      ,ONLY : F, FIELDS_RESOL
USE TPM_FFT         ,ONLY : T, FFT_RESOL
USE TPM_HICFFT      ,ONLY : HICT, HICFFT_RESOL
USE TPM_FLT
USE TPM_CTL         ,ONLY : C, CTL_RESOL
USE ABORT_TRANS_MOD ,ONLY : ABORT_TRANS
!

IMPLICIT NONE

! Declaration of arguments

INTEGER(KIND=JPIM) ,OPTIONAL, INTENT(IN) :: KRESOL
LOGICAL            ,OPTIONAL, INTENT(IN) :: LDSETUP

! Local varaibles
INTEGER(KIND=JPIM) :: IRESOL
LOGICAL :: LLSETUP

!     ------------------------------------------------------------------

IF(MSETUP0 == 0) CALL ABORT_TRANS('SET_RESOL:TRANS NOT SETUP')
LLSETUP = .FALSE.
IF(PRESENT(LDSETUP)) LLSETUP = LDSETUP
IRESOL = 1
IF(PRESENT(KRESOL)) THEN
  IRESOL = KRESOL
 IF(IRESOL < 1 .OR. IRESOL > NMAX_RESOL) THEN
   WRITE(NOUT,*)'SET_RESOL: UNKNOWN RESOLUTION ',IRESOL,NMAX_RESOL
   CALL ABORT_TRANS('SET_RESOL:IRESOL < 1 .OR. KRESOL > NMAX_RESOL')
  ENDIF
  IF(.NOT.LLSETUP) THEN
    IF(.NOT.LENABLED(IRESOL)) THEN
      WRITE(NOUT,*)'SET_RESOL: UNKNOWN RESOLUTION ',IRESOL,LENABLED
      CALL ABORT_TRANS('SET_RESOL:IRESOL NOT ENABLED')
     ENDIF
   ENDIF
ENDIF
IF(IRESOL /= NCUR_RESOL) THEN
  NCUR_RESOL = IRESOL
  R => DIM_RESOL(NCUR_RESOL)
  F => FIELDS_RESOL(NCUR_RESOL)
  G => GEOM_RESOL(NCUR_RESOL)
  D => DISTR_RESOL(NCUR_RESOL)
  T => FFT_RESOL(NCUR_RESOL)
  HICT => HICFFT_RESOL(NCUR_RESOL)
  S => FLT_RESOL(NCUR_RESOL)
  C => CTL_RESOL(NCUR_RESOL)
ENDIF

END SUBROUTINE SET_RESOL
END MODULE SET_RESOL_MOD