New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 774 for trunk/AGRIF/AGRIF_FILES/modcurgridfunctions.F – NEMO

Ignore:
Timestamp:
2007-12-18T17:45:53+01:00 (17 years ago)
Author:
rblod
Message:

Update Agrif, see ticket:#39

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/AGRIF/AGRIF_FILES/modcurgridfunctions.F

    r662 r774  
    802802      End Subroutine Agrif_Set_Regridding 
    803803C 
     804C 
     805C     ************************************************************************** 
     806CCC   subroutine Agrif_Set_coeffref_x 
     807C     ************************************************************************** 
     808      subroutine Agrif_Set_coeffref_x(coefref) 
     809 
     810      integer :: coefref 
     811 
     812      if (coefref.LT.0) then 
     813         write(*,*)'Coefficient of raffinement should be positive' 
     814         stop 
     815      else 
     816         AGRIF_coeffref(1) = coefref 
     817      endif 
     818      end subroutine Agrif_Set_coeffref_x 
     819C 
     820C     ************************************************************************** 
     821CCC   subroutine Agrif_Set_coeffref_y 
     822C     ************************************************************************** 
     823      subroutine Agrif_Set_coeffref_y(coefref) 
     824 
     825      integer :: coefref 
     826 
     827      if (coefref.LT.0) then 
     828         write(*,*)'Coefficient of raffinement should be positive' 
     829         stop 
     830      else 
     831         AGRIF_coeffref(2) = coefref 
     832      endif 
     833      end subroutine Agrif_Set_coeffref_y 
     834C 
     835C     ************************************************************************** 
     836CCC   subroutine Agrif_Set_coeffref_z 
     837C     ************************************************************************** 
     838      subroutine Agrif_Set_coeffref_z(coefref) 
     839 
     840      integer :: coefref 
     841 
     842      if (coefref.LT.0) then 
     843         write(*,*)'Coefficient of raffinement should be positive' 
     844         stop 
     845      else 
     846         AGRIF_coeffref(3) = coefref 
     847      endif 
     848      end subroutine Agrif_Set_coeffref_z 
     849C 
     850C     ************************************************************************** 
     851CCC   subroutine Agrif_Set_coeffreft_x 
     852C     ************************************************************************** 
     853      subroutine Agrif_Set_coeffreft_x(coefref) 
     854 
     855      integer :: coefref 
     856 
     857      if (coefref.LT.0) then 
     858         write(*,*)'Coefficient of time raffinement should be positive' 
     859         stop 
     860      else 
     861         AGRIF_coeffreft(1) = coefref 
     862      endif 
     863      end subroutine Agrif_Set_coeffreft_x 
     864C 
     865C     ************************************************************************** 
     866CCC   subroutine Agrif_Set_coeffreft_y 
     867C     ************************************************************************** 
     868      subroutine Agrif_Set_coeffreft_y(coefref) 
     869 
     870      integer :: coefref 
     871 
     872      if (coefref.LT.0) then 
     873         write(*,*)'Coefficient of time raffinement should be positive' 
     874         stop 
     875      else 
     876         AGRIF_coeffreft(2) = coefref 
     877      endif 
     878      end subroutine Agrif_Set_coeffreft_y 
     879C 
     880C     ************************************************************************** 
     881CCC   subroutine Agrif_Set_coeffreft_z 
     882C     ************************************************************************** 
     883      subroutine Agrif_Set_coeffreft_z(coefref) 
     884 
     885      integer :: coefref 
     886 
     887      if (coefref.LT.0) then 
     888         write(*,*)'Coefficient of time raffinement should be positive' 
     889         stop 
     890      else 
     891         AGRIF_coeffreft(3) = coefref 
     892      endif 
     893      end subroutine Agrif_Set_coeffreft_z 
     894C 
     895C     ************************************************************************** 
     896CCC   subroutine Agrif_Set_Minwidth 
     897C     ************************************************************************** 
     898      subroutine Agrif_Set_Minwidth(coefminwidth) 
     899 
     900      integer :: coefminwidth 
     901 
     902      if (coefminwidth.LT.0) then 
     903         write(*,*)'Coefficient of Minwidth should be positive' 
     904         stop 
     905      else 
     906         Agrif_Minwidth = coefminwidth 
     907      endif 
     908      end subroutine Agrif_Set_Minwidth 
     909C 
     910C     ************************************************************************** 
     911CCC   subroutine Agrif_Set_Rafmax 
     912C     ************************************************************************** 
     913      subroutine Agrif_Set_Rafmax(coefrafmax) 
     914 
     915      integer :: coefrafmax 
     916      integer :: i 
     917      real :: res 
     918 
     919      if (coefrafmax.LT.0) then 
     920         write(*,*)'Coefficient of  should be positive' 
     921         stop 
     922      else 
     923         res = 1. 
     924         do i = 1 , coefrafmax - 1 
     925            res = res * FLOAT(AGRIF_coeffref(1)) 
     926         enddo 
     927         if ( res .EQ. 0 ) res = 1 
     928         Agrif_Mind(1) = 1. / res 
     929C 
     930         res = 1. 
     931         do i = 1 , coefrafmax - 1 
     932            res = res * FLOAT(AGRIF_coeffref(2)) 
     933         enddo 
     934         if ( res .EQ. 0 ) res = 1 
     935         Agrif_Mind(2) = 1. / res 
     936C 
     937         res = 1. 
     938         do i = 1 , coefrafmax - 1 
     939            res = res * FLOAT(AGRIF_coeffref(3)) 
     940         enddo 
     941         if ( res .EQ. 0 ) res = 1 
     942         Agrif_Mind(3) = 1. / res 
     943C 
     944      endif 
     945      end subroutine Agrif_Set_Rafmax 
     946C 
     947C     ************************************************************************** 
     948CCC   subroutine Agrif_Open_File 
     949C     ************************************************************************** 
     950      subroutine Agrif_Open_File(num_id,name_file) 
     951 
     952      integer :: num_id 
     953      character(*) :: name_file 
     954 
     955      num_id = Agrif_Get_Unit() 
     956      if ( .NOT. Agrif_Root() ) then 
     957         name_file = TRIM(Agrif_CFixed())//'_'//TRIM(name_file) 
     958      endif 
     959 
     960      end subroutine Agrif_Open_File 
     961 
    804962      End Module Agrif_CurgridFunctions  
Note: See TracChangeset for help on using the changeset viewer.