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.
agrif_create_data.f90 in utils/tools/NESTING/src – NEMO

source: utils/tools/NESTING/src/agrif_create_data.f90 @ 10027

Last change on this file since 10027 was 10025, checked in by clem, 6 years ago

nesting tools are partly rewritten (mostly for create_coordinates and bathy) to get better functionality. Now you can use the nesting to either define an agrif zoom or a regional domain (for bdy purposes). Also, the nesting tools output a domain_cfg.nc that can be directly used in NEMO4 without the need of DOMAINcfg tool. The option of median average for bathymetry interpolation still does not work properly but it's not new

  • Property svn:keywords set to Id
File size: 1.8 KB
RevLine 
[2136]1PROGRAM create_data
2  !
3  USE io_netcdf
4  USE bilinear_interp
5  USE agrif_readwrite
6  USE agrif_interpolation     
7  !
8  IMPLICIT NONE
9  !
10  !************************************************************************
11  !                           *
[10025]12  ! PROGRAM  CREATE_DATA                       *
[2136]13  !                           *
14  ! program to implement data interpolation to generate        *
15  ! child grid forcing files                 *
[10025]16  !                           *
[2136]17  !Interpolation is carried out using bilinear interpolation      *
18  !routine from SCRIP package                *     
19  !                           *
[10025]20  !http://climate.lanl.gov/Software/SCRIP/            *
[2136]21  !************************************************************************
22  !
[10025]23  INTEGER           :: narg, iargc, ji
[2136]24  CHARACTER(len=80) :: namelistname
25
26  narg = iargc()
27
28  IF (narg == 0) THEN
29     namelistname = 'namelist.input'
30  ELSE
31     CALL getarg(1,namelistname)
32  ENDIF
33
34  ! read input file (namelist.input)
35  CALL read_namelist(namelistname)
36  !
37  ! Interpolate U grid  data
[10025]38  ji = 1
39  DO WHILE( TRIM(U_Files(ji)) .NE. '/NULL' )
40     PRINT *,'Grid U forcing files = ',u_files(ji)
[2136]41     !       
[10025]42     CALL Interp_Extrap_var(U_FILES(ji), 'U') 
43     ji = ji+1               
[2136]44     !             
45  END DO
46
47  !
48  ! Interpolate V grid  data
[10025]49  ji = 1
50  DO WHILE( TRIM(V_Files(ji)) .NE. '/NULL' )
51     PRINT *,'Grid V forcing files = ',v_files(ji)
[2136]52     !       
[10025]53     CALL Interp_Extrap_var(V_FILES(ji), 'V') 
54     ji = ji+1               
[2136]55     !             
56  END DO
57  !
58  ! Interpolate flux data
[10025]59  ji = 1
60  DO WHILE( TRIM(Flx_Files(ji)) .NE. '/NULL' )
61     PRINT *,'flxfiles = ',flx_files(ji)
[2136]62     !       
[10025]63     CALL Interp_Extrap_var(FLX_FILES(ji), 'T') 
64     ji = ji+1               
[2136]65     !             
66  END DO
67  !
68  WRITE(*,*) ' '
69  WRITE(*,*) '******* forcing files successfully created *******' 
70  WRITE(*,*) ' ' 
71  !
72  STOP
73END PROGRAM create_data
Note: See TracBrowser for help on using the repository browser.