Warning, /verification/lab_sea/README.md is written in an unsupported language. File is not indexed.
view on githubraw file Latest commit d8c5b895 on 2024-02-08 22:52:21 UTC
d8c5b89513 Ivan*0001 Labrador Sea Region with Sea-Ice
0002 =========================================
0003
0004 ### Overview:
0005 This example sets up a small (20x16x23) Labrador Sea experiment
0006 coupled to a dynamic thermodynamic sea-ice model (MITgcm Documentation 8.6.2).
0007
0008 The domain of integration spans $`[280, 320]^\circ`$E and $`[46, 78]^\circ`$N.
0009 Horizontal grid spacing is 2 degrees.
0010 The 23 vertical levels and the bathymetry file
0011
0012 ```
0013 bathyFile = 'bathy.labsea1979'
0014 ```
0015 are obtained from the the 2$`^\circ`$ ECCO configuration.
0016
0017 Integration is initialized from annual-mean Levitus climatology
0018
0019 ```
0020 hydrogThetaFile = 'LevCli_temp.labsea1979'
0021 hydrogSaltFile = 'LevCli_salt.labsea1979'
0022 ```
0023
0024 Surface salinity relaxation is to the monthly mean Levitus climatology
0025
0026 ```
0027 saltClimFile = 'SSS.labsea1979'
0028 ```
0029
0030 Forcing files are a 1979-1999 monthly climatology computed from the
0031 NCEP reanalysis (see [SEAICE_PARAMS.h](https://github.com/MITgcm/MITgcm/blob/master/pkg/seaice/SEAICE_PARAMS.h) for units and signs)
0032
0033 ```
0034 uwindFile = 'u10m.labsea1979' # 10-m zonal wind
0035 vwindFile = 'v10m.labsea1979' # 10-m meridional wind
0036 atempFile = 'tair.labsea1979' # 2-m air temperature
0037 aqhFile = 'qa.labsea1979' # 2-m specific humidity
0038 lwdownFile = 'flo.labsea1979' # downward longwave radiation
0039 swdownFile = 'fsh.labsea1979' # downward shortwave radiation
0040 precipFile = 'prate.labsea1979' # precipitation
0041 ```
0042
0043 The experiment uses `pkg/gmredi`, `pkg/kpp`, `pkg/seaice`, and `pkg/exf`.
0044 The test is a 1-cpu, 10-hour integration. Both the atmospheric
0045 state and the open-water surface fluxes are provided by `pkg/exf`.
0046
0047 More `pkg/seaice` test experiments, configured for low and
0048 high-resolution global cube-sphere domains are described
0049 in `MITgcm_contrib/high_res_cube/README_ice`.
0050
0051 ## Lab Sea adjoint
0052 The `code_ad` directory provides files required to compile the adjoint
0053 version of this verification experiment. This verification
0054 experiment uses the 'divided adjoint'.
0055
0056 To compile the adjoint, one must enable the divided adjoint with the
0057 compile-time flag `USE_DIVA`, the location of which is specified in
0058 the file `build/genmake_local`.
0059 To wit,
0060
0061 ```
0062 USE_DIVA=1
0063 ```
0064
0065 To compile the adjoint without the divided adjoint, the compile-time
0066 flag `ALLOW_DIVIDED_ADJOINT` in `code_ad/AUTODIFF_OPTIONS.h` should
0067 be changed from
0068
0069 ```
0070 #define ALLOW_DIVIDED_ADJOINT
0071 ```
0072 to
0073
0074 ```
0075 #undef ALLOW_DIVIDED_ADJOINT
0076 ```
0077
0078 Note: `testreport` builds in the `lab_sea/build` directory which contains
0079 this `genmake_local` file and so it knows to use the divided adjoint.
0080
0081 ## Instructions
0082 Navigate to experiment directory
0083
0084 ```
0085 cd MITgcm/verification/lab_sea
0086 ```
0087
0088 ### 1-CPU forward experiment
0089 Configure and compile the code:
0090
0091 ```
0092 cd build
0093 ../../../tools/genmake2 -mods ../code [-of my_platform_optionFile]
0094 make depend
0095 make
0096 cd ..
0097 ```
0098
0099 To run:
0100
0101 ```
0102 cd run
0103 ln -s ../input/* .
0104 ln -s ../build/mitgcmuv .
0105 ./mitgcmuv > output.txt
0106 cd ..
0107 ```
0108
0109 There is comparison output in the directory:
0110
0111 ```
0112 results/output.txt
0113 ```
0114
0115 Use matlab script `lookat_ice.m` to compare the output
0116 with that from `checkpoint51f` sea-ice code:
0117
0118 ```
0119 cd ../../../verification/lab_sea/matlab
0120 matlab
0121 lookat_ice
0122 ```
0123
0124 ### 2-CPU forward experiment
0125 Configure and compile the code:
0126
0127 ```
0128 cd build
0129 ../../../tools/genmake2 -mpi -mods ../code [-of my_platform_optionFile]
0130 ln -s ../code/SIZE.h_mpi SIZE.h
0131 make depend
0132 make
0133 cd ..
0134 ```
0135
0136 To run:
0137
0138 ```
0139 cd run
0140 ln -s ../input/* .
0141 mpirun -np 2 ../build/mitgcmuv
0142 cd ..
0143 ```
0144
0145 ### 1-CPU adjoint experiment
0146 Configure and compile the code:
0147
0148 ```
0149 cd build
0150 ../../../tools/genmake2 -mods ../code_ad [-of my_platform_optionFile]
0151 make adall
0152 cd ..
0153 ```
0154
0155 To run:
0156
0157 ```
0158 cd run
0159 ln -s ../input_ad/* .
0160 ln -s ../input/* .
0161 ln -s ../../isomip/input_ad/ones_64b.bin .
0162 ln -s ../build/mitgcmuv_ad .
0163 ./do_run.sh
0164 cd ..
0165 ```
0166
0167 **Note:** the overly simple shell script "do_run.sh" just executes four times
0168 (as specified in file "run_ADM_DIVA", `add_DIVA_runs = 4`) `mitgcmuv_ad`, saving
0169 output in intermediate files "output_adm.txt.diva_0,1,2,3", plus a final time:
0170 ```
0171 mitgcmuv_ad > output_adm.txt
0172 ```
0173 where output file `output_adm.txt` can be compared with reference output:
0174
0175 ```
0176 results/output_adm.txt
0177 ```
0178
0179 ## Test sea-ice code
0180 Run the testscript _forward_ experiments:
0181
0182 ```
0183 cd MITgcm/verification
0184 ./testreport -t lab_sea [-of my_platform_optionFile]
0185 ```
0186
0187 Standard testreport output, with all secondary tests:
0188 ```
0189 default 10 ----T----- ----S----- ----U----- ----V----- --PTR 01-- --PTR 02-- --PTR 03-- --PTR 04-- --PTR 05--
0190 G D M c m s m s m s m s m s m s m s m s m s
0191 e p a R g m m e . m m e . m m e . m m e . m m e . m m e . m m e . m m e . m m e .
0192 n n k u 2 i a a d i a a d i a a d i a a d i a a d i a a d i a a d i a a d i a a d
0193 2 d e n d n x n . n x n . n x n . n x n . n x n . n x n . n x n . n x n . n x n .
0194
0195 Y Y Y Y>11<16 16 16 16 13 16 16 16 13 16 13 13 16 13 12 13 22 16 16 16 22 16 16 16 pass lab_sea
0196 Y Y Y Y>11<16 16 16 16 13 16 16 16 13 12 13 13 12 13 12 14 22 16 16 16 22 16 16 16 pass lab_sea.fd
0197 Y Y Y Y> 4< 9 10 9 8 16 13 11 8 6 8 4 5 8 8 4 5 22 6 7 7 22 5 7 6 FAIL lab_sea.hb87
0198 Y Y Y Y>11<16 16 16 16 16 16 16 16 16 13 12 14 16 16 13 14 22 16 16 16 22 16 16 16 pass lab_sea.salt_plume
0199 ```
0200
0201 **Note:** Some differences in accuracy occur across different platforms as seen
0202 here for secondary test "lab_sea.hb87".
0203
0204 Run the testscript _adjoint_ experiments:
0205
0206 ```
0207 cd MITgcm/verification
0208 ./testreport -t lab_sea -ad [-of my_platform_optionFile]
0209 ```
0210
0211 Standard adjoint testreport output, with all secondary tests:
0212 ```
0213 Adjoint generated by TAF
0214
0215 default 10 ----T----- ----S----- ----U----- ----V-----
0216 G D M C A F m s m s m s m s
0217 e p a R o d D m m e . m m e . m m e . m m e .
0218 n n k u s G G i a a d i a a d i a a d i a a d
0219 2 d e n t r r n x n . n x n . n x n . n x n .
0220
0221 Y Y Y Y 16>16<16 16 14 16 16 16 16 16 16 16 16 16 14 14 16 16 16 pass lab_sea (e=0, w=0, lfd=1, dop=1, sm=1)
0222 Y Y Y Y 14>15< 6 16 16 16 13 16 13 13 11 13 13 12 13 11 11 12 12 pass lab_sea.noseaice
0223 Y Y Y Y 16>13<16 16 16 14 16 16 13 13 16 16 16 16 14 14 16 14 16 pass lab_sea.noseaicedyn
0224 ```