Changeset 2718
- Timestamp:
- 2011-04-04T12:03:24+02:00 (14 years ago)
- Location:
- trunk/NEMOGCM/TOOLS/WEIGHTS
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/TOOLS/WEIGHTS/README
r2448 r2718 48 48 ./ 49 49 | 50 +-------------+--------------+ 51 SCRIP1.4 nocsutil bin50 +-------------+--------------+--------------+ 51 SCRIP1.4 nocsutil src bin 52 52 53 53 SCRIP1.4 contains the unmodified copy (apart from compression of two sample netcdf … … 56 56 57 57 The bin directory contains python script freeform.py. 58 This is run to reformat the code for use within the NEMO 3.3 FCm framework.58 This is run to reformat the code for use within the NEMO 3.3 fcm framework. 59 59 It creates and populates a directory called 'src' with copied and modified versions 60 of the SCRIP library routines. Changes are described in the src/CHANGES file. 60 of the SCRIP library routines (and derived programs from the nocsutil directory). 61 Changes are described in the src/CHANGES file. 61 62 This script has already been run and only needs to be re-executed if SCRIP is updated. 62 63 63 The nocscrip directory contains the code for the three programs used to64 generate a weights file. Theseare:64 The src directory also contains the three programs used to generate a weights file. 65 The three programs are: 65 66 66 67 scripgrid.exe (scripgrid.F90) which creates two grid description files suitable for … … 88 89 example namelists provided are located in its refout subdirectory. 89 90 90 Installation is by use of the makenemo script. 91 Installation is by use of the maketools script. 92 E.g. change to the NEMOGCM/TOOLS directory and type: 93 94 ./maketools -help 95 96 and, for example: 97 98 ./maketools -m gfortran_linux -n WEIGHTS 99 91 100 92 101 Example Use … … 173 182 the grid centre and corner locations required by scrip. In the example given, 174 183 a file called 'coordinates.nc' must exist in the current directory. This is 175 recognised by scripgrid as a nemo coordinates file and the correct corner184 used by scripgrid as a nemo coordinates file and the correct corner 176 185 locations appropriate to the named grid centres are obtained (i.e. since 177 186 glamt is named, glamf and gphif will be used to provide corner coordinates). 187 The nemo file need not be called 'coordinates.nc' (e.g. '1_coordinates.nc' instead), 188 but must have longitude and latitude variables which start with the four 189 characters 'gphi' and 'glam' respectively. 178 190 "input_file" file must contain at least one variable on a grid whose axes are 179 191 described by the netcdf coordinate variables named in input_lon and input_lat. -
trunk/NEMOGCM/TOOLS/WEIGHTS/nocsutil/scripgrid_mod.F90
r2352 r2718 92 92 call release_unit(iunit) 93 93 94 if (trim(nemo_file) .eq. 'coordinates.nc') then 95 96 ! set up the names of the corner variables for a given input 97 ! the offset represents what needs to be added to (i,j) to get to the correct 98 ! element in the corner arrays to correspond to the point northeast of the center 99 if (nemo_lon(5:5) == "t") then 100 corn_lon = "glamf" 101 corn_lat = "gphif" 102 offset = (/ 0,0 /) 103 else if (nemo_lon(5:5) == "u") then 104 corn_lon = "glamv" 105 corn_lat = "gphiv" 106 offset = (/ 1,0 /) 107 else if (nemo_lon(5:5) == "v") then 108 corn_lon = "glamu" 109 corn_lat = "gphiu" 110 offset = (/ 0,1 /) 111 else 112 write(6,*) 'unknown nemo_lon name' 113 stop 114 endif 115 116 write(6,*) "processing " // trim(nemo_file) 117 call convertNEMO(nemo_file, nemo_lon, nemo_lat, corn_lon, corn_lat, & 118 offset, nemogrid_file) 119 94 if (nemo_lon(1:4) .ne. 'glam' .or. nemo_lat(1:4) .ne. 'gphi') then 95 write(6,*) 'lon name does not start with "glam" or lat name does not start with "gphi"' 96 stop 97 endif 98 99 ! set up the names of the corner variables for a given input 100 ! the offset represents what needs to be added to (i,j) to get to the correct 101 ! element in the corner arrays to correspond to the point northeast of the center 102 if (nemo_lon(5:5) == "t") then 103 corn_lon = "glamf" 104 corn_lat = "gphif" 105 offset = (/ 0,0 /) 106 else if (nemo_lon(5:5) == "u") then 107 corn_lon = "glamv" 108 corn_lat = "gphiv" 109 offset = (/ 1,0 /) 110 else if (nemo_lon(5:5) == "v") then 111 corn_lon = "glamu" 112 corn_lat = "gphiu" 113 offset = (/ 0,1 /) 120 114 else 121 122 write(6,*) "processing regular grid " // trim(nemo_file) 123 call convertFLUX(nemo_file, nemo_lon, nemo_lat, & 124 nemo_mask, nemo_mask_value, nemogrid_file) 125 115 write(6,*) 'unknown nemo_lon name' 116 stop 126 117 endif 118 119 write(6,*) "processing " // trim(nemo_file) 120 call convertNEMO(nemo_file, nemo_lon, nemo_lat, corn_lon, corn_lat, & 121 offset, nemogrid_file) 127 122 128 123 write(6,*) "processing regular grid" -
trunk/NEMOGCM/TOOLS/WEIGHTS/nocsutil/scripinterp.F90
r2352 r2718 19 19 write(6,*) 'enter the name of an input namelist' 20 20 read(5,*) nm_in 21 call process_grid(nm_in) 21 22 #endif 22 23 -
trunk/NEMOGCM/TOOLS/WEIGHTS/src/scripgrid_mod.F90
r2352 r2718 92 92 call release_unit(iunit) 93 93 94 if (trim(nemo_file) .eq. 'coordinates.nc') then 95 96 ! set up the names of the corner variables for a given input 97 ! the offset represents what needs to be added to (i,j) to get to the correct 98 ! element in the corner arrays to correspond to the point northeast of the center 99 if (nemo_lon(5:5) == "t") then 100 corn_lon = "glamf" 101 corn_lat = "gphif" 102 offset = (/ 0,0 /) 103 else if (nemo_lon(5:5) == "u") then 104 corn_lon = "glamv" 105 corn_lat = "gphiv" 106 offset = (/ 1,0 /) 107 else if (nemo_lon(5:5) == "v") then 108 corn_lon = "glamu" 109 corn_lat = "gphiu" 110 offset = (/ 0,1 /) 111 else 112 write(6,*) 'unknown nemo_lon name' 113 stop 114 endif 115 116 write(6,*) "processing " // trim(nemo_file) 117 call convertNEMO(nemo_file, nemo_lon, nemo_lat, corn_lon, corn_lat, & 118 offset, nemogrid_file) 119 94 if (nemo_lon(1:4) .ne. 'glam' .or. nemo_lat(1:4) .ne. 'gphi') then 95 write(6,*) 'lon name does not start with "glam" or lat name does not start with "gphi"' 96 stop 97 endif 98 99 ! set up the names of the corner variables for a given input 100 ! the offset represents what needs to be added to (i,j) to get to the correct 101 ! element in the corner arrays to correspond to the point northeast of the center 102 if (nemo_lon(5:5) == "t") then 103 corn_lon = "glamf" 104 corn_lat = "gphif" 105 offset = (/ 0,0 /) 106 else if (nemo_lon(5:5) == "u") then 107 corn_lon = "glamv" 108 corn_lat = "gphiv" 109 offset = (/ 1,0 /) 110 else if (nemo_lon(5:5) == "v") then 111 corn_lon = "glamu" 112 corn_lat = "gphiu" 113 offset = (/ 0,1 /) 120 114 else 121 122 write(6,*) "processing regular grid " // trim(nemo_file) 123 call convertFLUX(nemo_file, nemo_lon, nemo_lat, & 124 nemo_mask, nemo_mask_value, nemogrid_file) 125 115 write(6,*) 'unknown nemo_lon name' 116 stop 126 117 endif 118 119 write(6,*) "processing " // trim(nemo_file) 120 call convertNEMO(nemo_file, nemo_lon, nemo_lat, corn_lon, corn_lat, & 121 offset, nemogrid_file) 127 122 128 123 write(6,*) "processing regular grid" -
trunk/NEMOGCM/TOOLS/WEIGHTS/src/scripinterp.F90
r2352 r2718 19 19 write(6,*) 'enter the name of an input namelist' 20 20 read(5,*) nm_in 21 call process_grid(nm_in) 21 22 #endif 22 23
Note: See TracChangeset
for help on using the changeset viewer.