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

Last change on this file since 10025 was 10025, checked in by clem, 2 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
Line 
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  !                           *
12  ! PROGRAM  CREATE_DATA                       *
13  !                           *
14  ! program to implement data interpolation to generate        *
15  ! child grid forcing files                 *
16  !                           *
17  !Interpolation is carried out using bilinear interpolation      *
18  !routine from SCRIP package                *     
19  !                           *
20  !http://climate.lanl.gov/Software/SCRIP/            *
21  !************************************************************************
22  !
23  INTEGER           :: narg, iargc, ji
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
38  ji = 1
39  DO WHILE( TRIM(U_Files(ji)) .NE. '/NULL' )
40     PRINT *,'Grid U forcing files = ',u_files(ji)
41     !       
42     CALL Interp_Extrap_var(U_FILES(ji), 'U') 
43     ji = ji+1               
44     !             
45  END DO
46
47  !
48  ! Interpolate V grid  data
49  ji = 1
50  DO WHILE( TRIM(V_Files(ji)) .NE. '/NULL' )
51     PRINT *,'Grid V forcing files = ',v_files(ji)
52     !       
53     CALL Interp_Extrap_var(V_FILES(ji), 'V') 
54     ji = ji+1               
55     !             
56  END DO
57  !
58  ! Interpolate flux data
59  ji = 1
60  DO WHILE( TRIM(Flx_Files(ji)) .NE. '/NULL' )
61     PRINT *,'flxfiles = ',flx_files(ji)
62     !       
63     CALL Interp_Extrap_var(FLX_FILES(ji), 'T') 
64     ji = ji+1               
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.